A few questions about BVH traversal engine and triangle intersection engine


I’m doing some study on ampere architecture and am a little confused about two engines ampere architecture uses (BVH traversal engine and triangle intersection engine).

here are my questions:

  1. Can these two engines be used independently by user? If so, is there any API in optix regarding this?

  2. Can the triangle intersection engine processes other intersection methods and acceleration structures defined by ourselves? If it can, will there be a performance loss? If not, self-defined intersection methods will be handled by which part of the ray-tracing core?

  3. Can engine detect different kinds of bottom-level acceleration structures and processes ray-geometry intersection differently? For example, processing triangle geometry with triangle intersection engine and other geometries with different engines? If so, can this be done automatically, or should we set it by ourselves?

  4. Will BVH traversal engine and triangle intersection engine work in pipeline automatically? For example, BVH traversal engine handles the tree traversal while triangle intersection engine processes intersection calculations BVH engine throws out?

I’m not sure if i ask these in a right place but any reply will help. Thanks.

1.) The BVH traversal through the acceleration structures happens automatically when invoking optixTrace inside your OptiX device code. On RTX boards that is hardware accelerated by the RT cores. GPUs without RT cores run that on the streaming multiprocessors (SM). There is no way to control that mechanism.

2.) The ray-triangle intersection done in the RT cores is handling exactly that case only.
That’s why there are built-in triangle primitives in OptiX which do not need an intersection program in their hit record.
All other primitive types are effectively custom primitives which all use an intersection program on the SM that you either implement yourself or query from OptiX for the built-in curves and sphere primitives (see OptixPrimitiveType).

All OptiX device code you provide runs on the SMs.

3., 4.) The respective intersection program is called by the BVH traversal for any leaf AABB automatically.
For custom primitives that will interrupt the BVH traversal and callback into the intersection program running on the SM which is slower than when intersecting built-in triangles which would stay on the RT cores.

You can of course build an intersection program for triangles if you want but that will definitely be slower than the hardware which is also watertight.

This all happens automatically because you built the geometry acceleration structures (GAS) for the different geometric primitive types. The BVH traversal knows if it needs to intersect a built-in triangle or a custom geometric primitive.

Please have a look through this search result for related topics on this OptiX forum for more details.

There is also a recurring GTC presentation about What’s new in OptiX 7 for different releases you can find on https://www.nvidia.com/en-us/on-demand/ in which tips and tricks about hardware raytracing performance are explained.