Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



17 Commits

Repository files navigation

dtrt: An Unbiased Differentiable Volumetric Path Tracer

dtrt is a physics-based differentiable renderer computes derivative images with respect to arbitrary scene parameters (e.g., object geometries and material properties). This renderer is capable of producing unbiased derivative estimates with the presence of heterogeneous participating media. The estimated derivatives can be used for solving inverse rendering problems through gradient-based optimizations. For more details on our differential radiative transfer theory, please refer to the paper: A Differential Theory of Radiative Transfer, Cheng Zhang, Lifan Wu, Changxi Zheng, Ioannis Gkioulekas, Ravi Ramamoorthi, and Shuang Zhao.


dtrt has been tested mainly under Ubuntu 18.04 LTS and can be compiled as follows.

  1. Install all the dependencies manually or using the provided script:
exec bash -l
  1. Compile the dtrt & pydtrt libraries:
mkdir build
cd build
cmake ..
sudo make install -j
  1. (Optional) To test if the compilation is successful, execute the example script:
cd examples/glass_1

To run any other example script, the global variable nder defined in include/config.h needs to be changed to match the number of scene parameters with respect to which the derivatives are computed. Please refer to this page for the number of parameters in each example scene.


dtrt depends on a few libraries/systems that can be automatically installed using the accompanying script:


dtrt involves two major components: (i) C++ differentiable rendering code under /src; and (ii) python interface code under /pydtrt that allows the rendered results to be used by Python-based tools like PyTorch.

If you have any questions/comments/bug reports, please open a github issue or e-mail Cheng Zhang at