I have used Embree for 3D intersections with great results and now I'm trying to use it for UV intersections/overlaps in 2D. I have been trying different methods but I am not getting much of a speed improvement as I did with the 3D intersections so I was wondering if you have any recommendations on what method might be best to use.
To check for intersections I am using the edges of the UV as the "rays" to use in rtcIntersect1
The approaches I have thought of so far:
The slow down comes also from having to do some additional post-processing with these methods to avoid intersections of adjacent faces and make sure face that are overlapping right on top of each other are accounted for. In addition, there are more edges than faces, so checking for intersection per edge is slower than checking for intersection per triangle.
Any thoughts on which of these methods might be more efficient? Any other approaches to this problem that could help speed it up?
I think it would make sense to use Embree's external BVH builder interface to build your own 2D BVH over the UV domain and implement custom traversal with 2D overlap detection. That's likely the path which gets you the highest performance.