I have a scene that will be mostly triangle meshes, but I also have some sphere, parallelograms, and capsules for light sources. Is it recommended to create two separate groups? Then use the specialized triangle accelerator of the triangle soup group, and a regular Trbvh on the shape group?
Should the root (parent of the two groups) have an accelerator too or NoAccel?
Yes, since the acceleration properties (buffer names and strides) for the specialized triangle builders are per Acceleration node, it’s necessary to partition that into an own acceleration structure at an own GeometryGroup for best results.
The custom geometric primitives can be handled by one acceleration structure because you define the bounding box and intersection programs for them, so OptiX only cares about the BVH traversal and doens’t actually know what’s inside the AABBs.
The root group should use the same acceleration structure builder/traverser as the children.
NoAccel would only be useful for very small scenes and always in the view, but there had been cases where mixing builders has not worked. Just use Trbvh for everything.