Get Started

  • 2021.2
  • 03/26/2021
  • Public Content

Run a Sample with Intel® Embree

This tutorial shows how to run Intel® Embree sample applications with or without a graphical user interface (GUI).

Run a GUI-Based Sample

The
triangle_geometry
sample application uses a graphical user interface to create a static cube and ground plane using triangle vertices.
To run the application:
  1. Open a new terminal window. Open Spotlight* tool and enter
    Terminal
    .
  2. Set environment variables for the terminal
    zsh
    session. Do one of the following:
    • Run the script to set the variables:
      source <install-dir>/setvars.sh
    • Set the
      DYLD_LIBRARY_PATH
      manually:
      export DYLD_LIBRARY_PATH=<install-dir>/rkcommon/latest/lib:<install-dir>/ospray/latest/lib:<install-dir>/oidn/latest/lib:<install-dir>/embree/latest/lib:<install-dir>/openvkl/latest/lib
    <install-dir>
    is the directory where you installed the
    Intel® oneAPI Rendering Toolkit
    . By default, it is
    /opt/intel/oneapi/
    .
  3. Go to a writable directory and create a directory to save the sample application results to.
    For example, create the
    rk_gsg
    folder
    under the home directory
    :
    cd /home/${USER}
    mkdir rk_gsg
    cd rk_gsg
  4. Run the triangle geometry sample:
    <install-dir>/embree/latest/bin/triangle_geometry
A new window will open with a 3D cube. For details about
triangle_geometry
and other samples, see Intel® Embree tutorials.
The
ispc
versions of the
triangle_ geometry
and other samples use Intel® Implicit SPMD Program Compiler for a better performance.

Run a Non-GUI Sample

Non-GUI sample applications do not need a graphical used interface (GUI) to output results.
To run samples:
  1. Open a new terminal window. Open Spotlight* tool and enter
    Terminal
    .
  2. Set environment variables for the terminal
    zsh
    session. Do one of the following:
    • Run the script to set the variables:
      source <install-dir>/setvars.sh
    • Set the
      DYLD_LIBRARY_PATH
      manually:
      export DYLD_LIBRARY_PATH=<install-dir>/rkcommon/latest/lib:<install-dir>/ospray/latest/lib:<install-dir>/oidn/latest/lib:<install-dir>/embree/latest/lib:<install-dir>/openvkl/latest/lib
    <install-dir>
    is the directory where you installed the
    Intel® oneAPI Rendering Toolkit
    . By default, it is
    /opt/intel/oneapi/
    .
  3. Go to a writable directory and create a directory to save the sample application results to.
    For example, create the
    rk_gsg
    folder
    under the home directory
    :
    cd /home/${USER}
    mkdir rk_gsg
    cd rk_gsg
  4. Run sample application:
    • Run the minimal sample:
      <install-dir>/embree/latest/bin/minimal
      This sample application output results in the terminal window. The application demonstrates how to initialize a device and scene.
    • Run the BVH Builder sample:
      <install-dir>/embree/latest/bin/bvh_builder
      This sample application output results in a terminal window. It demonstrates how to use the templated hierarchy builders of Intel® Embree.
    • Run the BVH Access sample:
      <install-dir>/embree/latest/bin/bvh_access
      This sample application output results in a terminal window. It demonstrates how to access internal triangle acceleration structure built by Intel® Embree.
    For details about the samples, see Intel® Embree tutorials.

Next Steps

  • Review the source code of the tutorials to understand their functionality. See
    <install-dir>/embree/latest/src/embree/tutorials
    . For details about tutorials, see Intel® Embree Tutorials page.
  • To try your own edits to the GUI tutorial sources, you are recommended to build Intel® Embree and the tutorials from scratch. See the
    Intel® oneAPI Rendering Toolkit
    macOS* build guide
    for more information. For details about the API, refer to the documentation on the official website or in the Git* repository.
  • Review other
    Intel® oneAPI Rendering Toolkit
    components in connection with the Intel Embree:
    • Intel® OSPRay, the Open Scalable Portable Ray tracing engine, uses Intel Embree to generate renders. It also provisions objects and functionality typical to 3D scenes.
      • Intel OSPRay provisions include volume and geometry objects, materials, textures, lights, camera, frame buffers, MPI-based distributed computing, and others.
      • For developers with OpenGL*-like background, Intel OSPRay may be a better way to start exploration of the toolkit than Intel Embree.
      • Intel Embree pathtracer example program provides a minimal and logical introduction to a pathtracer. Access a full professional visualization implementation of a pathtracer within the Intel OSPRay API.
    • If you are interested in volumetric rendering, review Intel® Open Volume Kernel Library (Intel® Open VKL) from the
      Intel® oneAPI Rendering Toolkit
      .
    • If you are interested in denoising, pass Intel Embree renders to Intel® Open Image Denoise. However, the Intel OSPRay frame buffer channel access makes sending framebuffer output color data, albedo, and normal data to Intel Open Image Denoise more manageable. The result is higher quality denoised images at a reduced ray tracing compute cost.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.