Download Precompiled OSPRay Binary Packages

Prerequisites

Your CPU must support at least SSE4.1 to run OSPRay. The TGZ/ZIP packages contain most needed 3rd party dependencies. Additionally you need

We recommend the latest version of both TBB and Embree libraries.

Packages

For Linux we provide OSPRay precompiled for 64 bit as a TGZ archive.
ospray-2.5.0.x86_64.linux.tar.gz

For Mac OS X we provide OSPRay as a ZIP archive:
ospray-2.5.0.x86_64.macosx.zip

For Windows we provide OSPRay binaries precompiled for 64 bit as an MSI installer as well as a ZIP archive:
ospray-2.5.0.x86_64.windows.msi
ospray-2.5.0.x86_64.windows.zip

The source code of the latest OSPRay version can be downloaded here:
ospray-2.5.0.zip
ospray-2.5.0.tar.gz

You can also access old OSPRay releases.

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:

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.

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_LOC>/scripts/superbuild]
cmake --build .

On Windows make sure to select the non-default 64bit generator, e.g.

cmake -G "Visual Studio 15 2017 Win64" [<OSPRAY_SOURCE_LOC>/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_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.
BUILD_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.

For the full set of options, run:

ccmake [<OSPRAY_SOURCE_LOC>/scripts/superbuild]

or

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

Standard CMake build

Compiling OSPRay on Linux and Mac OS X

Assuming the above requisites are all fulfilled, building OSPRay through CMake is easy:

Compiling OSPRay on Windows

On Windows using the CMake GUI (cmake-gui.exe) is the most convenient way to configure OSPRay and to create the Visual Studio solution files:

Alternatively, OSPRay can also be built without any GUI, entirely on the console. In the Visual Studio command prompt type:

cd path\to\ospray
mkdir build
cd build
cmake -G "Visual Studio 15 2017 Win64" [-D VARIABLE=value] ..
cmake --build . --config Release

Use -D to set variables for CMake, e.g., the path to Embree with “-D embree_DIR=\path\to\embree”.

You can also build only some projects with the --target switch. Additional parameters after “--” will be passed to msbuild. For example, to build in parallel only the OSPRay library without the example applications use

cmake --build . --config Release --target ospray -- /m

Finding an OSPRay Install with CMake

Client applications using OSPRay can find it with CMake’s find_package() command. For example,

find_package(ospray 2.0.0 REQUIRED)

finds OSPRay via OSPRay’s configuration file osprayConfig.cmake2. Once found, the following is all that is required to use OSPRay:

target_link_libraries(${client_target} ospray::ospray)

This will automatically propagate all required include paths, linked libraries, and compiler definitions to the client CMake target (either an executable or library).

Advanced users may want to link to additional targets which are exported in OSPRay’s CMake config, which includes all installed modules. All targets built with OSPRay are exported in the ospray:: namespace, therefore all targets locally used in the OSPRay source tree can be accessed from an install. For example, ospray_module_ispc can be consumed directly via the ospray::ospray_module_ispc target. All targets have their libraries, includes, and definitions attached to them for public consumption (please report bugs if this is broken!).


  1. For example, if OSPRay is in ~/Projects/ospray, ISPC will also be searched in ~/Projects/ispc-v1.14.1-linux↩︎

  2. This file is usually in ${install_location}/[lib|lib64]/cmake/ospray-${version}/. If CMake does not find it automatically, then specify its location in variable ospray_DIR (either an environment variable or CMake variable).↩︎