Skip to content

Conversation

cdtwigg
Copy link
Contributor

@cdtwigg cdtwigg commented Oct 13, 2025

Summary:
We need to be able to create SDF fields from meshes. This is the simplest version of the algorithm:

  1. rasterize the triangles to the grid, marking all cells within a narrow band with the actual analytical distance.
  2. Solve the eikonal equation to propagate distances throughout the field.
  3. Do a simple inside-outside test, this one just shoots rays and counts the intersections.

Reviewed By: jeongseok-meta

Differential Revision: D84392744

Summary:

For real-time collision detection, signed distance fields are a pretty commonly used primitive, since vertex-signed distance tests are O(1) and volumetric representations tend to be more robust to interpenetration than meshes.  

This is the actual implementation of the volume with interpolation and gradient calculation; actually creating them will come in later diffs.

Reviewed By: jeongseok-meta

Differential Revision: D84392738
Summary:
We need to be able to create SDF fields from meshes.  This is the simplest version of the algorithm:
1. rasterize the triangles to the grid, marking all cells within a narrow band with the actual analytical distance.
2. Solve the eikonal equation to propagate distances throughout the field.
3. Do a simple inside-outside test, this one just shoots rays and counts the intersections.

Reviewed By: jeongseok-meta

Differential Revision: D84392744
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 13, 2025
Copy link
Contributor

meta-codesync bot commented Oct 13, 2025

@cdtwigg has exported this pull request. If you are a Meta employee, you can view the originating Diff in D84392744.

Copy link
Contributor

meta-codesync bot commented Oct 13, 2025

This pull request has been merged in 4583f3e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. fb-exported Merged meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants