Video Summary

UE5 Optimization Made Easy: Fundamentals

Dallas Drapeau

Main takeaways
01

Start optimization in the planning phase and pick a target framerate—this shapes asset, lighting, and LOD decisions.

02

Test early and often to discover whether Nanite, Lumen, RTX, or traditional workflows fit your project.

03

Use complexity view modes to diagnose light and shader costs; aim for mostly green shader complexity.

04

Reduce light complexity by deleting unnecessary lights, lowering attenuation radii, or disabling shadow casting.

05

Minimize quad overdraw and masked foliage; merge separate meshes and prefer Nanite/LOD-optimized foliage where appropriate.

Key moments
Questions answered

Why should you decide a target framerate during planning?

The target framerate dictates asset complexity, lighting approach, and LOD strategies—e.g., 120 FPS favors simpler geometry and baked lighting, 60 FPS allows more complex assets and possibly dynamic lighting, and lower targets enable cinematic detail.

What are practical ways to reduce light complexity in UE5?

Delete or disable unnecessary lights, reduce attenuation radii so lights don't overlap excessively, and turn off shadow casting for lights that don't need it to lower per-frame cost.

How does the shader complexity view mode help optimization?

Shader complexity highlights material cost per pixel—green indicates cheap materials, while bright colors indicate heavy shaders (transparency, many layers/parameters). Use it to simplify materials and remove expensive features where possible.

What causes quad overdraw and how can it be mitigated?

Quad overdraw comes from many overlapping transparent or masked meshes rendering front-to-back; mitigate it by reducing transparencies, merging separate geometry, using LODs, and converting masked foliage to Nanite- or LOD-optimized setups.

When should you avoid extremely high-resolution textures like 8K?

Avoid 8K textures for most assets—reserve very high resolutions for large singular pieces. Use lower resolutions (1K–2K or even 512) for small props and rely on streaming to maintain performance.

What are raster bins and why do they matter?

Raster bins group pixels that share the same rendering state. Ensuring assets share materials and similar rendering states reduces state changes and improves GPU efficiency, especially when importing varied asset packs.

The Importance of Optimization Planning 01:30

"Optimization is not something you do just at the end of your game; it's something you're going to be doing throughout the entire process."

  • Effective optimization begins in the planning phase of game development rather than being an afterthought.

  • Developers should ask themselves critical questions about their project's target frame rate, as this directly influences workflows and asset development strategies.

  • Understanding the desired frame rate—whether it's 120 FPS, 60 FPS, or something lower—dictates the quality and complexity of the game's assets and workflows.

Choosing Your Frame Rate Wisely 02:18

"Not every game is built to be 120 frames per second; knowing what your target frame rate can help define your pathways forward."

  • Different target frame rates require different optimization strategies and design decisions.

  • Aiming for 120 FPS generally leads to simpler geometry and the use of baked lighting, whereas a target frame rate of 60 FPS allows for more complex assets, including trim sheets.

  • For frames per second below 60, developers might focus on creating a more cinematic experience, allowing for greater detail and using advanced features like Nanite foliage.

Test Early and Often 07:06

"When you are early in development, make sure to be testing all these things."

  • Early testing during the development process is essential for determining whether techniques like Nanite, Lumen, or NVIDIA's RTX are suitable for the game's architecture.

  • Experimenting with different optimization methods while the project is still in its early stages helps identify which solutions work best for individual game systems.

  • Testing not only assists in identifying which technologies to utilize but also helps developers understand the performance implications of their design choices.

Optimizing Light Complexity 10:25

"To optimize light complexity, consider deleting lights, turning off shadow casting, or reducing the attenuation radius."

  • Light complexity can overwhelm your scene if not managed carefully. It's essential to monitor this aspect to ensure everything runs smoothly.

  • If you find light complexity issues, the lights may overlap too much. For instance, a lantern shouldn't have a continuation radius that extends unnecessarily far.

  • Adjust the attenuation radius to limit the light’s effect to just the area it is intended to illuminate.

Managing Shader Complexity 11:47

"Your scene should predominantly display green in terms of shader complexity; bright, vivid colors indicate a happy engine performance."

  • Shader complexity should ideally allow your scene to be mostly green. A high shader complexity often leads to performance costs, especially when using materials like transparencies and effects such as fog or glass.

  • Complex shaders require careful selection to maintain performance. While simple textures without masks or procedural elements incur minimal complexity, adding advanced features will naturally complicate things.

  • Optimization is all about making choices. Understand that as you enhance visual fidelity, some elements may require compromising on others, such as texture resolution.

Balancing Optimization with Aesthetics 13:29

"Optimization involves making choices that affect how your project looks and performs."

  • Achieving visual quality while maintaining performance is a delicate dance in game development. Prioritize the elements that matter for your game's look and feel.

  • It's normal for some textures to appear lower in resolution if optimization requires it; striking this balance is essential for a cohesive experience.

  • The complexity level you accept for materials should be tailored to your specific project and may differ between characters and environments.

"Overdraw refers to the process of rendering the furthest objects first and layering everything in front of them, which can be complex."

  • Understanding quad overdraw is crucial, especially regarding how many objects are layered on top of each other in your scene. The more overlapping layers, the more performance strain is created.

  • This principle directly ties into managing performance—keeping track of how many assets render simultaneously can help alleviate potential slowdowns.

Required Texture Resolution and Virtual Textures 19:10

"By default, Nanite does not automatically render texture resolution adjustments; you must manually set them."

  • The required texture resolution must be adjusted manually for assets in Unreal Engine, especially when working with Nanite.

  • You can control texture streaming based on proximity to the camera, which is vital for ensuring visual quality without sacrificing framerate in both first-person and third-person games.

  • Keep in mind that texture quality requirements may vary significantly depending on the game style and how close players will interact with the objects.

Reducing Overdraw in Nanite Assets 20:30

"You don't really need super high-resolution textures up close, like 4K on everything. Just don't do it."

  • To optimize performance in Unreal Engine 5, avoid using excessively high-resolution textures for close-up views. For instance, 8K textures should only be used in special cases, such as when working on a large single piece.

  • Overdraw occurs when too many separate meshes are layered on top of each other in the scene. For example, building a house with individual planks separated increases overdraw because the engine must render each plank separately.

  • A practical approach is to initially set up these individual elements but later merge them into a single mesh to reduce overdraw.

Foliage and Overdraw Considerations 22:10

"The reason this foliage has so much terrible overdraw is because it's masked foliage and not the Nanite optimized foliage."

  • Masked foliage leads to significant overdraw in the engine, which can create performance issues. This arises from unnecessary geometry calculations for overlapping meshes that aren't visible in the final render.

  • If you are using LOD (Level of Detail) for foliage instead of Nanite, it’s essential to manage overdraw by adjusting LOD settings and possibly reducing foliage density.

  • Effective LOD management can help decrease pixel density on the screen. Check LOD coloration to ensure that foliage meshes are correctly optimized to avoid rogue instances of LOD zero that may rise from any tinkering with Nanite settings.

Importance of Raster Bins 25:50

"Raster bins are very underestimated, but they are essential for optimization."

  • Raster bins consist of pixels that share the same rendering state, and it is crucial to ensure that assets in a scene share the same bin whenever possible to enhance efficiency.

  • When integrating multiple assets, especially from external sources like FAB, make sure they utilize similar materials to optimize shared rendering, thereby reducing performance hits.

  • For foliage, categorizing textures into UDIMs and using per-instance variations will streamline rendering and minimize color mismatches.

Optimizing Shadow Maps in Unreal Engine 5 28:20

"Make sure your foliage's invalidation behavior is always either rigid or static."

  • When working with foliage, it's important to set the invalidation behavior to either 'Rigid' or 'Static.' Leaving it on 'Auto' can lead to unnecessary recalculation of shadows, resulting in performance degradation.

  • Rigid and Static settings prevent dynamic shadow calculations based on slight movements, helping to reduce overhead on the GPU, particularly in scenes with dense foliage.

  • Assessing the foliage and adjusting these settings can drastically improve performance and ensure that shadows are calculated efficiently.

Directional Light Troubleshooting 30:39

"The problematic directional light was consistently invalidating the scene."

  • The discussion addresses issues with directional light in Unreal Engine, which can drastically affect the performance and visual fidelity of a scene.

  • It's noted that sometimes a directional light may need to be removed if it constantly causes invalidation in the scene, leading to performance inconsistencies.

Understanding Complexity View Modes 31:13

"Complexity is going to be the view mode that you're going to use to troubleshoot your lights."

  • Complexity view modes help developers troubleshoot lighting issues by showing how different lights interact within the scene.

  • Common fixes include reducing attenuation radius, light overlap, and possibly turning off shadows for specific lights, all to enhance performance.

Shader Complexity Insights 31:34

"Shader complexity shows your material complexity, including layers and parameters."

  • Developers can manage shader performance by reducing the number of parameters and layers within materials, which is crucial for optimizing rendering time.

  • It’s important to remember that translucent materials tend to be more complex and should be handled carefully in optimization tasks.

Managing Quad Overdraw 32:11

"Quad overdraw measures how overlapping assets render from furthest to closest."

  • Quad overdraw can create performance bottlenecks when multiple assets overlap.

  • Solutions include minimizing transparencies and effectively using Level of Detail (LOD) techniques to reduce the rendering load on the engine.

Texture Resolution Considerations 32:53

"Removing 8K textures and using lower resolutions can greatly improve performance."

  • It's recommended to use lower texture resolutions for smaller props; a 1K or 512 resolution might suffice for many assets.

  • For games, utilizing textures, especially those over 2K, may not yield significantly noticeable improvements, particularly on smaller assets.

Grouping Assets for Efficiency 33:41

"The fix is grouping assets using the same materials to reduce rendering load."

  • Similar assets should be combined to utilize shared materials, which lessens the overall rendering cost within the engine.

  • For foliage, texture packing into UDIMs can be effective to manage variations while maintaining performance efficiency.

Optimizing Shadow Maps 34:25

"Ensure the virtual shadow maps show the correct color indicators based on your version."

  • Understanding shadow map performance is vital; a gray indicator in version 5.5 signals good performance, while green is ideal for earlier versions.

  • To optimize shadow calculations, settings for foliage should be adjusted to rigid or static, which avoids the performance cost of dynamic shadows.

The Complexity of Optimization 35:30

"Optimization is not just a simple checkbox; it's detective work."

  • Effective optimization requires careful assessment of frame rates and gradual adjustments, rather than expecting instant results.

  • Tutorials promising quick fixes should be approached with caution, as true optimization often involves methodical testing and adjustments.