I have been trying to develop a way to effectively allow disabling a node and also deal with deformable meshes where the top level bounds will change over time but the extents of this change is predefined.
For disabling I can obviously remove the transform node from its parent group but I was wondering if we could do things a bit more cleverly or efficiently and bypass the need to change the optix node hierarchy at all and any potential recompilation that may go with that for some circumstances.
The essential idea would be to be able to tell OptiX to use a specified top-level bounds for a model or to be able to define that the top-level bounds may only grow in size so that the parent acceleration structure never actually need be recalculated in the case of the animated model.
I don’t think there is currently any means to set the top bounding volume for a model as it is derived from the bounds of all the primitives. With added functionality to set the bounds to zero size at the top level or in the parent acceleration the model could be effectively removed/disabled from the rendering. This would incur the most minimal cost cost whatsoever. Only a single bounds would need-be updated as the rest of the acceleration would be unaffected. This access to give a hint to the acceleration could be really useful in this situation. Alternatively just some way in which we can ‘hint’ that the child of a group or a node is not to be intersected against to achieve the same goal.
Other alternatives include a selector node around each object but we have found these to have some cost, partly due to a per-node overhead within OptiX with thousands of models. This will hopefully be fixed in v3.x with any hope so maybe this could be the way to go again? This would allow us to just set a boolean variable and intersect the child based directly on this. However this overhead seems a waste when it could be done in the acceleration itself which has no computational cost.