Differentiable Rendering
Use a moving visibility boundary to explain missing gradients in inverse graphics and compare rasterization and path-sampling estimators.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 3
- Reading time
- 2 min
In this article3 chapters
The inverse objective differentiates through image formation
Let \(\theta\) collect scene parameters and \(R(\theta)\) denote a renderer. With an observed image \(y\), one inverse problem minimizes \(\tfrac12\|R(\theta)-y\|_2^2\). Its gradient involves the renderer’s Jacobian applied in reverse to the image residual. Smooth shading and interpolation supply ordinary derivatives at many fixed-visibility pixels. When a silhouette crosses a pixel, the identity of the visible surface can change abruptly.
Reverse-mode differentiation propagates a pixel loss through ordinary smooth operations. Ray intersections show where the identity of the nearest surface can change and require a separate visibility argument.
A moving edge contributes at the integration boundary
Consider a single normalized pixel on the interval \([0,1]\). It sees foreground intensity \(f\) on the left of an edge at \(a\in(0,1)\) and background intensity \(b\) on the right. Its area-averaged value and derivative are
\[ I(a)=af+(1-a)b,\qquad \frac{dI}{da}=f-b. \]
For nearly every fixed sample location, differentiating the pointwise constant intensity with respect to the edge location gives zero. Averaging those pointwise derivatives misses the change due to the moving boundary. The derivative of the pixel integral captures the contrast multiplied by the change of covered area. In higher dimensions this gives boundary contributions at silhouettes and occlusions.
Choose a gradient consistent with the rendering model
Differentiable rasterizers can use antialiasing over projected coverage to provide gradients near silhouettes. Differentiable light transport can explicitly sample visibility edges and account for changes along light paths. The two settings differ in image model, cost and variance. Albedo and lighting can also trade off without changing the image, so stable gradients alone cannot make all scene parameters identifiable. Neural 3D reconstruction gives examples of differentiable image fitting. Computational geometry explains why robust orientation and incidence decisions matter when visibility changes.[1][2]