Installation

Install RayD and verify your environment

Requirements#

  • Python: 3.10 or higher
  • CUDA Toolkit: 11.0 or higher
  • Operating System: Windows 10/11 or Linux
  • CMake and a C++17 compiler (for building from source)

Warning

RayD requires an NVIDIA GPU with OptiX support. CPU-only environments are not supported.

Install#

pip install rayd

Verify#

import rayd as rd
import drjit as dr
 
rd.set_device(0)
print(f"RayD device count: {rd.device_count()}")
print(f"Current device: {rd.current_device()}")

If the device count prints without error, RayD is installed and OptiX is initialized correctly.

Device Selection#

RayD follows Dr.Jit's current-thread CUDA device selection. Always call rd.set_device() before constructing any RayD resources:

import rayd as rd
 
rd.set_device(0)  # Select GPU 0

Note

Existing RayD scenes, OptiX pipelines, and BVHs should not be reused across device switches in the same process.

Build from Source#

If you need to build from source:

conda create -n rayd python=3.10 -y
conda activate rayd
pip install cmake scikit-build-core nanobind==2.9.2
pip install drjit==1.3.1
pip install .

For editable development builds:

pip install --no-build-isolation -ve .

Next Steps#

  • Quick Start — build your first scene and trace rays
  • Mesh API — load and configure triangle geometry