Computed the transmittance of a ray going through a non-homogeneous medium as required for volume rendering.
Transmittance Calculation Solution
In this section, we implemented the core components of a differentiable volume rendering pipeline: ray generation, point sampling, and volume rendering with transmittance calculation.
Implemented ray generation from camera parameters, converting from pixel coordinates to world-space rays through NDC space transformation.
Pixel Grid in NDC Space
Generated Rays from Camera
Implemented stratified sampling along rays to generate 3D sample points for volume evaluation.
Stratified Sample Points Along Rays
Implemented the core volume rendering equation with transmittance calculation and depth rendering.
Volume Rendering of Box SDF
Depth Map (Normalized)
Implemented efficient random ray sampling for training to reduce memory usage and enable batch processing.
Implemented MSE loss for optimizing implicit volume parameters from ground truth images.
Optimized Box After Training
Implemented a complete NeRF architecture with positional encoding, density and color prediction, and view dependence.
NeRF on Lego Dataset
Extended NeRF with view dependence for realistic material rendering on the materials dataset.
View-Dependent NeRF on Materials Dataset
Implemented sphere tracing algorithm for efficient SDF-based surface rendering.
Sphere Tracing of Torus SDF
Implemented neural SDF training with eikonal regularization for point cloud reconstruction.
Input Point Cloud (Bunny)
Neural SDF Reconstruction
Implemented VolSDF combining SDFs with volume rendering using Laplace CDF for SDF-to-density conversion.
VolSDF Color Rendering
VolSDF Geometry (SDF-based)
Alpha (α) Parameter:
Beta (β) Parameter Analysis:
High β (e.g., β = 0.1):
Low β (e.g., β = 0.01):
High β is easier to train with volume rendering because:
Low β is harder to train because:
Low β is more likely to produce accurate surfaces because:
High β limitations for surface accuracy:
Trade-off Summary: There's a fundamental trade-off between training stability (high β) and surface accuracy (low β). In practice, you often start with high β for stable training, then gradually reduce it or use a curriculum learning approach to achieve both stability and accuracy.
Created a complex scene with 16+ twisted primitives using SDF composition and the twist operation.
Complex Scene with 16+ Twisted Primitives
Experimented with training VolSDF and NeRF using only 20 views instead of 100, comparing reconstruction quality.
VolSDF: 100 Views
VolSDF: 20 Views
NeRF: 100 Views
NeRF: 20 Views
VolSDF Performance:
NeRF Performance:
Key Insights:
Implemented and compared the naive NeuS solution for SDF-to-density conversion as an alternative to VolSDF.
NeuS Naive SDF-to-Density Conversion
| Method | Formula | Advantages | Disadvantages |
|---|---|---|---|
| VolSDF | α · Φβ(-f(x)) | Well-theorized, smooth gradients, proven performance | Requires careful parameter tuning |
| NeuS Naive | α · s · e-sx / (1 + e-sx)² | Simple implementation, logistic distribution | May have different convergence properties |
Observations: