Hi everyone !
Again, congratulations for your incredible work, I mean it.
I still have another question concerning Embree's subdivision surfaces: is there any simple way to interpolate face-varying data (typically texture coordinates) across the smooth surface?
It seems rtcInterpolate only handles vertex-varying data, and I naturally cannot duplicate vertices if I want my smoothed surface to remain watertight.
What would be the nicest approach to tackle this issue?
I did try to store the texture coordinates in a separate buffer, and straightforwardly use ray.u/v to interpolate them across my low-poly surface's faces (following the documentation's interpolation rules for triangles and quads). I hoped the result would correspond to texture coordinates that had not been smoothed, but would be useful.
It did not end well at all unfortunately. Turns out the ray.u/v are very different depending on the tesselation level used to smooth the surface.
I am no expert when it comes to subdivision surfaces, so any help is more than welcome.
Thanks in advance.
I am quite embarassed actually.
It turns out there was an face data indexing bug in my code that corrupted my interpolated texture coordinates.
It works like a charm now.
Sorry for the bother and keep up the good work!