Replies: 5 comments 2 replies
-
Hello About the artifacts you observe when using dense sdfs at high resolution: Surface Value Inconsistencies: Questions About Sparse SDFs:
Please let me know if I should provide c++ or python code about how to set certain parameters. I think you can find all you need in the SDF snippet that comes with the PhysX SDK but maybe further explanations are required. Hope that helps |
Beta Was this translation helpful? Give feedback.
-
Hi @nvtw ! Thank you for your detailed response regarding the SDF implementation. I have some follow-up questions and observations based on your explanations. Regarding Dense SDF Artifacts: Surface Value Inconsistencies: Questions about Sparse SDFs:
The PhysX SDK examples have been extremely helpful in our implementation. Could you please point us to the specific query function we should use for sparse SDFs? Thank you! |
Beta Was this translation helpful? Give feedback.
-
Hey @nvtw! Thanks so much for your help earlier! I've been diving deeper into our SDF implementation and wanted to share some interesting findings & concerns about the SDF values we're generating, especially near the surface of our STL objects. What We're SeeingWe're noticing some inconsistent behavior with our SDF values, particularly when we get close to object surfaces. These little discrepandies are causing our collision detection to behave in unexpected ways. Context & UsageIn our implementation:
As you can see in the first image, even when our tool sphere is clearly not touching the part, the SDF value is telling us there's a collision. The SDF value at that point is 7.37 cm, but our radius is 8.5 cm (visualized as 0.085 m). and hence the distance value is calculated to be -1.12. Our Current SetupWe're running with Dense SDFs at a resolution of 1cm (0.01 meters). Here's the configuration we're using: "SDF_Params:"
"spacing": 0.01,
"subgridSize": 0,
"numThreadsForSdfConstruction": 20,
"bitsPerSubgridPixel": 8 All other parameters are at default values. Additional ObservationsInconsistent Distance ValuesThis visualization shows that points equidistant from the surface vary significantly in their SDF values (ranging from 6-8cm). Surface Point VerificationWhen visualizing all points with SDF values less than 0.1cm, only points below the surface satisfy this condition, while we would expect points both above and below the surface. Attachments
I'd love to hear your thoughts on what might be causing these quirks in our SDF values! Perhaps we're missing something obvious, or maybe there's a setting we could tweak to get more consistent results? Additionally is it possible for the team to provide some code to query a sparse SDF that we generate? I was able to create a sparse SDF thanks to the snippets but I could not find much on querying the SDF Looking forward to your insights, and thanks again for your help with this! |
Beta Was this translation helpful? Give feedback.
-
Hello,
The sdf code in PhysX can handle violations of the above properties to some degree but the meshes in SDF_test.zip are too convoluted. S in SDF stands for Signed, so the SDF code always tries to separate the inside of the object (negative SDF values) from the outside. But with a sheet-like triangle mesh with inconsistent triangle winding, it has no chance to distinguish inside and outside reliably. The SDF it computes will not be correct at all. A mesh with consistent triangle orientation would appear nicely shaded in the screenshot below. The documentation could be clearer about desired properties of triangle meshes for SDF generation but you can find inormation here: |
Beta Was this translation helpful? Give feedback.
-
Hi @nvtw, Thank you for your reply and clarification! I've implemented several techniques to convert our pointclouds and meshes into watertight, manifold versions, then re-attempted querying the SDFs—unfortunately encountering the same inconsistency issues. I also tested with a pre-verified watertight and manifold mesh from GrabCAD, which produced identical problems. I've attached screenshots for your reference. interestingly, we've noticed this issue only occurs when the surface begins to slant at a certain angle (as shown in the attached image), we've seen this behavior closer to the SDF surface for both non-watertight and water-tight meshes Do you have any insights on what might cause these SDF calculation errors? I'm also attaching the zip file containing the mesh shown here. the SDF settings are the same as in the previous reply. |
Beta Was this translation helpful? Give feedback.
-
Following up on my previous post about SDFs (Signed Distance Fields) in PhysX, I'd like to discuss some challenges we've encountered while implementing them in our stack.
Dense SDF Resolution Issues
Breaking Point at Fine Resolutions
We've discovered that Dense SDFs exhibit problematic behavior when the spacing resolution goes below 0.005m. Specifically, we're seeing inaccurate distance values in regions where they should be positive (greater than 0). For comparison, I've attached visualizations showing SDF behavior at:
In these visualizations, we're only displaying the zero-value isosurface (the surface of our meshes). We're trying to understand the root cause of this degradation and potential solutions.
Surface Value Inconsistencies
When examining values near mesh surfaces in our Dense SDF (at 0.01m spacing), we've observed inconsistent distance measurements. Points that should be equidistant from the surface can show variations of up to 1cm. We're looking for approaches to improve this precision.
Questions About Sparse SDFs
We're also seeking clarification about SDFs in the isaac simulator:
I've attached a visualization from the ISAAC simulator for reference.

Any insights into these issues would be greatly appreciated, particularly regarding:
Beta Was this translation helpful? Give feedback.
All reactions