marian42 / mesh_to_sdf

Calculate signed distance fields for arbitrary meshes
https://pypi.org/project/mesh-to-sdf/
MIT License
991 stars 107 forks source link

Add support for computing SDF gradient for point clouds #24

Closed pbsds closed 3 years ago

pbsds commented 3 years ago

SIREN showcases an example where they use the gradient of the SDF during training. The gradient is the spatial partial derivative of the SDF, closely related to the normal vector.

This PR adds the ability to compute the gradient along with the SDF samples. This solution sould be simple to expand to voxel models.

Example: sdf sdf_grad