Optimization

The optimizations below are suggestions for best performance but don't have to be strictly adhered to in all situations.

Display Resolution

Traditional rasterization engine performance is affected mostly by triangle counts. Ray tracing is affected mostly by display resolution.

Bounding Boxes

For performance reasons with ray tracing, it is important for models/meshes to avoid large empty space in their bounding box. Significant empty space in the bounding box around a model causes uneeded ray hit tests against the model, adversely affecting performance.

When imagining a bounding box around a model, the bounding box should fit as tightly as possible to the outline of the model. If the bounding box does not fit well and leaves signicant open space, the model should be reworked into separate parts (as a prefab), then loaded into the engine. By doing this, each part will have its own tighter fitting bounding box, and the large empty space will be reduced or eliminated.

Interiors

Bounding boxes are particularly important for interiors. If the camera can enter a room, building, cave etc., the interior model should be separated into sides, walls, floor, ceiling, columns etc. as a prefab, so that the main space of the interior is outside of any bounding box.

The core principle is that cameras should avoid entering bounding boxes of models or terrain whenever possible. Sometimes it's unavoidable and that's ok.

Terrain Bounding Boxes

Terrain should be divided into separate meshes for better performance. Bounding boxes of the terrain should considered to reduce as much as possible any bounding box space the camera would be inside.