Accelaration builder

I am using Optix 6.0 and trying to set the accelearation structure with a given builder:

rtAccelerationCreate(context->get(), &acceleration);
 if(RT_SUCCESS!=rtAccelerationSetBuilder(acceleration, "Sbvh") ) {
            std::cerr<<"Could not set builder\n";
  }
  if(RT_SUCCESS!=rtAccelerationValidate(acceleration))
            std::cerr<<"Invalid acceleration";

   const char **builder;
   rtAccelerationGetBuilder(acceleration,builder);
   std::cout<<"Acceleration builder "<<*builder<<"\n";

   rtGeometryGroupSetAcceleration(group->get(), acceleration);
   rtAccelerationGetBuilder(acceleration,builder);
   std::cout<<"Acceleration builder "<<*builder<<"\n";

In the above code the first call to rtAccelerationGetBuilder returns an empty string, and the second call returns “RtcBvh” which is not on the list of supported builders. Moreover setting the builder using rtAccelarationSetBuilder has no effect on this behaviour. Am I doing something wrong?

OptiX 6.0.0 contains two execution strategies: The old one called mega-kernel, used in all OptiX versions, and the new one in OptiX 6.0.0 called RTX execution strategy.

Currently you can switch them with the rtGlobalSetAttribute() function by setting the RT_GLOBAL_ATTRIBUTE_ENABLE_RTX value.

The new RTX execution strategy is the default now and overrides the AS builder setting with one which can be used for the hardware traversal of the RT cores inside the RTX boards with Turing GPUs. That’s one of the many reasons the builders are abstracted.

You can simply ignore the rtAccelerationGetBuilder function, it became pointless. It’s not recommended to use different builders in one scene anyway.

Please find some more information about that in these threads:
[url]https://devtalk.nvidia.com/default/topic/1047102/optix/optix-6-0-quot-rtx-acceleration-is-supported-on-maxwell-and-newer-gpus-quot-/post/5313533[/url]
[url]https://devtalk.nvidia.com/default/topic/1047189/optix/when-not-to-enable-rtx-execution-strategy/post/5313925[/url]

Thanks, that explains a lot. Actually, I wanted to switch off acceleration completely as to force any hit program to be called for every geometry primitive. I will have then to use rtIgnoreInterception function I guess. I am not implementing a ray tracer but Monte-Carlo simulation of particle detector.

Wouldn’t it make sense to combine different AS builders if the scene contains both static and animated geometry? For instance, such that animated geometry could be rebuilt with fast builders, e.g. “Trbvh”, whereas static geometry could be built once using “Sbvh” for the quickest ray traversal. Suppose you could also throw in another “Trbvh” over the scene graph combining static and animated groups, for good measure.

Feel free to try it.
On Turing RTX boards where traversal and triangle intersection is happening in hardware it doesn’t matter because it won’t use what you tell it.
There have been multiple reports on this forum where using different builders didn’t work, but these cases were mostly NoAccel with Trvbh.