I know that this question has been asked here before and there is a reply discussing to create a secondary mesh, but the answer is too vague (or maybe it's just that I don't understand it) and the way this is handled in the Interpolation tutorial is very obscure to me and I cannot understand how it works.
What I want to do is to work with objects that can be either:
* Triangle meshes (rtcNewTriangleMesh2)
* Quad meshes (rtcNewQuadMesh2)
* Subdiv meshes made of a mixture of triangles and quads (rtcNewSubdivisionMesh2)
* Hair objects (rtcNewBezierHairGeometry2)
For each of those objects, after a ray intersection where I get ray.u and ray.v, I want to interpolate some per-face/vertex UV coordinates. So I was wondering if to do the interpolation myself or (probably better) to use rtcInterpolate to do it.
Unfortunately rtcInterpolate is only for Vertex data and not for Face/Vertex data. So, I was considering making these secondary auxiliary meshes but I don't really understand how to do it. Also, I'm not too happy having to duplicate (or more) the RAM needed to store Embree objects.
Perhaps for triangle/quad and subdiv meshes made of tri/quads it's not necessary to use rtcInterpolate? Or due to performance reasons it's better to use it despite duplicating RAM?