Skip to main content

DOI Build Status

python-embree

This library is a thin wrapper around Embree 3.

As much as possible, it tries to emulate the C API usage. The main point of this is to avoid creating a new API which would obfuscate the usage of the C API. Ideally, it should be easy to read the Embree documentation or examples, and translate things straightforwardly to equivalent Python code.

A secondary goal is to provide easy interoperability with numpy.

NOTE: very little of the library is wrapped so far, but this library is being developed in a way that should make it as easy as possible to wrap more functionality as necessary. If you find that a function that you'd like to use isn't wrapped, please create an issue or feel free to wrap it on your own and submit a pull request.

Installation

Windows

If you install Embree using the MSI from Embree's website, the Embree binaries, headers, and libraries will all be installed to C:\Program Files\Intel\Embree3 by default.

As an example, to compile using MSYS2 from the MinGW 64-bit console, after cding to the root directory of this repository, it should be possible to run:

$ python setup.py build_ext -I/c/Program\ Files/Intel/Embree3/include -L /c/Program\ Files/Intel/Embree3/lib
$ python setup.py install

to successfully compile and install python-embree.

Tips and tricks

Retain and release

The underlying Embree library uses reference counting to properly clean up resources used by the different types it provides (RTCDevice, RTCScene, etc.). This means that each type exposes a pair of "retain" and "release" functions: e.g., rtcRetainDevice, and rtcReleaseDevice. How to use these correctly is spelled out in the Embree API docs and the many Embree tutorials. Please consult these when using python-embree. The classes providing a lightweight object-oriented wrapper around Embree's types do not call any retain or release functions behind the scenes: this is the user's responsibility.

Parallelism

Using multiprocessing for concurrency in Python requires objects that are put into queues to be serialized using pickle. Unfortunately, it is not currently possible to serialize the Embree data structures (see the Embree repository's issues #137 and #238), and there do not appear to be plans to support this feature. The rationale for not supporting this feature is that building the Embree BVH from scratch is usually faster than reading the equivalent amount of data from disk.

This means that you will not be able to use any of the extensions classes exported by embree.pyx (such as embree.Device, embree.Scene, etc.) with multiprocessing directly. To get around this problem, a simple fix is to wrap a bit of Embree functionality in a Python class with its own __reduce__ method. For an example, see the implementation of TrimeshShapeModel here.

Metadata

Release files for embree 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for embree 0.0.4
File
embree-0.0.4-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
embree-0.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
embree-0.0.4-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
embree-0.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details
embree-0.0.4-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details
embree-0.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ x86-64 Details
embree-0.0.4-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details
embree-0.0.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 Details
embree-0.0.4-cp36-cp36m-win_amd64.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-64 Details
embree-0.0.4-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.17+ x86-64 Details

Total release size: 177.5 MB

Release files / embree-0.0.4-cp310-cp310-win_amd64.whl

Download URL embree-0.0.4-cp310-cp310-win_amd64.whl
Size 16.6 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
7d3c240f6530c54b35a7ebe6b5cfad3f38ef265ec6876ea8a308b8ff679b2576
BLAKE2b-256 checksum
How to use checksums
6149f852808a18999641700768ce6cb607c67a81d0f41130d7272567ca9f5fd0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.9

Release files / embree-0.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL embree-0.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 18.9 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
7a31a0236f8576e6faa85bc09101ef0399da0abc9e1fa53256ff99777c2ed5ee
BLAKE2b-256 checksum
How to use checksums
abfbcb1ef9e6d7b8adeafc51b20f0ba8602d0c0c84452859c37d367dcbc2e846
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.12

Release files / embree-0.0.4-cp39-cp39-win_amd64.whl

Download URL embree-0.0.4-cp39-cp39-win_amd64.whl
Size 16.6 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
0c64ecc845310fbded3906a64130c7e71b72f74fb71b1eb0095ce264bbf6a937
BLAKE2b-256 checksum
How to use checksums
2291d557900f09abcc5a870b306334952cf1725f3cc43295fa9e3b6760c7974e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.9

Release files / embree-0.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL embree-0.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 18.9 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
add79338f2bfb9542778b3463492073eb85ec93c8fecc294e4f19726284c8062
BLAKE2b-256 checksum
How to use checksums
dc99a6360180dca1d7d75aa992cd245c72c7ef352c0386442b5e6d82c86c7fd2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.12

Release files / embree-0.0.4-cp38-cp38-win_amd64.whl

Download URL embree-0.0.4-cp38-cp38-win_amd64.whl
Size 16.6 MB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
821db8619440b638f017941a804f707001c588f19348f717ad0b2182d7100441
BLAKE2b-256 checksum
How to use checksums
9244c7d4f192354d37117361cfe2e1e0e4c6ce36e8ecba00970280edc1273eaa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.9

Release files / embree-0.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL embree-0.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 18.9 MB
Tags CPython 3.8 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
24095e8c5441adec31d29fc4ac1f8e0a9edde7ce608f283356d934af7774cd78
BLAKE2b-256 checksum
How to use checksums
cf8e56b98718448052c5bb21e7ba8b589f33fe849dda87622ae1ec740935517a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.12

Release files / embree-0.0.4-cp37-cp37m-win_amd64.whl

Download URL embree-0.0.4-cp37-cp37m-win_amd64.whl
Size 16.6 MB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
bea3936a3a49414c899559aa4aff104672f722a1018b5571a1ad7e93354bd349
BLAKE2b-256 checksum
How to use checksums
62dc8520d690157a7f40015eede078f831c5a0561e4b2eeb559cb7de754af060
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.9

Release files / embree-0.0.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL embree-0.0.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 18.9 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
baa2316fc87262b19421742c760b0a79a8d463a8b0c524ae3957bd5368bd537b
BLAKE2b-256 checksum
How to use checksums
77bb02293ec86d58e40a8f13ac6ad7c1f2b2b03cdd13fea6ce70043bfefdb825
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.12

Release files / embree-0.0.4-cp36-cp36m-win_amd64.whl

Download URL embree-0.0.4-cp36-cp36m-win_amd64.whl
Size 16.6 MB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
7289e89f9b3f706b50c2f0b270e9e2f2ac442b0c00b7ea09783da2d2c0a42cd5
BLAKE2b-256 checksum
How to use checksums
488893fbb5ab806cc0231a5bc6bde8b20846dfc262ebc4be5a159d3d977809b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.9

Release files / embree-0.0.4-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL embree-0.0.4-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 18.9 MB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
c58beec0bc2baf6bff94c28586b82ac4815500638d335194a8a41523e402012c
BLAKE2b-256 checksum
How to use checksums
7feede69797b20f93dd48126289f64f1d4c0528b6f016dbf6136520609110e08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.12

Release history Release notifications | RSS feed

4.1.0

12 release files

This release

0.0.4 This release

10 release files

0.0.3

10 release files

0.0.1

5 release files

0.0.0

5 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page