Optix 7 analogue of Uniform Buffer Object for transformation matrices

You cannot simply animate individual geometry in a ray tracer like that because all spatial information gets stored inside acceleration structures during the geometry acceleration structure build.

Means when animating a huge number of individual primitives, you would normally do that by applying the transformations to the geometric primitives yourself in a pre-process, best with a native CUDA kernel since the data should reside on the device for the following acceleration structure build anyway, and then build the geometry acceleration structure (GAS) over the resulting vertex positions every frame.

That sounds slower than it is. See this thread: https://forums.developer.nvidia.com/t/delete-remove-geometryacceleration-best-way-to-go-about-it/160829

If you only have a few geometries to transform of which the topology doesn’t change, you would do affine transformations of that GAS with the 3x4 transformation matrix of an instance above that, and rebuild or update (refit) that instance acceleration structure (IAS) each frame. This is actually pretty fast.

Another nice example video for that in this thread: https://forums.developer.nvidia.com/t/thanks/123134

A simple example with IAS updates for an animation timeline with motion blur can be found here:
https://github.com/NVIDIA/OptiX_Apps/tree/master/apps/intro_motion_blur

1 Like