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).
Non-GUI samples are particularly useful in the terminal-only Intel® DevCloud environment or in headless Linux* OS systems.

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.
GUI-based samples are not available in the terminal-only Intel® DevCloud.
To run the application:
  1. Set environment variables for the Intel® Embree,
    rkcommon
    , and
    Intel® oneAPI Threading Building Blocks
    (
    oneTBB
    ) library:
    source <install-dir>/setvars.sh
    <install-dir>
    is the directory where you installed the
    Intel® oneAPI Rendering Toolkit
    . By default, it is
    /opt/intel/oneapi/
    .
  2. 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
  3. 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.
They are particularly useful in the terminal-only Intel® DevCloud environment or in headless Linux* OS systems.
If you want to run a sample in the Intel® DevCloud, create a job script or a pipe-based submission. For a job script, include both the environment variable command and the executable. For details, see the Basic Job Submission guidance on the Intel® DevCloud job management page.
To run samples:
  1. Set environment variables for the Intel® Embree,
    rkcommon
    , and
    oneTBB
    :
    source <install-dir>/setvars.sh
    <install-dir>
    is the directory where you installed the
    Intel® oneAPI Rendering Toolkit
    . By default, it is
    /opt/intel/oneapi/
    .
  2. 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
  3. 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
    Linux* OS 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.