Performance Tuning & Shipping

Advanced 30 min

Profile, optimize, and ship your project: identify bottlenecks, leverage Nanite, tune the render pipeline, set up source control, and package for distribution.

← All Lessons

Prerequisites

This lesson uses 5 skills from the DevOps and Materials & Rendering clusters. You should have a project with content that needs optimization, such as a level with geometry, materials, and gameplay logic.

What You'll Build

A production-ready project: profiled and optimized for target frame rate, high-poly meshes converted to Nanite, final renders output via Movie Render Queue, version-controlled with Git LFS, and packaged as a standalone executable. This is the workflow you follow when transitioning from "it works in editor" to "it ships to users."

Step-by-Step Workflow

Step 1: Profile and identify bottlenecks

/skill performance-profiling

Tell Claude:

"Profile my level for performance. I'm targeting 60fps on a mid-range GPU. Run stat commands to check frame time breakdown. I want to know if I'm CPU-bound or GPU-bound, and which systems are the most expensive."

What to expect: Claude runs stat commands (stat unit, stat gpu, stat scenerendering) and analyzes the frame time breakdown. You will see a clear report: "GPU-bound at 22ms frame time. Draw calls: 4,200 (high). Shadow rendering: 6ms. Translucency: 3ms." This tells you exactly where to focus optimization effort.

Connection to next step: If draw calls are high, Nanite can dramatically reduce them.

Step 2: Convert to Nanite

/skill nanite-optimization

Tell Claude:

"Convert my high-poly static meshes to Nanite. I have architectural meshes between 50K and 2M triangles. Enable Nanite on these, set up Virtual Shadow Maps, and verify the triangle count overhead is acceptable."

What to expect: Claude enables Nanite on your high-poly meshes, eliminating the need for manual LOD authoring. Draw calls drop significantly because Nanite renders only visible triangles at pixel resolution. Virtual Shadow Maps replace cascaded shadow maps for sharper shadows at lower cost. Claude reports before/after metrics.

Step 3: Configure final render output

/skill render-pipeline

Tell Claude:

"Set up Movie Render Queue for a final quality render of my cinematic sequence. Output 4K ProRes 4444, 24fps, with anti-aliasing at 8 spatial samples and 4 temporal samples. Include a separate render pass for object IDs so I can composite later."

What to expect: Claude configures a Movie Pipeline preset with your resolution, codec, and anti-aliasing settings. The multi-pass setup includes beauty, object ID, and any additional passes you need for compositing. The render queue can process multiple sequences back-to-back.

Step 4: Set up source control

/skill source-control

Tell Claude:

"Set up Git with LFS for this project. Configure LFS to track .uasset, .umap, and .png files. Create a proper .gitignore for UE5 projects. Initialize the repo and make the first commit with all current assets."

What to expect: Claude creates a .gitattributes file with LFS tracking rules for binary assets, a comprehensive .gitignore excluding Intermediate, Saved, and DerivedDataCache directories, initializes the Git repository, and commits your project. Binary assets are stored in LFS to keep the repository manageable.

Step 5: Package for distribution

/skill project-packaging

Tell Claude:

"Package my project for Windows. Use the Shipping build configuration. Cook only the content referenced by my maps, no unused assets. Set the game name and version in project settings. Generate a standalone executable I can distribute."

What to expect: Claude configures packaging settings: build configuration (Shipping for optimized release), target platform (Win64), cook settings to exclude unreferenced content, and project metadata. The build produces a standalone directory with your executable and all cooked content ready for distribution or uploading to a platform.

Tips & Best Practices

  • Profile first, optimize second. Never guess where the bottleneck is. The stat commands and Unreal Insights tell you exactly what is slow. Optimizing the wrong thing wastes time.
  • Nanite is not for everything. It works best for static meshes with high triangle counts. Skeletal meshes, translucent materials, and world-position-offset materials do not support Nanite.
  • Cook only what you need. Unused assets in your Content directory still get cooked by default. Use asset auditing to find and remove dead content before packaging.
  • Test packaged builds on target hardware. Performance in the editor is different from a packaged build. Always verify frame rate and loading times in the actual executable.
  • Commit before big changes. Before optimization passes that touch many files, commit your current state. If an optimization breaks something, you can roll back cleanly.

Next Steps

Skills used in this lesson

Clusters: DevOps, Materials & Rendering