Hi there -
Thank you Pixar for sharing OpenSubdiv!
We're currently evaluating how we can use OpenSubdiv in a toolset that already uses our own mesh pipeline that's based on triangles for various reasons. What we've come up with is
a) Build an OpenSubdiv representation of the mesh when needed and use it to evaluate point on a limit surface, this is less refactoring on our end but also leads us down the path of trying to come up with the best way of saying "I have this point on this triangle and need to derive where it sits on the limit surface". Having spent a few days with the OpenSubdiv code and speaking with a few folks familiar with it, this isn't trivial as retaining any sort of relationship between the input triangle mesh and the resulting subdivision surface is hard.
b) Completely refactoring our geometry pipeline and replace our TriMesh implementation with OpenSubdiv. This is a much bigger task (though feels like the correct one) though there are a few unknowns.
- we have to pick random points on the geometry, we do this now by picking a random triangle and barycentric coordinates, with OpenSubdiv I assume this would be picking a random patch at some subdivided level and picking the random s & t?
- what would be the "correct" way of deriving the surface area of a patch?
- there are some cases where we might want to actually match the "flat" triangle surface vs. a smooth subdivided surface and we'd like to do this with the same code path. Can we force all edges in the input mesh to be hard thus effectively resulting in a surface that would match a flat polygonal model?
Any thoughts on either of these paths would be appreciated.
Lastly, is there any support for closestPoint or rayhit testing in the API anywhere? Or is left as an exercise for the user?
All the best,
Colin