
212:14 • Zhang et al.
Algorithm 2. Pseudocode of the optimization loop and a vectorized reverse-
mode implementation of the rendering function.
def optimize()
for l in range(N_iter):
loss = l2(render(scene), reference)
loss.backward()
optimizer.step(scene.grad)
@backward
def render(scene, grad_img):
rays = scene.sensor.sample_rays()
# Propagate derivative of the continuous part with PRB and
# return path segments
img_cont, segments = prb_backward(grad_img)
shape = segments.shape
# Project path segments, returns an array of new segments
# and failure markers.
proj_segments = shape.project(segments)
# Convert into a 3D point in boundary sample space
boundary_sample = shape.map_to_sample(proj_segments)
# Evaluate the boundary integrand without motion
value = eval_integrand(proj_segments)
# Initialize the guiding data structure (the octree may
# call eval_integrand internally)
distr = guiding_octree(boundary_sample, value)
# Draw samples from the guiding distribution
boundary_sample, pdf = distr.sample_pdf()
boundary_segment = shape.map_to_segment(boundary_sample)
# Particle tracer style render starting from boundary segment
img_boundary = render_boundary(boundary_segment, pdf)
img_combined = img_boundary + img_cont
img_combined.backward(grad_img)
Sai Praveen Bangaru, Jesse Michel, Kevin Mu, Gilbert Bernstein, Tzu-Mao Li, and
Jonathan Ragan-Kelley. 2021. Systematically dierentiating parametric discontinu-
ities. ACM Trans. Graph. 40, 4 (2021), 1–18.
Thomas Booth. 2007. Unbiased Monte Carlo Estimation of the Reciprocal of an Integral.
Nuclear Science and Engineering 156 (07 2007), 403–407.
David Bremer and John F. Hughes. 1998. Rapid Approximate Silhouette Rendering of
Implicit Surfaces. In Proceesings of Implicit Surfaces 98.
Forrester Cole, Kyle Genova, Avneesh Sud, Daniel Vlasic, and Zhoutong Zhang. 2021.
Dierentiable surface rendering via non-dierentiable sampling. In Proceedings of
the IEEE/CVF International Conference on Computer Vision. 6088–6097.
Andreas Griewank and Andrea Walther. 2008. Evaluating derivatives: principles and
techniques of algorithmic dierentiation. Vol. 105. SIAM.
Wenzel Jakob, Sébastien Speierer, Nicolas Roussel, Merlin Nimier-David, Delio Vicini,
Tizian Zeltner, Baptiste Nicolet, Miguel Crespo, Vincent Leroy, and Ziyi Zhang.
2022b. Mitsuba 3 renderer. https://mitsuba-renderer.org.
Wenzel Jakob, Sébastien Speierer, Nicolas Roussel, and Delio Vicini. 2022a. Dr.Jit:
A Just-In-Time Compiler for Dierentiable Rendering. Transactions on Graphics
(Proceedings of SIGGRAPH) 41, 4 (July 2022).
Hiroharu Kato, Yoshitaka Ushiku, and Tatsuya Harada. 2018. Neural 3D Mesh Renderer.
In IEEE Conference on Computer Vision and Pattern Recognition (CVPR).
Samuli Laine, Janne Hellsten, Tero Karras, Yeongho Seol, Jaakko Lehtinen, and Timo
Aila. 2020. Modular Primitives for High-Performance Dierentiable Rendering.
Transactions on Graphics (Proceedings of SIGGRAPH) 39, 6 (2020).
Tzu-Mao Li, Miika Aittala, Frédo Durand, and Jaakko Lehtinen. 2018. Dierentiable
monte carlo ray tracing through edge sampling. ACM Trans. Graph. 37, 6 (2018),
1–11.
Tzu-Mao Li, Michal Lukáč, Michaël Gharbi, and Jonathan Ragan-Kelley. 2020. Dieren-
tiable Vector Graphics Rasterization for Editing and Learning. ACM Trans. Graph.
39, 6 (nov 2020).
Table 1. Guiding initialization time (in seconds) for Figure 10.
EmptyCube Bunny Fertility Filigree Dragon
Uniform (5x) 0.52 0.49 0.52 0.46 0.47
Uniform (50x) 4.30 4.05 4.36 3.71 3.80
Projective 0.41 0.29 0.30 0.30 0.29
Table 2. Guiding initialization time (in seconds) for Figure 11.
BumpyTorus Botijo Neptune
Adaptive quadrature 1.12 1.11 1.11
Projective (grid) 0.39 0.26 0.26
Projective (octree) 0.73 0.48 0.46
Table 3. Guiding initialization time (in seconds) for Figure 14.
Knot Coil Winding Sausage KnittingYarn
Uniform (grid, 5x) 0.75 0.68 1.92 0.98 0.59
Uniform (grid, 50x) 7.22 6.52 18.98 9.68 5.48
Projective (grid) 0.13 0.11 0.30 0.12 0.14
Projective (octree) 0.26 0.26 0.64 0.30 0.33
Shichen Liu, Tianye Li, Weikai Chen, and Hao Li. 2019. Soft Rasterizer: A Dierentiable
Renderer for Image-based 3D Reasoning. The IEEE International Conference on
Computer Vision (ICCV) (Oct. 2019).
Matthew M. Loper and Michael J. Black. 2014. OpenDR: An Approximate Dierentiable
Renderer. In European Conference on Computer Vision (ECCV). Springer, 154–169.
Guillaume Loubet, Nicolas Holzschuch, and Wenzel Jakob. 2019. Reparameterizing
discontinuous integrands for dierentiable rendering. ACM Trans. Graph. 38, 6
(2019), 1–14.
Baptiste Nicolet, Alec Jacobson, and Wenzel Jakob. 2021. Large Steps in Inverse Ren-
dering of Geometry. ACM Transactions on Graphics (Proceedings of SIGGRAPH Asia)
40, 6 (Dec. 2021).
Merlin Nimier-David, Sébastien Speierer, Benoît Ruiz, and Wenzel Jakob. 2020. Radiative
Backpropagation: An Adjoint Method for Lightning-Fast Dierentiable Rendering.
Transactions on Graphics (Proceedings of SIGGRAPH) 39, 4 (July 2020).
Marios Papas, Thomas Houit, Derek Nowrouzezahrai, Markus Gross, and Wojciech
Jarosz. 2012. The Magic Lens: Refractive Steganography. ACM Transactions on
Graphics (Proceedings of SIGGRAPH Asia) 31, 6 (Nov. 2012).
Felix Petersen, Bastian Goldluecke, Christian Borgelt, and Oliver Deussen. 2022. GenDR:
A Generalized Dierentiable Renderer. In IEEE Conference on Computer Vision and
Pattern Recognition (CVPR). 4002–4011.
Osborne Reynolds. 1903. The sub-mechanics of the universe. Vol. 3. University Press.
Herman Hansson Söderlund, Alex Evans, and Tomas Akenine-Möller. 2022. Ray Tracing
of Signed Distance Function Grids. Journal of Computer Graphics Techniques Vol 11,
3 (2022).
T. S. Trowbridge and K. P. Reitz. 1975. Average irregularity representation of a rough
surface for ray reection. J. Opt. Soc. Am. 65, 5 (May 1975), 531–536.
Eric Veach. 1997. Robust Monte Carlo Methods for Light Transport Simulation. Ph. D.
Dissertation. Stanford University.
Eric Veach and Leonidas J. Guibas. 1995. Optimally Combining Sampling Techniques for
Monte Carlo Rendering. In Proceedings of the 22nd Annual Conference on Computer
Graphics and Interactive Techniques. Association for Computing Machinery.
Delio Vicini, Sébastien Speierer, and Wenzel Jakob. 2021. Path Replay Backpropagation:
Dierentiating Light Paths using Constant Memory and Linear Time. Transactions
on Graphics (Proceedings of SIGGRAPH) 40, 4 (Aug. 2021).
Delio Vicini, Sébastien Speierer, and Wenzel Jakob. 2022. Dierentiable Signed Distance
Function Rendering. Transactions on Graphics (Proceedings of SIGGRAPH) 41, 4 (July
2022).
Kai Yan, Christoph Lassner, Brian Budge, Zhao Dong, and Shuang Zhao. 2022. Ecient
estimation of boundary integrals for path-space dierentiable rendering. ACM
Trans. Graph. 41, 4 (2022), 1–13.
Yuting Yang, Connelly Barnes, Andrew Adams, and Adam Finkelstein. 2022. A
𝛿
:
autodi for discontinuous programs-applied to shaders. ACM Trans. Graph. 41, 4
(2022), 1–24.
Cheng Zhang, Bailey Miller, Kan Yan, Ioannis Gkioulekas, and Shuang Zhao. 2020.
Path-space dierentiable rendering. ACM Transactions on Graphics 39, 4 (2020).
Yang Zhou, Lifan Wu, Ravi Ramamoorthi, and Ling-Qi Yan. 2021. Vectorization for
Fast, Analytic, and Dierentiable Visibility. ACM Transactions on Graphics 40, 3
(July 2021).
ACM Trans. Graph., Vol. 42, No. 6, Article 212. Publication date: December 2023.