I have a half/sphere geometry , radius 1, of about 325 triangles. The triangular geometry is properly connected with no overlapping/'duplicated' nodes. I am firing rays from the origin towards the surface of the sphere. As a test of robustness I set up the rays to be directed towards the 3D "nodes" that make up the geometry. I am finding some ( say 1-2%) of the rays are recording "no hit". Obviously there is a question of geometric robustness when a ray is hitting right at a 3D node shared by maybe 4 triangles. But I thought embree would be particularly robust when dealing with this type of problem. What am I missing here? I am using 2.16.5
Upgrading to 2.17.2 did not make any difference to this issue. There are many use cases that require the intersection routines to be geometrically robust. I understand how a point on a boundary could be missed, but this ray is intersecting the geometry at a location where a number of triangles meet. It is indeterminate which triangle should be selected, but it should pick one.
The robust ray/triangle intersector used by Embree uses a consistent edge test (consistent for neighboring triangles) and conservative ray/box intersection during traversal. This algorithm makes the mesh ALMOST watertight, in particular along the edge where most algorithms have problems. However, exactly at the vertex there can still be issues.
A fix could be to add a small epsilon at kernels/geometry/triangle_intersector_pluecker.h, by replacing minUVW >= 0 | maxUVW <= 0 by minUVW >= -eps | maxUVW <= +eps.
OK, I do notice that it does work well along the edge. Now I know where to look, I can go into at the code and make the suggested change to see if this fixes my issue. I would suggest this change should be rolled into the master branch for 'robust mode'.