Home

Awesome

OSPRay for Hydra

OSPRay interactive rendering plugin for USD Hydra

<p align="center"> <img src="images/hdospray_alab.jpg" style="padding: 0px 0px 0px 0px; box-shadow: 0px 0px 24px rgba(0,0,0,0.4); "> </p>

Rendering of the ALab scene using OSPRay for Hydra. The ALab asset is Copyright 2022 Animal Logic Pty Limited. All rights reserved.

OSPRay for Hydra

OSPRay for Hydra is an open source plugin for Pixar’s USD to extend the Hydra rendering framework with Intel® OSPRay. OSPRay for Hydra enables interactive, path traced rendering by utilizing OSPRay’s renderers and Intel® Open Image Denoise. OSPRay for Hydra and OSPRay are released under the permissive Apache 2.0 license.

As part of the Intel oneAPI Rendering Toolkit, OSPRay is highly-optimized for Intel® CPU architectures ranging from laptops to large-scale distributed HPC systems. OSPRay for Hydra leverages the Intel® Rendering Framework to deliver interactive rendering for large-scale models at high levels of fidelity, as demonstrated at SIGGRAPH 2018 using over 100GB of production assets.

Support and Contact

OSPRay for Hydra is still in beta, with new features and existing issues being worked on regularly. USD is also under active development and is often fast changing. We tag the OSPRay for Hydra releases to match specified USD releases, but cannot always anticipate all of the changes and resulting issues for users. Please report any issues you may run into to our issue tracker. We always welcome suggestions and especially pull requests!

Building OSPRay for Hydra

OSPRay for Hydra source is available on GitHub at OSPRay for Hydra. The master branch is typically the most stable branch and contains tagged releases.

Tags are of the form hdospray-vx.x.x-usdvx.x.x, with vx.x.x being the release of OSPRay for Hydra and usdv being the version of USD it is built against. This is required due to the frequently changing internals of hydra.

Currently OSPRay for Hydra is regularly tested on Ubuntu 22.04, and has been tested on Windows 10 and MacOS 13.6.

Prerequisites

USD has a large number of dependencies depending on your configuration. We provide a superbuild for linux/mac which builds USD and other dependencies. At a base you will need the following system libraries, though you may need others depending on what USD modules you are building and what system you are running: - c/c++ compiler (gcc 6.3.1+)

If you are building standalone, you will need: - USD 23.08, 23.02, 22.08, 21.08, or 20.08 - Other USD versions between these discrete releases may work, but are untested. - For a full list of USD dependencies, see the USD page. - OSPRay 3.1.0 - We recommend using ospray’s superbuild to build dependencies such as embree, ospcommon, and openvkl. OpenImageDenoise can also be enabled through superbuild. - rkcommon is a library dependency of OSPRay and hdOSPRay, and built as part of OSPRay’s superbuild.

Optional Dependencies

Superbuild on Linux/MacOS

OSPRay for Hydra contains a cmake superbuild script that builds external dependencies for you and is the recommended way of building OSPRay for Hydra on Linux/Mac. Alternatively, instructions for manually building each component is also given. Currently, USD 23.08 is the default.

mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=<install_dir> ../scripts/superbuild/ (or use ccmake to specify option through gui)
cmake --build . -j <numthreads>

By default, all install files will be installed into <build dir>/install. A setup script can then be called to set paths:

source <install_dir>/setup_hdospray.sh
usdview <usdfile> --renderer OSPRay

Manual Compiling USD on Linux/MacOS

To build USD, see the USD GitHub site. If you wish to use usdview, you must also enable imaging and python.
The options and compilers used can vary from our example, but make sure that TBB use is consistent across your build of USD, OSPRay for Hydra, and OSPRay. The command we use for building USD manually is:

python <USD_SOURCE>/build_scripts/build_usd.py --python --usd-imaging --openimageio <USD_BUILD_DIR>

To set TBB explicitly, go to <USD_BUILD_DIR>/build/USD and set TBB libraries and include directories using cmake.

Compiling OSPRay on Linux/MacOS

You can use the distributed binaries of OSPRay or build it yourself. We recommend using the OSPRay superbuild system according the instructions listed on github. Make sure that TBB is the same used by USD. You can force using system TBB using the superbuild by going to <OSPRAY_BUILD_DIR>, and setting the cmake variable DOWNLOAD_TBB to OFF. GPU Support needs to be manually enabled, see OSPRay docs.

Compiling OSPRay for Hydra on Linux/MacOS

OSPRay for Hydra plugin uses a CMake build system which links in USD and builds externally from the USD source directory, but configures CMake as if it were inside the USD repository in order to build the plugin using USD internals. It must therefore be built against a version of USD that matches OSPRay for Hydra, which is specified in the versioning tag of OSPRay for Hydra.

The plugin should now be in <usd install directory>/plugin/usd/hdOSPRay

Compiling OSPRay for Hydra on Windows

Compliation on windows is similar to Linux/Mac.

Documentation

Running

Once built, the plugin should be located in your install directory under plugin/usd/HdOSPRay. A setup script is provided for setting env vars. If you built usd with usdimaging, you can run usdview <scenefile> and select view->Hydra and then Renderer->OSPRay.

Houdini setup is specific to each platform, but has been tested with Houdini 19.5.640. For Mac/Linux, there is a houdini_setup script in your Houdini installation directory. This should be sourced, and then source the hdospray_setup.sh script and you should be able to select OSPRay as a hydra delegate in the drop down menu in stage view. For windows, it is recommended to copy the bin and plugin directories from your hdOSPRay build to the respective directories in the Houdini install.

OSPRay can be set to the default renderer by either

Environment variables

Most of these options are also exposed through the usdview GUI under Hydra Settings.

Number of light samples at every path intersection. A value of -1 leads to sampling all light sources in the scene. Does not affect scivis renderer.

Features

News, Updates, and Announcements