In OptiX, Transform can only have child of type Group, GeometryGroup, Selector and Transform. To support geometry instancing, I need to create a GeometryGroup before I can apply Transform on the Geometry. But according to OpitX’s Performance Guidelines, scene graph should be made as shallow and minimal as possible (for static scenes, a single GeometryGroup is the best).
Alternatively, I can store a transform matrix on GeometryInstance and transform the ray manually in Intersection program and Closest Hit program. But then I may need to do the transform for many times if there are many triangles in the mesh, although the transform matrix is the same for all triangles in that mesh.
So which method is better? And why OptiX doesn’t allow Transform Node to directly have Geometry Object as its child? Thanks!