Intel® Embree Ray Tracing Kernels
Discussion forum on the open source ray tracing kernels for fast photo-realistic rendering on Intel® CPU(s)
285 Discussions

rtcInterpolate with subdivision surface in dynamic scene

Burr__Adam
Beginner
1,233 Views

I'm building a dynamic scene containing subdivision geometry with continuously updating vertex buffers. I'm making rtcIntersect calls in that scene and the intersections points are updating correctly.

Also, for each intersection I'm calling rtcInterpolate on the vertex buffer and using the calculated tangents to construct an interpolated normal. That works correctly on the first frame, but if the vertex buffer is changed the tangents are no longer correct. Deleting and rebuilding the geometry rather than updating the vertex buffer fixes the problem.

I'm guessing that your suggested solution might be to use OpenSubdiv rather than the built in subdivision geometry. I am planning to make that change anyway so if that will also solve this problem I should be OK going forward, but I thought I would ask in case I might be doing something else wrong.

0 Kudos
1 Solution
BenthinC_Intel
Employee
1,233 Views

Hi Adam,

just double-checking: After updating the vertex array you notified Embree about the changes by calling rtcUpdateGeometryBuffer(...) and rtcCommitGeometry(...)?

View solution in original post

0 Kudos
2 Replies
BenthinC_Intel
Employee
1,234 Views

Hi Adam,

just double-checking: After updating the vertex array you notified Embree about the changes by calling rtcUpdateGeometryBuffer(...) and rtcCommitGeometry(...)?

0 Kudos
Burr__Adam
Beginner
1,233 Views

 I was calling rtcCommitGeometry  but not rtcUpdateGeometryBuffer, I must have missed that change when upgrading from v2 to v3. I'm surprised the rtcIntersect calls seemed to work without calling rtcUpdateGeometryBuffer, only the rtcInterpolate failed, but both are working now, thanks!

0 Kudos
Reply