krrish94 / nerf-pytorch

A PyTorch re-implementation of Neural Radiance Fields
Other
887 stars 122 forks source link

Why multiply dists with normalized ray_directions in volume rendering? #35

Closed SrinjaySarkar closed 2 years ago

SrinjaySarkar commented 2 years ago

What is the point of this line of code? dists = dists * ray_directions[..., None, :].norm(p=2, dim=-1) on line 24 in volume_rendering_utils.py ? The paper only mentions the dists but not multiplying it with the ray directions.

SrinjaySarkar commented 2 years ago

Just figured it out, it is to convert to real world distance units.