SkillAgentSearch skills...

Ospray

An Open, Scalable, Portable, Ray Tracing Based Rendering Engine for High-Fidelity Visualization

Install / Use

/learn @RenderKit/Ospray
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

OSPRay

This is release v3.3.0 (devel) of Intel® OSPRay. For changes and new features see the changelog. Visit http://www.ospray.org for more information.

OSPRay Overview

Intel® OSPRay is an open source, scalable, and portable ray tracing engine for high-performance, high-fidelity visualization on Intel Architecture CPUs, Intel Xe GPUs, and Aarch64/ARM64 CPUs. OSPRay is part of the Intel Rendering Toolkit (Render Kit) and is released under the permissive Apache 2.0 license.

The purpose of OSPRay is to provide an open, powerful, and easy-to-use rendering library that allows one to easily build applications that use ray tracing based rendering for interactive applications (including both surface- and volume-based visualizations). OSPRay runs on anything from laptops, to workstations, to compute nodes in HPC systems.

OSPRay internally builds on top of Intel Embree, Intel Open VKL, and Intel Open Image Denoise. The CPU implementation is based on Intel ISPC (Implicit SPMD Program Compiler) and fully exploits modern instruction sets like Intel SSE4, AVX, AVX2, AVX-512 and NEON to achieve high rendering performance. Hence, a CPU with support for at least SSE4.1 is required to run OSPRay on x86_64 architectures, or a CPU with support for NEON is required to run OSPRay on ARM64 architectures.

OSPRay’s GPU implementation (beta status) is based on the SYCL cross-platform programming language implemented by Intel oneAPI Data Parallel C++ (DPC++) and currently supports Intel Arc™ GPUs on Linux and Windows, and Intel Data Center GPU Flex and Max Series on Linux, exploiting ray tracing hardware support.

OSPRay Support and Contact

OSPRay is under active development, and though we do our best to guarantee stable release versions a certain number of bugs, as-yet-missing features, inconsistencies, or any other issues are still possible. For any such requests or findings please use OSPRay’s GitHub Issue Tracker (or, if you should happen to have a fix for it, you can also send us a pull request).

To receive release announcements simply “Watch” the OSPRay repository on GitHub.

Building and Finding OSPRay

The latest OSPRay sources are always available at the OSPRay GitHub repository. The default master branch should always point to the latest bugfix release.

Prerequisites

OSPRay currently supports Linux, Mac OS X, and Windows. In addition, before you can build OSPRay you need the following prerequisites:

  • You can clone the latest OSPRay sources via:

    git clone https://github.com/RenderKit/ospray.git
    
  • To build OSPRay you need CMake, any form of C++11 compiler (we recommend using GCC, but also support Clang, MSVC, and Intel® C++ Compiler (icc)), and standard Linux development tools.

  • Additionally you require a copy of the Intel® Implicit SPMD Program Compiler (ISPC), version 1.23.0 or later. Please obtain a release of ISPC from the ISPC downloads page. If ISPC is not found by CMake its location can be hinted with the variable ISPC_EXECUTABLE.

  • OSPRay builds on top of the Intel Rendering Toolkit (Render Kit) common library (rkcommon). The library provides abstractions for tasking, aligned memory allocation, vector math types, among others. For users who also need to build rkcommon, we recommend the default the Intel Threading Building Blocks (TBB) as tasking system for performance and flexibility reasons. TBB must be built from source when targeting ARM CPUs, or can be built from source as part of the superbuild. Alternatively you can set CMake variable RKCOMMON_TASKING_SYSTEM to OpenMP or Internal.

  • OSPRay also heavily uses Intel Embree, installing version 4.3.3 or newer is required. If Embree is not found by CMake its location can be hinted with the variable embree_DIR.

  • OSPRay supports volume rendering (enabled by default via OSPRAY_ENABLE_VOLUMES), which heavily uses Intel Open VKL, version 2.0.1 or newer is required. If Open VKL is not found by CMake its location can be hinted with the variable openvkl_DIR, or disable OSPRAY_ENABLE_VOLUMES.

  • OSPRay also provides an optional module implementing the denoiser image operation, which is enabled by OSPRAY_MODULE_DENOISER. This module requires Intel Open Image Denoise in version 2.3.0 or newer. You may need to hint the location of the library with the CMake variable OpenImageDenoise_DIR.

  • For the optional MPI modules (enabled by OSPRAY_MODULE_MPI), which provide the mpiOffload and mpiDistributed devices, you need an MPI library and Google Snappy.

  • The optional example application, the test suit and benchmarks need some version of OpenGL and GLFW as well as GoogleTest and Google Benchmark

Depending on your Linux distribution you can install these dependencies using yum or apt-get. Some of these packages might already be installed or might have slightly different names.

Type the following to install the dependencies using yum:

sudo yum install cmake.x86_64
sudo yum install tbb.x86_64 tbb-devel.x86_64

Type the following to install the dependencies using apt-get:

sudo apt-get install cmake-curses-gui
sudo apt-get install libtbb-dev

Under Mac OS X these dependencies can be installed using MacPorts:

sudo port install cmake tbb

Under Windows please directly use the appropriate installers for CMake, TBB, ISPC (for your Visual Studio version) and Embree.

Additional Prerequisites for GPU Build

To build OSPRay’s GPU module you need

CMake Superbuild

For convenience, OSPRay provides a CMake Superbuild script which will pull down OSPRay’s dependencies and build OSPRay itself. By default, the result is an install directory, with each dependency in its own directory.

Run with:

mkdir build
cd build
cmake [<OSPRAY_SOURCE_DIR>/scripts/superbuild]
cmake --build .

On Windows make sure to select a 64 bit generator, e.g.

cmake -G "Visual Studio 17 2022" [<OSPRAY_SOURCE_DIR>/scripts/superbuild]

The resulting install directory (or the one set with CMAKE_INSTALL_PREFIX) will have everything in it, with one subdirectory per dependency.

CMake options to note (all have sensible defaults):

CMAKE_INSTALL_PREFIX
will be the root directory where everything gets installed.

BUILD_JOBS
sets the number given to make -j for parallel builds.

INSTALL_IN_SEPARATE_DIRECTORIES
toggles installation of all libraries in separate or the same directory.

BUILD_OPENVKL
whether to enable volume rendering via Open VKL

BUILD_EMBREE_FROM_SOURCE
set to OFF will download a pre-built version of Embree.

BUILD_OIDN_FROM_SOURCE
set to OFF will download a pre-built version of Open Image Denoise.

OIDN_VERSION
determines which version of Open Image Denoise to pull down.

BUILD_OSPRAY_MODULE_MPI
set to ON to build OSPRay’s MPI module for data-replicated and distributed parallel rendering on multiple nodes.

BUILD_GPU_SUPPORT
enables beta GPU support, fetching the SYCL variants of the dependencies and builds OSPRAY_MODULE_GPU

BUILD_TBB_FROM_SOURCE
set to ON to build TBB from source (required for ARM support). The default setting is OFF.

For the full set of options, run:

ccmake [<OSPRAY_SOURCE_DIR>/scripts/superbuild]

or

cmake-gui [<OSPRAY_SOURCE_DIR>/scripts/superbuild]

Cross-Compilation with the Superbuild

The superbuild can be passed a CMake Toolchain file to configure for cross-compilation. This is done by passing the toolchain file when running cmake. When cross compiling it is also likely that you’ll want to build TBB and Embree from source to ensure they’re built for the correct target, rather than the target the Github binaries are built for. It may also be necessary to disable specific ISAs for the target by passing BUILD_ISA_<ISA_NAME>=OFF as well.

mkdir build
cd build
cmake --toolchain [toolchain_file.cmake] [path/to/this/directory]
    -DBUILD_TBB_FROM_SOURCE=ON \
    -DBUILD_EMBREE_FROM_SOURCE=ON \
    <other arguments>

While OSPRay supports ARM natively, it may be desirable to cross-compile it for x86_64 to run in Rosetta depending on the application integrating OSPRay. This can be done using the toolchain file toolchains/macos-rosetta.cmake, and by

Related Skills

View on GitHub
GitHub Stars1.1k
CategoryDevelopment
Updated1d ago
Forks198

Languages

C++

Security Score

100/100

Audited on Mar 18, 2026

No findings