no-translate

Key Tips for Optimising your Unreal Engine Level to Boost Performance

Follow these tips to increase the performance of your Unreal Engine level and manage your VRAM usage for faster renders
作者 Off World Live
已更新 1天前

Explanation of VRAM and RAM usage and how editor consumes them to deficit of renders

RAM usage

RAM usage is the amount of Random Access Memory (a computer's short-term, volatile memory) that your system is currently using to run applications, browse the internet, and perform other tasks.

When rendering with Movie Render Queue (MRQ) in Unreal Engine 5, RAM (system memory) usage is a critical factor, but it's often overshadowed by VRAM usage, which is typically the main bottleneck. While VRAM handles the immediate graphical data, RAM is responsible for supporting the CPU and loading assets into memory so they can be sent to the GPU.

How RAM Is Used for MRQ

MRQ can be much more demanding on RAM than real-time gameplay or viewport rendering because it's focused on producing high-quality, final-frame output. Here's what RAM is used for:

  • Loading Assets: Before a frame is rendered, the CPU loads all the necessary assets—like large-scale landscapes, Nanite meshes, high-resolution textures, and complex character models—from storage into RAM. The GPU then pulls what it needs from this pool into its VRAM.

  • Scene Data: The CPU uses RAM to store and manage a lot of the scene's data, including the positions of all actors, lighting information, and physics simulations.

  • Editor Overhead: The Unreal Engine editor itself requires a significant amount of RAM to run, and this usage is added to the total memory demand during a render. If you're rendering with the editor open, its processes will compete for RAM.

  • Post-Processing: Some post-processing effects and render passes are handled by the CPU and rely on RAM for temporary storage and calculations.

  • CPU-Based Ray Tracing (Path Tracing): When using the Path Tracer, the CPU can be heavily involved in calculations, which will increase RAM usage.

Optimizing RAM for MRQ

To avoid memory-related crashes or bottlenecks, you can take these steps:

  • Render with the Editor Closed: Launching a render from the command line without the editor open can free up a substantial amount of RAM.

  • Use High-Resolution Tiling: If you need to render an extremely high-resolution image, The OWL 180 / 360 Rendering pass has a feature to render it in tiles. This breaks the image into smaller chunks, reducing the memory load at any given moment.

  • Optimize Your Scene: Just like VRAM, optimizing your scene's assets by reducing polygon counts on distant objects or compressing textures can reduce the overall memory footprint.

  • Increase System RAM: Ultimately, for high-end cinematic rendering, having a system with a large amount of RAM (32GB, 64GB, or even 128GB+) is crucial to handle the demands of complex scenes and high-quality settings.

VRAM usage 

VRAM (Video Random-Access Memory) is the dedicated, high-speed memory on a graphics card that stores graphics data for quick access by the GPU (Graphics Processing Unit), enabling it to render images and display them on your screen. It stores various graphics-related data, such as textures, meshes, and frame data, acting as a high-speed buffer between the GPU and your display.

During rendering, UE5 loads all the necessary assets into VRAM so the GPU can access them quickly. This includes:

  • Textures: High-resolution textures, especially for materials and landscapes, are a major consumer of VRAM.

  • Geometry/Meshes: The data for 3D models and their complex polygon counts.

  • Lighting and Shadows: Information for dynamic lighting, Lumen, and Virtual Shadow Maps (VSMs) takes up a significant amount of memory.

  • Post-Processing Effects: Data for effects like ambient occlusion, bloom, and other screen-space effects.

  • Frame Buffers: The final rendered image that's sent to your monitor.

The more complex and detailed your UE5 scene is, the more VRAM it will need. This is especially true when using features like Nanite, Lumen, and high-resolution assets. 

It's important to distinguish VRAM from your computer's system RAM.

  • VRAM: Located directly on the GPU, it's designed for extremely fast access by the graphics card. It's the primary workspace for all rendering tasks.

  • System RAM: Connected to your CPU, it handles all other processes and is much slower at moving graphical data.

If your UE5 project's VRAM usage exceeds your graphics card's capacity, the system will have to offload some of that data to the slower system RAM or even your storage drive. This is called a VRAM bottleneck and it causes a significant drop in performance, leading to stutters, lag, and even crashes.

To prevent VRAM bottlenecks in UE5, you can:

  • Optimize Textures: Use textures with appropriate resolutions for their purpose. For example, a texture on a distant object doesn't need to be 4K.

  • Adjust Scalability Settings: Use the engine's built-in scalability settings to lower the quality of textures, shadows, and effects, which can significantly reduce VRAM usage.

  • Use DLSS (Deep Learning Super Sampling): If you have an Nvidia RTX card, DLSS can render the scene at a lower resolution and use AI to upscale it, which can reduce VRAM demands.

  • Use the Render Resource Viewer: UE5 has a built-in tool that helps you see what's consuming the most VRAM in your project.

这篇文章有帮到您吗?