- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Assuming I am casting a ray into a scene of spheres using Embree 3.5 (native sphere primitive) . I want to find all the sphere intersections along that ray from tnear->tfar.
Is there a more efficient way to do that than just casting the ray, finding the first hit, then re-casting the ray using a tnear of the "exit" point of the sphere that was hit and so on.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes there is. Please have a look into intersection filters. These are callbacks that get called for each intersection found. You can register such a callback (e.g. store a function point inside the intersection context that is passed to rtcIntersect), add a hit to a list when the callback is called (e.g. you can store a pointer to that list inside the intersection context again), and you let the callback reject the hit in order to gather all hits.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes there is. Please have a look into intersection filters. These are callbacks that get called for each intersection found. You can register such a callback (e.g. store a function point inside the intersection context that is passed to rtcIntersect), add a hit to a list when the callback is called (e.g. you can store a pointer to that list inside the intersection context again), and you let the callback reject the hit in order to gather all hits.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Great, I thought that was possible, but it was not clear on how to reject the hit in the callback.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page