Intel® Embree Ray Tracing Kernels
Discussion forum on the open source ray tracing kernels for fast photo-realistic rendering on Intel® CPUs.
Announcements
The Intel sign-in experience is changing in February to support enhanced security controls. If you sign in, click here for more information.
266 Discussions

Intersection from Ray Perpendicular to Vertex not Consistent

Iciar
Beginner
867 Views

To find some intersections of triangles in the same plane, I am using Embree to create the scene and then shooting a ray through each triangle vertex going perpendicular to the plane of the triangles. I then use rtcIntersect to find what triangles the ray intersects with in the scene.

This seems to work in some of the cases but in others it is not getting all the intersections. In the image I attached, for example, when I shoot a ray through the red vertex, the intersect function finds intersections with all the triangles except for the one I outlined blue, which also shares that vertex. Does this happen because of the offset in 2D cases to avoid division by 0? Is there any way I could ensure all the triangles that share that vertex and all those intersected are returned?

Thanks.

0 Kudos
1 Solution
SvenW_Intel
Moderator
855 Views

If you shoot rays exactly at a vertex you will not have a guaranteed intersection. You can improve the situation by enabling the RTC_SCENE_FLAG_ROBUST, which will guarantee hits along the edge, but the vertex will still sometimes cause issues.

Principally this can get fixed, but at the loss of some performance. As the library is designed for rendering we have chosen to allow these very rare misses at the vertex.

View solution in original post

1 Reply
SvenW_Intel
Moderator
856 Views

If you shoot rays exactly at a vertex you will not have a guaranteed intersection. You can improve the situation by enabling the RTC_SCENE_FLAG_ROBUST, which will guarantee hits along the edge, but the vertex will still sometimes cause issues.

Principally this can get fixed, but at the loss of some performance. As the library is designed for rendering we have chosen to allow these very rare misses at the vertex.

Reply