Search public documentation:
The two big rendering thread costs are determining visibility and then submitting draw calls to the GPU. These are both mostly dependent on the number of visible sections/elements, which is determined by the number of meshes visible and how many sections each of those meshes has. The important thing to remember for rendering thread cost is that the cost is doubled in split screen! Always look at the split screen performance when profiling the rendering thread.
When the RenderThread time is high and you want to figure out what is causing it to be slow. Sometimes it could be a single object that has the incorrect flags set on it (e.g. it is casting a HUGE dynamic shadow over the entire level). When doing an actual profiling run, the following can be helpful:
- Trace Render will do a single frame trace (this is good if you can get to an area that is especially poor performance)
- Sample Profiling: Is great when you have sort of run of the mill performance and not real spikes.
STAT INITVIEWS, but Visible Dynamic Primitives also factors in.
- shows the render thread is taking 50 ms.
- Then run
- shows that 25 ms is in the RenderViewFamily
- leaving us with 25 ms that the render commands are taking up
- Finally, run
- we see that there is 25 ms in AddLight RT
- we see that it is being called 10 times a frame
- We then need to go look at who is calling AddLight via a break point. And see why adding a specific light or lights is so slow. Usually it is the case that a specific light being added in a way that is doing more work than actually needs to be done. (e.g. attaching / reattaching it)
There are several related optimization techniques that can be done by the designers and artists to help improve the RenderThread performance. In optimizing RenderThread performance, it is important to minimize the component count of static meshes, skeletal meshes, SpeedTrees, terrain, etc. Minimizing the number of elements per mesh is also extremely important. This usually means limiting the number of unique materials used on the mesh. VisibilityCulling for information on the available culling methods in Unreal Engine 3.
- Decals: Reduce the max number that are alive at once
- Duration Objects Live: Reduce the lifetime of effects type objects (e.g. Gibs)
- Reduce the number of Decals that can be attached to SkeletalMehes
- For AI characters, don't do many visual things (e.g. you are playing Horde. No need for each bullet impact to have a blowout decal spray or effect)
[SystemSettingsSplitScreen2] DetailMode=1This setting means those meshes set to high detail mode will not be drawn or have any rendering overhead in split screen.