Does the vertex/poly/tris count of hidden objects in an aircraft negatively
affect performance? For example, let’s say that we have two insanely detailed
objects inside the cockpit. Is there a difference between only one being shown
at a time (via visibility code) versus both of them showing or neither of them
showing?
Hello @MV-JimStewart I expect some performance gain from hiding these objects,
at least on GPU side. @OptimalCoyote89 will be able to provide a better answer
on this. Regards, Sylvain
Following…
Showing two at the same time will be significantly worse for performance than
showing one at a time. Showing neither (by hiding with visibilty code) is very
efficient from the renderer’s POV. Since the renderer does not use hidden
objects, there should be no significant rendering performance impact while the
object(s) remains hidden. It does have an impact on memory, of course, as it
the vertex data remains in memory for as long as the LOD is active (+ some ~30
seconds after it was last used by any model). There is a minor CPU cost for
the visibility code being executed every time the model is animated. Note that
this applies to all simobject and scenery meshes, not just aircraft.
How about if an object is out of sight but not hidden through visibility code?
For example, if I make a very detailed wheel well, those details can only be
seen if looking under the plane. If I’m viewing the plane from the top, will
those wheel well details have any impact on performance? Thanks
It depends. There is a camera frustum culling step done after the animation
phase. It intersects the camera viewport frustum with the bounding spheres of
the meshes. If this bounding sphere does not intersect with the frustum, the
GPU will not render the mesh. Note that this frustum culling does not care
about whether the mesh is obscured by another. The frustum culling does have a
performance cost on top of the rest, but if the mesh is culled then the
renderer will not render it. So, in your example, when viewing the plane from
the top, the wheel wells will have an impact on performance.
Thank you! Very helpful
Thanks for the answer!