Download Precompiled OSPRay Binary Packages
Your CPU must support at least SSE4.1 to run OSPRay. The TGZ/ZIP packages contain most needed 3rd party dependencies, whereas for the (much smaller) RPM/installer packages you need to have installed
- Intel® TBB v3.0 or newer
- Embree ray tracing kernels v2.15 or newer
- To run the example viewer: OpenGL
- To use the distributed, multi-node rendering feature: Intel® MPI Library)
We recommend the latest version of both TBB and Embree libraries.
For Linux we provide OSPRay precompiled for 64 bit as RPMs or as TGZ file.
For Mac OS X we provide OSPRay as an installer and as a TGZ file:
For Windows we provide OSPRay binaries precompiled for 64 bit as an MSI installer as well as a ZIP archive:
The source code of the latest OSPRay version can be downloaded here:
You can also access old OSPRay releases.
Building OSPRay from Source
The latest OSPRay sources are always available at the OSPRay GitHub repository. The default
master branch should always point to the latest tested bugfix release.
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/ospray/ospray.git
- To build OSPRay you need CMake, any form of C++11 compiler (we recommend using GCC, but also support Clang and the Intel® C++ Compiler (icc)), and standard Linux development tools. To build the example viewers, you should also have some version of OpenGL.
- Additionally you require a copy of the Intel® SPMD Program Compiler (ISPC), version 1.9.1 or later. Please obtain a release of ISPC from the ISPC downloads page. The build system looks for ISPC in the
PATHand in the directory right “next to” the checked-out OSPRay sources.1 Alternatively set the CMake variable
ISPC_EXECUTABLEto the location of the ISPC compiler.
- Per default OSPRay uses the Intel® Threading Building Blocks (TBB) as tasking system, which we recommend for performance and flexibility reasons. Alternatively you can set CMake variable
OSPRay also heavily uses Embree, installing version 2.15 or newer is required. If Embree is not found by CMake its location can be hinted with the variable
Depending on your Linux distribution you can install these dependencies using
apt-get. Some of these packages might already be installed or might have slightly different names.
Type the following to install the dependencies using
sudo yum install cmake.x86_64 sudo yum install tbb.x86_64 tbb-devel.x86_64
Type the following to install the dependencies using
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
Compiling OSPRay on Linux and Mac OS X
Assume the above requisites are all fulfilled, building OSPRay through CMake is easy:
Create a build directory, and go into it
mkdir ospray/build cd ospray/build
(We do recommend having separate build directories for different configurations such as release, debug, etc).
The compiler CMake will use will default to whatever the
CXXenvironment variables point to. Should you want to specify a different compiler, run cmake manually while specifying the desired compiler. The default compiler on most linux machines is
gcc, but it can be pointed to
clanginstead by executing the following:
cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang ..
CMake will now use Clang instead of GCC. If you are ok with using the default compiler on your system, then simply skip this step. Note that the compiler variables cannot be changed after the first
Open the CMake configuration dialog
Make sure to properly set build mode and enable the components you need, etc; then type ’c’onfigure and ’g’enerate. When back on the command prompt, build it using
You should now have
libospray.soas well as a set of example application. You can test your version of OSPRay using any of the examples on the OSPRay Demos and Examples page.
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:
Browse to the OSPRay sources and specify a build directory (if it does not exist yet CMake will create it).
Click “Configure” and select as generator the Visual Studio version you have, for Win64 (32 bit builds are not supported by OSPRay), e.g. “Visual Studio 15 2017 Win64”.
If the configuration fails because some dependencies could not be found then follow the instructions given in the error message, e.g. set the variable
embree_DIRto the folder where Embree was installed.
Optionally change the default build options, and then click “Generate” to create the solution and project files in the build directory.
Open the generated
OSPRay.slnin Visual Studio, select the build configuration and compile the project.
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 12 2013 Win64" [-D VARIABLE=value] .. cmake --build . --config Release
-D to set variables for CMake, e.g. the path to Embree with “
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
For example, if OSPRay is in
~/Projects/ospray, ISPC will also be searched in