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

performance of rtcOccluded vs rtcIntersect, with only filter-functions running

Sharpe__Brian
New Contributor I
1,606 Views

Hi Intel

In our renderer we're often firing rays that do not need to terminate,  and whose purpose is to simply "visit" each intersection point.
For example:
- accumulating semi-transparent emission along a ray 
- simply accumulate emission*opacity for each intersection point encountered along a ray

Currently, I have this implemented via a filter function,  where the filter function will perform the accumulation, then skip/ignore the intersection point (allowing the ray to pass through the whole scene, up to tfar)

My question is if I could expect any performance gain, or even any change in behavior, between rtcOccluded vs rtcIntersect in this case?
(I'm guessing occluded might be faster as it might use a different BVH traversal strategy, but maybe they're both the same )

thanks!
Brian

0 Kudos
1 Solution
SvenW_Intel
Moderator
1,594 Views

rtcOccluded will be faster for plain shadow rays, as it uses a different traversal order that attempts to find any hit fast.

For your use case I would expect rtcOccluded to be the right choice. If all surfaces are transparent then rtcOccluded will be faster as some sorting overhead during traversal is avoided. If all surfaces are occluders, then also rtcOccluded is best suited, as that is the use case it is optimized for. When you have a mix you can construct cases where the one or the other is faster, but in average I would assume rtcOccluded is the best choice.

 

View solution in original post

0 Kudos
2 Replies
SvenW_Intel
Moderator
1,595 Views

rtcOccluded will be faster for plain shadow rays, as it uses a different traversal order that attempts to find any hit fast.

For your use case I would expect rtcOccluded to be the right choice. If all surfaces are transparent then rtcOccluded will be faster as some sorting overhead during traversal is avoided. If all surfaces are occluders, then also rtcOccluded is best suited, as that is the use case it is optimized for. When you have a mix you can construct cases where the one or the other is faster, but in average I would assume rtcOccluded is the best choice.

 

0 Kudos
Sharpe__Brian
New Contributor I
1,590 Views

Great, thanks Sven!

0 Kudos
Reply