-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
How can I get the closest point on mesh of given points? #193
Comments
The function loss.point_mesh_distance.point_face_distance gives you the distances of closest points on a mesh to the given points, and the indices of the faces which contain those closest points. |
Thank you for your reply! After get these faces, should I use sample from these faces and get the closest point?
|
Sorry, I run the function loss.point_mesh_distance.point_mesh_edge_distance and only get a distance (as I read in your readthedocs), I have no idea how to use it to get the closest point on mesh of given points. |
Hi @linpeisensh
So you will have to call pytorch3d/pytorch3d/csrc/ext.cpp Line 56 in 6a365d2
Here is an example how:
|
@gkioxari |
If I understand correctly, your mesh has only one face? If yes, then yeah you can create a tiny mesh consisting of 3 vertices and one triangular face and pass it through this function, along with the points. |
I have an idea now. Thank you for your reply! Best |
Good luck! I am closing this issue :) |
Hi, do you know how to obtain the closest points on the mesh of given points, not just the distances and indices? Thank you very much. |
Hi, have you found any solution? Pytorch3d is 100 times faster than trimesh, but I do not know how to get the location here. |
Please check the reply to the issue #1016 |
Thank you for your excellent work!
Here is my problems:
Is there function in pytorch3d returns closest point on mesh of given points?
If not, is there function returns the distance between all points on mesh and given points?
Is there any advises to my title problem?
Thank you for your time!
The text was updated successfully, but these errors were encountered: