Abstract
We present a modular differentiable renderer design that yields performance superior to previous methods by leveraging existing, highly optimized hardware graphics pipelines. Our design supports all crucial operations in a modern graphics pipeline: rasterizing large numbers of triangles, attribute interpolation, filtered texture lookups, as well as user-programmable shading and geometry processing, all in high resolutions. Our modular primitives allow custom, high-performance graphics pipelines to be built directly within automatic differentiation frameworks such as PyTorch or TensorFlow. As a motivating application, we formulate facial performance capture as an inverse rendering problem and show that it can be solved efficiently using our tools. Our results indicate that this simple and straightforward approach achieves excellent geometric correspondence between rendered results and reference imagery.
Introduction
Differentiable rendering is a cornerstone of analysis-by-synthesis, enabling machine learning models to infer 3D properties—such as shape, lighting, and texture—by minimizing the difference between rendered guesses and real-world imagery. However, existing solutions often force a compromise between speed and quality. "Soft" renderers provide smooth gradients but often produce blurry results and struggle with scene complexity. Conversely, high-fidelity physically-based renderers are typically too slow for the iterative demands of deep learning.
This work introduces a high-performance differentiable renderer that bridges this gap. By leveraging hardware-accelerated graphics pipelines, our method achieves speeds orders of magnitude faster than previous state-of-the-art methods while maintaining the flexibility and scalability required for complex 3D scenes.
Modular Differentiable Primitives
Rather than a monolithic "black box" architecture, our system decomposes the rendering process into four highly optimized, modular building blocks. This allows developers to construct custom, end-to-end differentiable pipelines directly within frameworks like PyTorch and TensorFlow.
- Rasterization: Utilizes standard hardware (OpenGL) for the forward pass to efficiently determine triangle visibility at each pixel.
- Interpolation: Maps per-vertex attributes (e.g., normals, UV coordinates) to pixels using barycentric coordinates derived from the rasterizer.
- Texture Mapping: Implements differentiable trilinear MIP-mapping. This standard graphics technique is essential for learning high-resolution textures without convergence issues caused by aliasing.
- Analytic Antialiasing: To provide visibility gradients without sacrificing sharpness, we apply a post-processing step that calculates how moving a triangle's edge affects pixel color. This analytic approach avoids the need for "soft" or transparent triangles.
By adopting a deferred shading architecture, shading calculations occur on a regular grid. This enables users to implement custom shading logic using standard high-level operations without needing low-level CUDA programming.
Key Results and Applications
Our modular approach yields significant improvements in both performance and scalability. In high-resolution benchmarks (4096×4096), our method demonstrated speedups of up to 355x over PyTorch3D and over 4600x over SoftRas. Crucially, the system remains efficient even as scene complexity scales to hundreds of thousands of triangles.
We demonstrated the utility of these primitives through facial performance capture using a custom high-resolution multi-view dataset. By formulating the task as an inverse rendering problem, we successfully reconstructed highly detailed, time-varying 3D facial geometry. The system captured subtle motions, such as nose wrinkling, with a level of detail that often surpasses specialized commercial tracking solutions.
Conclusion and Future Work
While our primitives offer a powerful toolkit for local illumination and rasterization-based effects, they do not natively support global illumination (e.g., reflections or complex shadows), which would require a differentiable path tracer. Additionally, the analytic antialiasing uses an "axis-aligned slab" approximation that may introduce minor errors for certain edge orientations. Future work could extend these primitives to support more complex material models to better handle skin highlights and subsurface scattering.
Summary updated