Intel® Embree Ray Tracing Kernels
Discussion forum on the open source ray tracing kernels for fast photo-realistic rendering on Intel® CPU(s)

Getting "tnear" and "tfar" of a UserGeometry BoundingBox?

Allan_H_
Beginner
326 Views

 

Is is possible to get the points (or the parametric variables) where the ray crosses the user geometry BoundingBox while inside the intersection function? Right now the public API only provides the "UserObject" ptr, the ray and the "geom_id".

 

For now I'm storing the BoundingBox inside my "struct UserObject { ... };" (as in the API Docs) along with my geometry, then, to test for intersection, I do an AABB intersection test to find the hitpoints of the bounding box before processing my geometry. I believe Embree already computes these hitpoints when doing its BVH traversal, so I was wondering if I can reuse these values already computed by Embree.

0 Kudos
1 Solution
SvenW_Intel
Moderator
326 Views

No there is no way of getting these tnear/tfar values. They might not even get calculated by Embree, e.g. if the BVH builder puts two user geometries into one leaf node.

View solution in original post

0 Kudos
1 Reply
SvenW_Intel
Moderator
327 Views

No there is no way of getting these tnear/tfar values. They might not even get calculated by Embree, e.g. if the BVH builder puts two user geometries into one leaf node.

0 Kudos
Reply