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

Closest to location

Patrick_S_4
Beginner
885 Views

For our purposes of using Embree as a ray-tracer in our geometry-accelerated Monte Carlo code, it is sometimes necessary to find the closest intersection to a given location. Would you have a recommendation on how best to do this using Embree?

Thank you for your time.

0 Kudos
4 Replies
SvenW_Intel
Moderator
885 Views

Embree does not include a kernel that could directly find the closest geometry location to a given point. You could approximate this by sampling some directions using ray tracing, but this would be slow and might be not accurate enough.

The best would probably be that you implement this procedure yourself. You could re-use the Embree hierarchies (see bvh_access tutorial in devel branch) or build a new hierarchy using the Embree builders (see bvh_build tutorial).

0 Kudos
pshr
Beginner
885 Views

Reviving this rather old thread...I'm afraid I don't see a clean way to access Embree's BVH the same way that the tutorial does. It seems to access a lot of headers in the Embree source directly. Are there guidelines on how to follow the same build process in an external application?

0 Kudos
SvenW_Intel
Moderator
885 Views

No there is no other way and we also recommend best not to access the internal BVH. It is by definition an opaque data structure for the application. If you need a BVH for your app, best use the BVH build API of Embree to build a BVH in some application defined layout.

0 Kudos
pshr
Beginner
885 Views

That makes sense. I'll look into using that instead. Thanks!

0 Kudos
Reply