Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Channels ▼

Gastón Hillar

Dr. Dobb's Bloggers

Introducing Embree

July 13, 2011

Embree provides a collection of high-performance ray tracing kernels that target modern Intel multicore microprocessors. In addition, Embree includes an example photo-realistic rendering engine. If you want to learn how ray tracing kernels are used in practice and how to optimize multithreaded code with Advanced Vector Extensions (AVX), you will find valuable examples by taking a look at Embree's code. Intel Labs has made Embree available as an open source project under the Apache 2.0 License.

Embree is a multiplatform project and it runs on Windows, Linux, and MacOSX. It is available in both 32-bit and 64-bit modes, and thus provides the ability to measure the performance of the kernels in the different platforms and with the two modes.

You can use GCC, Microsoft C++ Compiler, or the Intel Compiler to build Embree and its sample path tracing renderer, which uses the kernels and provides a few test scenes. However, Embree achieves better performance when you use the Intel Compiler because Embree coordinates with the optimization features found in it. In addition, Embree takes advantage of the highly optimized performance libraries that are included with the Intel compiler. Thus, Embree works as a nice example for benchmarking the results provided by different compilers on diverse platforms for a highly parallelized algorithm with extended use of modern SIMD instruction sets.

Embree has been optimized to take advantage of modern Intel CPUs that support the following SIMD instructions:

  • SSSE3: Supplemental Streaming SIMD Extensions 3
  • SSE4.1: Streaming SIMD Extensions 4.1
  • SSE4.2: Streaming SIMD Extensions 4.2
  • AVX: Advanced Vector eXtensions

Embree implements the Monte Carlo ray tracing method. This method is capable of generating photo-realistic rendering and supports physically accurate rendering. The ray tracing algorithm is very popular for professional applications, such as architectural visualization and movie production.

You can download the source code for Embree here. But before you can run the application in any version of Windows, you have to perform some steps after building Embree.

It is necessary to copy the GLUT library included in the app\freeglut folder. The folder includes two sub-folders, Win32 (32-bit vesion) and x64 (64-bit version). You must copy each freeglut.dll into the corresponding Debug or Release folders. For example, you must copy the freeglut.dll file found in app\freeglut\Win32 into the Win32\Release folder, and the freeglut.dll file found in app\freeglut\x64 into the x64\Release folder.

Once you have copied the freeglut.dll file according to your needs, you will be able to run the embree.exe command-line application to test the kernels with the sample scenes found in the models folder. You will find all the necessary information to run the examples and understand Embree's structure in the Embree User's Guide. The PDF file name is "embree_users_guide.pdf" and it is located in the doc folder. I mention this user's guide because you won't find references about it in the README.TXT file located in Embree's root folder.

Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.