Differentiable Rendering with Reparameterized Volume Sampling

Nikita Morozov, Denis Rakitin, Oleg Desheulin, Dmitry P. Vetrov, Kirill Struminsky

Abstract

In view synthesis, a neural radiance field approximates underlying density and radiance fields based on a sparse set of scene pictures. To generate a pixel of a novel view, it marches a ray through the pixel and computes a weighted sum of radiance emitted from a dense set of ray points. This rendering algorithm is fully differentiable and facilitates gradient-based optimization of the fields. However, in practice, only a tiny opaque portion of the ray contributes most of the radiance to the sum. We propose a simple end-to-end differentiable sampling algorithm based on inverse transform sampling. It generates samples according to the probability distribution induced by the density field and picks non-transparent points on the ray. We utilize the algorithm in two ways. First, we propose a novel rendering approach based on Monte Carlo estimates. This approach allows for evaluating and optimizing a neural radiance field with just a few radiance field calls per ray. Second, we use the sampling algorithm to modify the hierarchical scheme proposed in the original NeRF work. We show that our modification improves reconstruction quality of hierarchical models, at the same time simplifying the training procedure by removing the need for auxiliary proposal network losses.

Introduction

Neural Radiance Fields (NeRFs) have revolutionized 3D scene reconstruction, yet they remain computationally intensive. Rendering a single pixel requires querying a deep multilayer perceptron (MLP) at numerous points along a ray. To mitigate this, the original NeRF implementation employs a hierarchical sampling strategy where a "coarse" network identifies high-density regions for a "fine" network to sample more densely.

However, this approach faces two significant challenges. First, the coarse network is typically trained using a separate auxiliary loss because the sampling process itself is not naturally differentiable. Second, the standard rendering formula relies on piecewise constant approximations that often waste computational resources on empty or transparent space. This paper introduces Reparameterized Volume Sampling (RVS) to address these issues by making the ray-sampling process fully differentiable.

Methodology

The core of this work is the application of the "reparameterization trick" to volume rendering. RVS expresses ray samples as a deterministic function of the scene density and a uniform random variable, similar to the approach used in Variational Autoencoders (VAEs).

Inverse Transform Sampling

The authors derive an analytical method to invert the "opacity function"—the cumulative distribution of light absorption along a ray. By utilizing piecewise linear or piecewise constant approximations of the density field, this inversion becomes both efficient and differentiable.

End-to-End Hierarchical Sampling

Because RVS is differentiable, the "proposal" (coarse) network can be trained directly via gradients from the final image loss. This eliminates the need for the heuristic auxiliary "coarse" reconstruction loss used in standard NeRF pipelines.

Monte Carlo Radiance Estimates

The method introduces a new rendering equation based on Monte Carlo integration. Instead of a dense sum of points, pixels can be estimated using a small number of strategically sampled points (e.g., 4 or 8), providing a direct mechanism to trade off rendering speed and variance.

Key Results

The RVS method was evaluated on standard benchmarks including Synthetic Blender, LLFF, Light Field (LF), and Tanks and Temples (T&T).

Reconstruction quality vs. sample count using RVS.
  • Quality and Efficiency: On the Blender "Lego" scene, RVS achieved a PSNR of 29.18 with only (16, 32) samples, significantly outperforming the baseline NeRF's 27.09. As shown in Figure 1 for the ship scene, reconstruction quality improves rapidly with sample count, reaching a PSNR of 29.05 with just 8 points per ray.
  • Detail Preservation: Qualitative analysis reveals that RVS reconstructs fine details, such as thin railings or treads, more effectively than standard NeRF, which often produces blurriness at low sample counts.
  • Speedup: When combined with fast architectures like DVGO, RVS achieved a 6x speedup in rendering compared to non-sparsified baselines while maintaining competitive image quality.

Discussion

Gradients and Pipeline Simplification

By allowing gradients to flow through sampling locations, the model learns to place samples more effectively. The proposal network learns to identify the most informative points for the fine network. Removing auxiliary losses simplifies the training objective, and the authors observed that proposal networks trained this way often produce superior density distributions.

Limitations

While RVS is highly effective for inference and hierarchical sampling, training a model from scratch using only low-sample Monte Carlo estimates currently results in lower fidelity than dense integration. This is attributed to high variance in the Monte Carlo estimator during early training stages. Additionally, calculating the inverse CDF introduces a small computational overhead, though this is typically offset by the reduction in MLP queries.

Conclusion

Reparameterized Volume Sampling provides a robust, differentiable framework for ray sampling in NeRFs. By enabling end-to-end training and efficient Monte Carlo estimation, it offers a significant step forward in making high-quality neural rendering more computationally accessible.

Summary updated

BibTeX
@inproceedings{morozov2024differentiable,
  author = {Nikita Morozov and Denis Rakitin and Oleg Desheulin and Dmitry P. Vetrov and Kirill Struminsky},
  title = {{Differentiable Rendering with Reparameterized Volume Sampling}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2024},
  url = {https://openreview.net/forum?id=fC9ESioiMF},
}
Figure