threestudio-project / threestudio

A unified framework for 3D content generation.
Apache License 2.0
6.17k stars 475 forks source link

volsdf implementation seems to be wrong #454

Open lzqsd opened 6 months ago

lzqsd commented 6 months ago

The current volsdf alpha value is computed as:

alpha = torch.abs(dists.detach()) * volsdf_density(sdf, inv_std)

I believe the actual formula should be:

alpha = 1 - torch.exp(-dists * volsdf_density(sdf, inv_std) )

Also it is weird to clamp the inv_std value to be smaller than 80. I guess the reason is to prevent the wrong alpha to be larger than 1? In other works, the inv_std for vol_sdf can goes to 1000.

Thanks and looking forward to hearing you reply!