Access information about scene graph outside OptiX

I need to access the current absolute world orientation and position of a node of the OptiX scene graph outside of an OptiX proram but within a CUDA kernel.

Is there any other way than to calculate the transformation matrix myself (e.g. on host side) and store this information separate from OptiX in an additional GPU buffer?

If this is currently my only choice, could this kind of OptiX-CUDA interop be added in a future release?

What about using device pointers for an OptiX buffer? Could it work in your case?

Suppose I have an OptiX scene graph like this:

For each frame I do the following:

  1. Update Transform1, Transform2, and Transform3 using rtTransformSetMatrix
  2. Launch Optix ray tracing
  3. Post process the ray tracing results

The post processing step is done via a CUDA kernel which needs to know the world position/orientation of each GeometryGroup.

I don’t think I can get a device pointer to the Transform’s internal matrix, can I?

As far as I know Transform nodes’ internal matrices aren’t exposed/accessible directly (i.e. via a device pointer) mostly for consistency and performance reasons.

I agree that it would be nice to have such a feature, I’ll ping that to the developers.
In the meantime if someone else has another solution…