- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm starting to develop a ray tracing application using Embree.
What I managed to do :
- Create an accelerator structure.
- Create an intersector from this structure.
- Intersect some rays with triangles.
My problem is that no matter what direction of propagation the ray has, I always get the same id0 and id1 parameters (0 and 0) in the generated Hit object. I guess this is because all the triangles are considered to be in the same primitive.
However, I need to be able to identify which triangle my ray did intersect. So my question is : is there a way in Embree to identify it or should I do it by myself ?
Thanks,
Hamza
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Problem solved : I hadn't understood the meaning of id0 and id1.
One should actually set their value to what needed (an index corresponding to the triangle ID, for example) while building the BuildTriangle * object and this value would be available in the Hit object generated.

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