What is Embree?
Embree is a collection of high-performance ray tracing kernels, developed at Intel. The target users of Embree are graphics application engineers that want to improve the performance of their application by leveraging the optimized ray tracing kernels of Embree. The kernels are optimized for photo-realistic rendering on the latest Intel® processors with support for SSE, AVX, and 16 wide Xeon Phi vector instructions. In version 2.0 Embree now also supports applications written with the Intel SPMD Programm Compiler (ISPC, http://ispc.github.com) which makes it possible to write a renderer in ISPC that leverages SSE, AVX, and Xeon Phi instructions without any code change.
Embree contains algorithms optimized for incoherent workloads (e.g. Monte Carlo ray tracing algorithms) and coherent workloads (e.g. primary visibility and hard shadow rays). For standard CPUs, the single-ray traversal kernels in Embree provide the best performance for incoherent ray distributions and are very easy to integrate into existing rendering applications. For Xeon Phi, a renderer written in ISPC using the optimized hybrid ray/packet traversal algorithms have shown to perform best. For coherent workloads, ISPC generally outperforms the single ray mode on each platform.
In addition to the ray tracing kernels, Embree provides some tutorials and an example photo-realistic rendering engine to demonstrate how the ray tracing kernels are used in practice. The Embree example renderer is not a full featured renderer and not designed to be used for production renderering.
Embree is released as Open Source under the Apache 2.0 license.
What's New in Embree 2.0?
In addition to everything offered by the previous version, Embree 2.0 now also boasts support for the Intel Xeon Phi coprocessor platform; support for high-performance "packet" kernels on SSE, AVX, and Xeon Phi; integration with both traditional C++ and with the Intel SPMD Program Compiler (ISPC); instantiation and fast BVH reconstruction; and an example photo-realistic rendering engine for both C++ and ISPC.
You can get the latest Embree version 2.0 via git the following way:
$ git clone https://github.com/embree/embree.git embree $ cd embree $ git checkout v2.0
Alternatively Embree can also be checked out with subversion:
$ svn checkout https://github.com/embree/embree.git/branches/v2.0 embree $ cd embree
A ZIP files for different versions of Embree are available here:
For compilation under Windows use the included Visual Studio 2008 solution file embree.sln to compile Embree without ISPC support and embree_ispc.sln to compile Embree with ISPC support. In the latter case you also have to install ISPC first (see below).
To compile Embree under Linux and MacOSX you need to install CMake and FreeGLUT. Optionally you should also install OpenEXR and ImageMagick to support reading more image formats with the example renderer.
Under MacOSX you can install these dependencies using MacPorts:
sudo port install cmake freeglut openexr ImageMagick
Under Linux you can install the dependencies using yum:
sudo yum install cmake.x86_64 sudo yum install freeglut.x86_64 freeglut-devel.x86_64 sudo yum install libXmu.x86_64 libXi.x86_64 sudo yum install libXmu-devel.x86_64 libXi-devel.x86_64 sudo yum install OpenEXR.x86_64 OpenEXR-devel.x86_64 sudo yum install ImageMagick.x86_64 ImageMagick-c++.x86_64 sudo yum install ImageMagick-devel.x86_64 ImageMagick-c++-devel.x86_64
For compilation under Linux and MacOSX use CMake:
mkdir bin cd bin cmake .. make
For the ISPC projects of Embree to work you have to install ISPC from . You can download precompiled ISPC binaries or compile ISPC from its sources. We recommend using the precompiled binaries of ISPC v1.4.2 as we used that version for testing:
After installing ISPC you have to set the ISPC_DIR environment variable and put the ispc executable into your path:
export ISPC_DIR=path-to-ispc export PATH=path-to-ispc:$PATH
Best set the ISPC_DIR variable and PATH permanently.
Using the Embree example renderer
Embree provides an example photo-realistic rendering engine. Embree also ships with a few simple test scenes, each consisting of a scene file (.xml or .obj) and an Embree command script file (.ecs). The command script file contains command line parameters that set the camera parameters, lights and render settings. The following command line will render the Cornell Box scene with 16 samples per pixel and write the resulting image to the file cornell_box.tga in the current directory:
./renderer -c ../models/cornell_box.ecs -spp 16 -o cornell_box.tga
To interactively display the same scene, enter the following command:
./renderer -c ../models/cornell_box.ecs
Please read the README.txt file for more information on howto compile and use Embree.
Read Article: Embree: Photo-Realistic Ray Tracing Kernels
Embree 1.1 Presentation at SIGGRAPH 2012
Embree 2.0 Presentation at SIGGRAPH 2013
Participate in Embree Forum Discussion: Embree Forum
Download Imperial Crown of Austria Scene: Crown0413.zip (74MB).
Model courtesy Martin Lubich.
Embree Support and Contact
For questions and bug reports please write us at firstname.lastname@example.org.
To receive notifications of updates and new features of Embree please subscribe to the Embree mailing list.
For information about compiler optimizations, see our Optimization Notice.