Registry / ai-ml / embreex

embreex

JSON →
library4.4.0pypypi✓ verified 25d ago

Embreex is a Python binding for Intel's high-performance Embree ray tracing kernel. It is a fork of `scopatz/pyembree`, created to provide pre-built wheels for Intel Mac, Windows, and Linux across various Python versions (3.8+), aiming for minimal dependencies. The library is actively maintained with regular updates and includes a release candidate for a new major version.

pip install embreex
INSTALL
IMPORT
SIG · EMBREEX
E
embreex
ai-mlpythonv4.4.0
Install
4.0s avg
Import
102ms
Disk
128MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v4.4.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
installs and imports cleanly · install 4.0s · import 0.102s · 126MB
128MB installed
● package 128MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

embreex
import embreex
The core library is imported directly as `embreex`.
RayMeshIntersector
from embreex import RayMeshIntersector
Used for creating a ray intersector object.
EmbreeTrimesh
from embreex import EmbreeTrimesh
Used for creating an Embree-compatible mesh from NumPy arrays.

This quickstart demonstrates how to create a basic triangular mesh, initialize an `EmbreeTrimesh` object, create a `RayMeshIntersector`, and perform a ray-mesh intersection query to check for hits and retrieve hit details.

import embreex import numpy as np # Define a simple mesh (e.g., a triangle) vertices = np.array([ [0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.0, 1.0, 0.0] ], dtype=np.float32) faces = np.array([ ], dtype=np.int32) # Create an Embree mesh object mesh = embreex.EmbreeTrimesh(vertices, faces) # Create a ray intersector from the mesh intersector = embreex.RayMeshIntersector(mesh) # Define a single ray (origin and direction) ray_origins = np.array([[0.1, 0.1, 1.0]], dtype=np.float32) ray_directions = np.array([[0.0, 0.0, -1.0]], dtype=np.float32) # Check if the ray hits the mesh hits = intersector.intersects_any(ray_origins, ray_directions) print(f"Ray hits mesh: {hits}") # Find the first hit location and triangle index index_tri, u, v, t = intersector.intersects_first(ray_origins, ray_directions) if index_tri != -1: print(f"\nFirst hit details:") print(f" Hit triangle index: {index_tri}") print(f" Barycentric coordinates (U, V): {u:.4f}, {v:.4f}") print(f" Distance along ray (t): {t:.4f}") else: print("\nNo hit found for the ray.")
Debug
Known issues
breakingA new major version `4.x` is in release candidate stage (`4.4.0rc0`). Future stable releases in this series may introduce breaking API changes compared to the current stable `2.x` series.
fix
Review the `4.x` changelog and documentation (once stable) for migration instructions before upgrading.
affects: <4.0.0
gotchaEmbreex is a fork of `scopatz/pyembree` with a name change to avoid confusion. While aiming for compatibility, users migrating from `pyembree` or other Embree Python bindings might encounter subtle API differences or behavioral changes.
fix
Refer to the `embreex` GitHub repository README for details on its relationship to other forks and ensure your code aligns with the `embreex` API.
affects: All versions
gotchaThe library primarily provides pre-built wheels for easy installation on supported platforms (Windows, Linux, macOS) and Python versions (>=3.8). Installing on unsupported platforms, older Python versions (e.g., 3.6, 3.7 as mentioned in old documentation), or from source may require manual compilation of the underlying Intel Embree C++ library, which can be complex.
fix
Ensure your environment meets the pre-built wheel requirements (OS, Python version). If compilation is necessary, consult the `trimesh/embreex` GitHub repository for build instructions and dependencies.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'embreex'
The 'embreex' module is not installed in the Python environment.
fix
pip install embreex
ImportError: cannot import name 'EmbreeScene'
The 'EmbreeScene' class is not available in the 'embreex' module, possibly due to a version mismatch or incorrect import.
fix
from embreex import Scene
AttributeError: module 'embreex' has no attribute 'Ray'
The 'Ray' attribute does not exist in the 'embreex' module, likely due to changes in the module's API.
fix
from embreex import Ray
ERROR: Could not find a version that satisfies the requirement embreex (from versions: none)
`pip` was unable to find a pre-built wheel for your specific operating system, architecture, or Python version, and building from source failed or was not attempted.
fix
Ensure your Python environment (version, OS, architecture) is compatible with `embreex`'s supported platforms. Update pip (`python -m pip install --upgrade pip`) and retry.
ImportError: DLL load failed while importing _embreex
The `embreex` package's underlying native C++ extension (`_embreex.pyd` or `_embreex.so`) failed to load at runtime, likely due to a missing system dependency like a C++ runtime library or a component of the Embree library.
fix
Ensure your system's C++ runtime libraries are up to date (e.g., Microsoft Visual C++ Redistributable on Windows). Try reinstalling `embreex` (`pip install --force-reinstall embreex`).
Upgrade
Version history
4.4.0latest on PyPI · released Apr 22, 2026
Audit
Dependencies
numpyrequiredRequired for defining mesh data (vertices, faces) and ray data (origins, directions) in typical usage examples. While not a direct pip install dependency, practical use highly depends on it.
Agent activity
20 hits · last 30 days
node
18
OpenAI (training)
1
Resources
embreex — pip install embreex · libregistry