Hey folks, stuck a little with a problem I'm having. I have two meshes, one is pretty simple and the other is much higher-poly. For each vert in the low-poly mesh, I want to see which vert in the higher-poly mesh is closest to it (the low-poly vert).
Now I could just run through all the positions of each vertex in the higher-poly mesh and sort them. That isn't suitable because how long it would take.
I'm not aware of any kind of quick function that does this. So I was thinking of essentially creating a small sphere in the low-poly vert's position, and doing an intersects check, if false, its radius increases, until it finally intersects the high-poly mesh.
At this point I wanted to somehow check which poly(s) in the high-poly mesh it was intersecting, and then check only the verts used in those polys.
I have no idea how to check which polys are being intersected though.
So I thought I would post here and see if anyone had any idea how to do that, or whether there's actually a better method for this. Thanks!
Replies
http://www.matthewlichy.com/turboTools.html
If you want to do it yourself, look into MeshProjInterSect()
MeshProjIntersect() is a voxel method, so it's very fast when looking up positions. It can take a tiny bit of time to create the voxel grid at first, but it's not bad. I think the ideal/good size for most operations is 250.
You could also use RayMeshGridIntersect() , but like they say in that thread, you can run into issues with it sometimes. I think in testing, I found MeshProjIntersect to be faster and more reliable.