-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SDF gradient outside of the bounding box #13
Comments
Apologies, I realized only now that the margin is available, amazing! However, I have a question:
prints
Why did you decide to use the max for the final bounding box? |
Why did you decide to use the max for the final bounding box? Hi @quagla. I'm getting the max of the bounding box right now because I suppose the octree subdivision starts at depth zero. I should change this to adapt better to the requested bounding box. I will add it to my to-do list. Also, a few weeks ago, I added a new heuristic for the subdivisions, which allows the user to define the maximum desired error regarding the distance to the surface. This feature makes it easy to have bigger boxes without requiring much disk space. At the moment, this feature is only at the development brunch. Could it be useful for your use case? which computes the SDF as the sum of the distance from the bounding box and the SDF evaluated at the closest point that is on the boundary of the box. Is there any reason not to use this trick directly in SdfLib? I think is a good approximation for far points. I will integrated inside the getGradient function. Thanks for the suggestion! |
I am having some issues using the SDF for collisions when the query points is outside of the bounding box. I came up with a workaround:
https://github.com/google-deepmind/mujoco/blob/main/plugin/sdf/sdflib.cc#L121
which computes the SDF as the sum of the distance from the bounding box and the SDF evaluated at the closest point that is on the boundary of the box. Is there any reason not to use this trick directly in SdfLib?
It would be even better if it was possible to select the domain of SDF independently from the bounding box, so one could make it a little larger to avoid this issue in practice.
The text was updated successfully, but these errors were encountered: