Search public documentation:
With GPU profiling there are a lot of complicated characteristics. The rule of thumb with regards to GPU performance is to always experiment. Pixel shading is the main time consuming work that the GPU does. Another GPU cost is transform/skinning, which is dependent on the number of vertices in the mesh. Skinned vertices cost much more than static mesh vertices.
- Fewer Complex Particles - It is better for performance to have a particle system that uses fewer complex particles than to have numerous simple particles. If an effect created by numerous particles can be created in the material and applied to a single particle that is preferable.
- Limit Screenspace Coverage - If you can limit the amount of space any particle effect takes up on screen, that limits the impact of the overdraw from the effect.
- Limit Overlapping of Effects - Overlapping of multiple effects amplifies the overdraw impact of any single effect. If possible, detect when multiple effects need to be spawned in the same location and only spawn a single effect instead.
- Match Geometry to Visible Material Area - It is actually more efficient to add extra detail to the mesh to make it more closely match the visible area of the material being applied to it than to use simple geometry with tons of wasted pixels.
- Remove Specular - Unless it is absolutely necessary, masked materials should remove any specular component to make the calculation of the wasted pixels as simple as possible.
- Use Non-Directional Lighting - Using non-directional lighting can lighten the instructions needed to calculate the lighting for the wasted pixels, resulting in faster performance.
Static lighting and lightmaps are far and away the most efficient method of lighting surfaces. It is always a good idea to limit the number of dynamic lights affecting surfaces in your levels. The goal should always be to have as much of the level as possible being affected by 0 dynamic lights, especially parts the player will never see up close. The Light Complexity view mode can help here as it displays the world in terms of the number of dynamic lights affecting the surfaces. The lighting of dynamic objects can be a huge drain on performance. SkeletalMeshActors, KActors, InterpActors, etc. can make up a large part of the world and lighting these objects without any special techniques can be disastrous. DynamicLightEnvironments provide a method to light dynamic objects while limiting the impact on the GPU. Instead of a pass being made for each light on each object, al the lighting is condensed into a single light and pass. Of course, this comes with certain drawbacks as the lighting and shadowing cannot be 100% accurate. It is advisable to always use DynamicLightEnvironments whenever possible; however, there may be situations where accuracy or quality is paramount. In these cases, such as with cinematics, exceptions can be made.
Another potential source of performance problems is dynamic shadowing. A quick way to gauge whether dynamic shadowing has an impact on performance is to toggle it off via the
SHOW DYNAMICSHADOWSconsole command. It is advisable to bind a key to this command, so that while the key is pressed dynamic shadows are turned off and then enabled again when the key is released. This can be done from the console - for example:
SETBIND F SHOW DYNAMICSHADOWS | ONRELEASE SHOW DYNAMICSHADOWS. For Actors created in UnrealScript we want to make use of ShadowParenting. This basically means that one actor can have LOTS of attachments but there is only one Dynamic Shadow cast. When you have a Pawn with a weapon, a helmet, a backpack, and some other attachments you want have all of the "attachments" shadow parented to the pawn itself. You do that by: Attachment.SetShadowParent(Parent.Mesh) Shadow Buffer Filtering Options page for more details. Also see the Shadowing Reference page and Modulated Shadows page for more shadow optimizations.
Unreal Editor viewports can be set to render using various View Modes which are used to display a specific aspect of the scene in a meaningful manner. Shader Complexity section of the View Modes page. Light Complexity section of the View Modes page.
Sometimes you are shipping on multiple platforms where one doesn't quite have the GPU power of the others. Instead of making your level not look glorious on the platforms which can handle it, you can selectively turn off detail in your maps via DetailMode. This allows the same map to be used on multiple platforms. Additionally, you may have modes such a splitscreen which really crush the GPU. Not rendering visual-only detail is a great way to allow for splitscreen and still have a visually compelling map for non-splitscreen. Every Component has a DetailMode which can be set. Setting something to High Detail will make it only render when High Detail is allowed: