subd not watertight

subd not watertight


I have a test case where a subd intersection is missed in Embree 3.5.0. I'm using these scene flags:

rtcSetSceneFlags (scene_, RTC_SCENE_FLAG_ROBUST | RTC_SCENE_FLAG_DYNAMIC |
    RTC_SCENE_FLAG_CONTEXT_FILTER_FUNCTION);

these geometry flags:

rtcSetGeometryBuildQuality (geom_, RTC_BUILD_QUALITY_REFIT);

and these context flags:

rtcInitIntersectContext (&context);
context.flags = RTC_INTERSECT_CONTEXT_FLAG_COHERENT;

Should I expect robust watertightness with these settings? >99.9% of the intersections are detected correctly but any misses in my particular application are problematic so I'm not sure how to proceed.

6 posts / 0 new

One random thought I had was to fire small ray packets separated by tiny epsilons and compare their results, but that seems like a potentially complex, heavy handed solution.


One more bit of info, the miss (I've only seen one so far) occurs on a quad face sharing a valence 5 extraordinary vertex, I don't know if that is a coincidence or not.


This screenshot is not for debugging, just for context. I am using Embree to project geometry onto subd surfaces, not a typical ray-tracing application but so far it seems to be a very promising approach. You can see one vertex is missing the surface causing a large distortion. The ray origin is not near the surface so that isn't the issue.

Attachments: 


Best Reply

This problem is already know to us for a long time, but is tricky to fix because of the way Embree operates to tessellate the subdiv surface. If watertightness is a concern, then please use OpenSubDiv to create a mesh and render that mesh with triangles in Embree.


OK, I'll try OpenSubdiv. You reccomend RTC_GEOMETRY_TYPE_TRIANGLE, not RTC_GEOMETRY_TYPE_QUAD?

I did see this in the docs which makes sense of course:

Note that edges may be shared between (typically 2) faces. To guarantee a watertight tessellation, the level of these shared edges should be identical. A uniform tessellation rate for an entire subdivision mesh can be set by using the rtcSetGeometryTessellationRate function. 

But I'm using the uniform rtcSetGeometryTessellationRate so I thought that implied watertightness. Anyway, thanks for your help, let me know if you need a test case.

 

Leave a Comment

Please sign in to add a comment. Not a member? Join today