Intel® Embree Ray Tracing Kernels
Discussion forum on the open source ray tracing kernels for fast photo-realistic rendering on Intel® CPUs.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
265 Discussions

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

Allan_H_
Beginner
196 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
196 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

1 Reply
SvenW_Intel
Moderator
197 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.

Reply