Get Started with the Intel® Rendering Toolkit for macOS*

ID 766440
Date 3/22/2024
Public

Run Intel® Open Volume Kernel Library (Intel® Open VKL) Sample

This tutorial describes how to run a pre-compiled interactive sample application built on Intel® Open Volume Kernel Library (Intel® Open VKL).

The vklExamples sample application renders the Intel Open VKL API results to screen through a graphical interface.

Prerequisite: Configure your system.

To run the application:

  1. Open a terminal.
  2. If you did not set up oneAPI toolkit environment permanently: Set up environment variables:
    • For root or sudo users:
      . /opt/intel/oneapi/setvars.sh
    • For non-root users:
      . ~/intel/oneapi/setvars.sh

    See Set up Environment Variables for other options.

    NOTE:
    If you installed the Render Kit to a custom location, make sure to replace /opt/intel/oneapi/ (for root or sudo users) or ~/intel/oneapi/ (for non-root users) with the custom installation path before running the command.
  3. Go to a writable directory and create a directory to store supporting files. For example, create the rk_gsg folder :
    cd ~
    mkdir rk_gsg
    cd rk_gsg
  4. Run the sample application:
    vklExamples -windowSize 1024 768

    The sample results will open in a new GUI window.

The following controls are available:

  • Left-click (Mouse1) and drag to rotate camera.
  • Right-click (Mouse2) and drag to zoom camera.
  • Middle-click (Mouse3) and drag to pan camera.
  • Select different transfer functions, Intel Open VKL API values, and rendering controls to visualize the volume.

NOTE:
User interface elements may overlap. Drag and drop the blue control bar to see all controls.

Tips and Observations

  • Different renderer modes are available from the rendering drop-down. These modes correspond to contemporary volume sampling and rendering applications.
  • Density Path Tracer renderer demonstrates path tracing within a volume. It uses vklComputeSample() in support of a Woodcock-tracking sampling algorithm. Use the dialog boxes to control algorithm parameters. See DensityPathTracer.cpp.
  • Hit-iterator renderer demonstrates hit-iterator and gradient computation functionality. It uses vklIterateHit() and vklComputeGradient(). This example also demonstrates shadow testing. See HitIteratorRenderer.cpp.
  • Ray-march iterator demonstrates interval iteration and computation of a volume sample. It uses vklIterateInterval() and vklComputeSample(). See RayMarchIteratorRenderer.cpp.
  • When exploring the samples, note that the code is aliased and modular to support the interactive rendering window. To better understand the code, start with the renderPixel() function.
  • ISPC modes correspond with code implementations built on the Intel® Implicit SPMD Program Compiler. These implementations take advantage of SIMD capabilities of modern processors and provide more opportunity for performance.

Next Steps