Optimization/Tips/Errors
Last updated
Last updated
You can enable DirectX12 for increasing your performance from Project Settings-> Platforms -> Windows -> Default RHI:
Hierarchical Level of Detail (or HLOD), in its simplest form, is a way to combine pre-existing Static Mesh Actors into a single HLOD Proxy Mesh. Using HLOD may lead to increased performance as they reduce draw calls down to one call per Proxy Mesh as opposed to a draw call for each individual Static Mesh Actor.
Hierarchical LOD Volume
You can place this volume around Actors you want to be grouped in the same cluster. It can be helpful to make this slightly larger than the Actors you wish to include and should not be tightly bound to them. Once you have placed the volume around the Actors you can use the option Generate Clusters from the HLOD Outliner to create a new cluster with these grouped Actors.
To generate an HLOD Volume for a generated building, you can select a modular piece of the building and press “Generate HLOD Volume”.
HLOD Volume created for a generated building:
Steps for enabling the HLOD System for your level:
From the Level Editor Toolbar, click the Settings button, and select World Settings.
Next, inside the World Settings menu under LODSystem, enable the Enable Hierarchical LODSystem option.
Finally, go to the Window option and select Hierarchical LOD Outliner.
Check “Only Generate Clusters for Volumes” to make the clusters only for HLOD Volumes, after that, press the “Generate Clusters” button.
Hierarchical LOD – Clusters generated:
Press “Generate Proxy Meshes”
The left building (one mesh) is a proxy mesh of the right building (520 meshes).
If you enable Generate Mesh Distance Fields it will activate the Distance Field Shadows.
Distance Field Shadows work much more gracefully in the distance, doing shadowing work only for visible pixels. Cascaded Shadow Maps can be used to shadow an area near the camera while RTDF shadows will shadow farther regions up to the Distance Field Shadow Distance that is set.
You can enable Generate Mesh Distance Fields from Project Settings:
Example:
This will help to have shadows in the further regions, better Ambient Occlusion, and an optimized scene because now you can decrease the “Dynamic Shadow Distance” from the directional light and still have high quality shadows in the level. (Only if you use Shadow Maps, not Virtual Shadow)
You can find more about these subjects here:
Mesh Distance Fields: https://docs.unrealengine.com/en-US/Engine/Rendering/LightingAndShadows/MeshDistanceFields/index.html
Distance Field Shadows: https://docs.unrealengine.com/en-US/Engine/Rendering/LightingAndShadows/RayTracedDistanceFieldShadowing/index.html
Distance Field Ambient Occlusion: https://docs.unrealengine.com/en-US/Engine/Rendering/LightingAndShadows/DistanceFieldAmbientOcclusion/index.html
You can decrease the quality of settings to increase the performance. As default, the quality of the setting is "Cinematic", you can change it to "Epic" or "High" and you'll increase your performance with no big difference in graphics quality.
In UE5:
Material Quality Level
You can decrease the material quality level to increase the performance. The master materials are optimized, using the Quality Switch Material Expression nodes to disable some expensive Material parts if lower the Material Quality Level. This could be useful for low end platforms.
This will improve the performance and also the graphic quality because it will be affected by Distance Field Shadows/Ambient Occlusion.
1. Select the building that you want to bake into a static mesh. Select the “Building” Component from “Details” tab and press on the "Create StaticMesh" Button from the "Procedural Mesh" category:
2.Choose the location and the name of the new static mesh:
3. Delete the building blueprint from the scene and put the new static mesh building in the same location.
This could help to increase performance in some cases.
1. Select the actors
2. Open “Merge Actors” tool (Windows/Developer Tools/MergeActors)
3* Optional - Check “ReplaceSource Actors”
4. Press “Merge Actors” and save the new mesh.
If you have an “Out of memory issues” Error when you open a scene from the project, it is very possible to create that project using another template than the “Game”. - In Unreal Engine 4.
There are 2 ways to solve this issue:
1. Use the “Games” template for your project.
2. You can use any other template for your project but you should decrease the Reflection Probes Resolution from 2048 (which is huge) to 128 (Edit - Project Settings - Engine - Rendering – Reflections).