AST-MESH-001: Mesh Optimization

WarningAsset

What This Rule Detects

This rule flags Static Mesh assets with optimization concerns:

The default threshold is 50,000 triangles before flagging high-poly concerns.

Why This Matters

Triangle Count Isn’t the Only Cost

Triangle count matters, but it’s not the only geometry cost. Understanding the full picture:

Cost FactorImpactHow to Measure
Triangle countVertex processing, rasterizationStatic Mesh Editor → Statistics
Draw callsCPU overhead, batching efficiencystat RHI
Instance countMultiplies all costsstat SceneRendering
Material complexityPer-triangle shader costMaterial Editor → Stats

Epic’s Production Example (HLOD)

In a Fortnite example, Epic demonstrated using HLOD/proxy geometry to reduce a distant region from 424 meshes and 556,445 triangles down to 1 mesh with 1,215 triangles—an enormous reduction that demonstrates why distance-based simplification exists.

This isn’t about arbitrary limits—it’s about matching geometry detail to actual visibility.

Nanite: What It Is and Isn’t

Nanite is a different geometry pipeline, not a magic “make everything faster” checkbox.

What Nanite does well:

What Nanite doesn’t support:

UE 5.7 note: Nanite Foliage is now experimental, designed for dense vegetation rendering. Check release notes for current status.

Memory: High-poly meshes with no LODs load the full mesh even when displaying at low detail. LODs allow streaming only what’s needed.

Real Example: SM_HeroStatue with 500k triangles, no LODs, Nanite disabled. Placed 20 times in a courtyard scene. At distance, still processing 10 million triangles for what could be 20k with LOD2.

When This Is Acceptable

The Problem

Problematic Pattern

LOD and Nanite decisions affect rendering budget

BeginPlay
Direct Hard Reference
Spawn Actor
  • Without LODs, full triangle count renders at all distances
  • Nanite has overhead inappropriate for simple meshes
  • Missing LOD chain means no distance optimization

High-poly meshes need either LODs or Nanite to scale efficiently.

Optimization Scenarios

SM_Environment_Rock (75,000 triangles)

❌ No LODs, No Nanite:
   → Full 75k triangles at any distance
   → 20 instances = 1.5M triangles always

✅ With LODs:
   LOD0: 75,000 triangles (0-10m)
   LOD1: 25,000 triangles (10-30m)
   LOD2: 5,000 triangles (30-100m)
   LOD3: 1,000 triangles (100m+)
   → Typical scene: ~300k triangles instead of 1.5M

✅ With Nanite:
   → Automatic triangle reduction based on screen coverage
   → Only processes triangles that contribute to pixels
   → Ideal for dense, detailed geometry

The Checks

ConditionSeverityWhy
>50k triangles, no LODs, no NaniteWarning/CriticalNo distance optimization
>50k triangles, only 1 LODWarningIncomplete LOD chain
<12.5k triangles, Nanite enabledInfoNanite overhead may exceed benefit
>50k triangles, Nanite disabledInfoConsider Nanite for high-detail

The Fix

Option 1: Generate LODs (Most Common)

Use Unreal’s automatic LOD generation:

  1. Open Static Mesh Editor
  2. Window → LOD Settings
  3. Set Number of LODs to 4-5
  4. Click Apply Changes

Recommended LOD reduction settings:

LODScreen SizeTriangle %Use Case
LOD01.0+100%Close inspection
LOD10.550%Mid-range
LOD20.2525%Far distance
LOD30.110%Very far
LOD40.055%Distant backdrop

Option 2: Enable Nanite

For dense, detailed geometry (50k+ triangles):

  1. Open Static Mesh Editor
  2. Check Enable Nanite Support
  3. Save asset

Nanite is ideal for:

Nanite is NOT ideal for:

Option 3: Simplify Source Mesh

If the mesh is over-detailed for its use case:

In DCC (Blender/Maya/Max):

  1. Apply decimation modifier
  2. Target 50% of original triangles
  3. Preserve UV seams and hard edges
  4. Re-export to Unreal

In Unreal (Reduction Settings):

  1. LOD Settings → LOD0 Reduction Settings
  2. Set Percent Triangles to target value
  3. Apply Changes

Option 4: Disable Nanite on Simple Meshes

For flagged low-poly Nanite meshes:

  1. Open Static Mesh Editor
  2. Uncheck Enable Nanite Support
  3. Add manual LODs if >10k triangles
  4. Save asset

Why disable on simple meshes:

Option 5: Use HLOD for Dense Scenes

For scenes with many high-poly meshes:

  1. Create HLOD Proxy meshes for distant viewing
  2. Configure HLOD layers in World Settings
  3. Let HLOD system swap simplified geometry at distance

Useful for cityscapes, forests, and other dense environments.

LOD Screen Size Tuning

Screen size determines when LODs swap. Adjust based on mesh importance:

// In Static Mesh Editor or via Blueprint
LOD0.ScreenSize = 1.0    // Always use when close
LOD1.ScreenSize = 0.4    // ~40% screen height
LOD2.ScreenSize = 0.15   // ~15% screen height
LOD3.ScreenSize = 0.05   // ~5% screen height

Aggressive (performance-focused):

LOD transitions at larger screen sizes = earlier LOD swap

Conservative (quality-focused):

LOD transitions at smaller screen sizes = longer LOD0 usage

Triangle Budget Guidelines

Asset TypeTarget LOD0Target LOD2Nanite?
Small prop1k-5k200-500No
Medium prop5k-20k1k-3kOptional
Large prop20k-50k5k-10kRecommended
Hero asset50k-200k10k-25kYes
Environment100k+N/AYes

Checking Mesh Stats

In the Static Mesh Editor:

  1. Statistics panel shows triangle counts
  2. LOD dropdown shows per-LOD stats
  3. Nanite section shows cluster/triangle info

In viewport:

Configuration

Threshold: Triangle count before flagging high-poly (default: 50,000)

To adjust in Project Settings:

Blueprint Health Analyzer → Rule Thresholds → AST-MESH-001 → 100000.0

Higher thresholds for Nanite-heavy projects. Lower thresholds (25,000) for mobile or VR where triangle budget is tight.