LODs MetaHuman

In Unreal Engine 5.6, LODs (Levels of Detail) are a key optimization feature used in MetaHumans to manage performance and visual fidelity, especially in real-time environments like games or virtual production.


✅ What Are LODs?

LODs (Levels of Detail) are simplified versions of a 3D model that are displayed depending on the distance from the camera. The farther away a MetaHuman is, the lower the detail it needs to show, reducing rendering cost and improving performance.


🔍 How LODs Work in MetaHumans

MetaHumans use automatically generated LODs for both skeletal meshes (body, head) and groom assets (hair, eyebrows, eyelashes).

Typical LOD Setup:

LOD LevelUse CaseDescription
LOD 0Close-upFull facial rig, highest geometry, wrinkle maps
LOD 1-3Mid-rangeLower poly counts, fewer blendshapes, simplified facial rig
LOD 4-7DistantVery low-poly mesh, no facial rig or animations

🔧 LODs are customizable. You can generate or remove specific LODs using the Mesh Editor, LOD settings, or command line tools.


⚙️ How UE5.6 Improves LODs for MetaHumans

  1. Streamlined LOD Syncing
    UE 5.6 improves automatic syncing of LODs between the head and body to avoid mismatches like popping or visible seams.
  2. Groom Asset LOD Improvements
    Hair and fur LODs now support:
    • Improved cluster culling
    • Better transition smoothing
    • Support for cards or mesh-based LODs for extreme distances
  3. Performance-Friendly Facial Animation at LODs
    In 5.6, LOD 1 and 2 can still retain some facial rig capabilities for lip sync and basic expressions while reducing CPU/GPU load.
  4. MetaHuman Animator Integration
    UE 5.6 integrates better with MetaHuman Animator, allowing captured performances to map onto lower LODs more gracefully.

🛠 How to Customize LODs (Quick Guide)

  1. Open the Skeletal Mesh in the editor.
  2. Go to the LOD Settings panel.
  3. You can:
    • Regenerate LODs
    • Set specific screen size thresholds
    • Use custom LOD assets
  4. For grooms, open the Groom Asset, and adjust LOD settings similarly.

🧠 Pro Tip: Optimize LOD Switching

Use Temporal LOD blending to smooth out transitions between LODs and avoid sudden “pops” when switching.

iniCopyEditr.SkeletalMesh.SmoothLOD 1
r.SkeletalMesh.SmoothLODTransitionSpeed 2.0

Summary

FeatureDescription
LODs in MetaHumansDifferent mesh/detail levels depending on camera distance
UE5.6 UpdatesBetter facial rig scaling, LOD sync, and groom LODs
CustomizationDone via Skeletal Mesh Editor or Groom Asset settings
Performance GainCrucial for large scenes, NPC crowds, or VR applications

🧰 Prerequisites

  • Unreal Engine 5.6 installed
  • MetaHuman character added to your project (via Quixel Bridge or MetaHuman Creator)

🧾 Step-by-Step LOD Workflow for MetaHumans


1. Locate Your MetaHuman Assets

  • Navigate to:
    Content/MetaHumans/[YourMetaHumanName]/
  • Key files:
    • Head Mesh: SK_Head
    • Body Mesh: SK_Body
    • Groom Assets: Eyebrows, Eyelashes, Hair, etc.

2. Open Skeletal Mesh for Editing

  • Double-click the SK_Head or SK_Body to open in Skeletal Mesh Editor

3. View LODs

  • In the toolbar, enable:
    LOD ▼ > LOD Auto to Off
  • Now you can manually select each LOD (LOD0, LOD1, …, LOD7)

4. Generate or Regenerate LODs

  • In Details Panel > LOD Settings:
    1. Click “Generate LODs” (if not already created)
    2. Set the Number of LODs (e.g., 4–7)
    3. Click Apply Changes

🧠 Tip: You can also use custom mesh reduction settings by clicking the gear icon in the LODs section.


5. Set Screen Size Thresholds (LOD Transition Control)

  • For each LOD:
    • Expand LOD settings (e.g., LOD1, LOD2, …)
    • Find “Screen Size”
    • Example values:
      • LOD0 → 1.0
      • LOD1 → 0.75
      • LOD2 → 0.4
      • LOD3 → 0.2
      • LOD4 → 0.1

6. Optional: Replace LOD Mesh or Bone Data

  • Each LOD can optionally:
    • Use a simplified mesh
    • Strip out unused bones
    • Remove morph targets for faster runtime performance

⚠️ For MetaHuman facial animation, keep LOD0 and LOD1 facial rig intact unless optimizing for crowds.


7. Adjust Groom (Hair) LODs

  1. Open the Groom Asset (e.g., Hair, Eyebrows, Beard)
  2. In the toolbar:
    LOD ▼ > LOD Auto → Off
  3. Use the LOD dropdown or LOD tab:
    • Adjust Card density, Cluster count, Screen size, and LOD bias
  4. Optional: Use Cards or Meshes for distant LODs instead of strands for big performance boosts.

8. Enable Temporal LOD Blending (Optional but Recommended)

To avoid visible LOD popping:

Go to Project Settings > Engine > Rendering > Skeletal Meshes

  • Set:
    • Support LOD Streaming → ✅ Enabled
    • Enable LOD Streaming → ✅ Enabled
    • Use Temporal LOD Blending → ✅ Enabled

OR via Console Variables:

iniCopyEditr.SkeletalMesh.SmoothLOD 1
r.SkeletalMesh.SmoothLODTransitionSpeed 2.0

9. Test and Iterate

  • Place your MetaHuman in a level
  • Move the camera forward/backward and observe:
    • LOD transitions
    • Groom fading
    • Facial animation responsiveness at mid LODs

🧪 Use Stat GPU, Stat Anim, or ProfileGPU to measure performance gains


🔁 Bonus: Automate LOD Generation (Optional CLI)

Use command-line tools to batch regenerate LODs:

bashCopyEditUnrealEditor.exe "YourProject.uproject" -run=GenerateSkeletalMeshLODs -TargetAsset="Path/To/SK_Head"

🔁 Bonus: Automate LOD Generation (Optional CLI)

Use command-line tools to batch regenerate LODs:

bashCopyEditUnrealEditor.exe "YourProject.uproject" -run=GenerateSkeletalMeshLODs -TargetAsset="Path/To/SK_Head"

Would you like a LOD configuration preset or a Python/Blueprint tool to batch-control LODs for all MetaHumans in your project?

You said:

python blueprint tool please

ChatGPT said:

Absolutely—let’s make you a Python + Blueprint workflow to help you batch-control LODs for all your MetaHumans in Unreal Engine 5.6.

Below, I’ll give you:

Python Script for batch-regenerating LODs
✅ A Blueprint Utility Widget example to tweak screen sizes interactively


🟢 1️⃣ Python Script: Batch Regenerate LODs for All MetaHumans

This script will:

  • Find all skeletal meshes under a content folder (e.g., MetaHumans/)
  • Regenerate a specified number of LODs
  • Optionally, set screen size thresholds

📄 Save this as BatchRegenerateMetaHumanLODs.py:

pythonCopyEditimport unreal

# Define paths where your MetaHumans live
METAHUMAN_PATHS = [
    "/Game/MetaHumans",
    "/Game/Characters/MetaHumans"
]

# Number of LODs to generate
NUM_LODS = 5

# Example screen sizes
SCREEN_SIZES = [1.0, 0.75, 0.5, 0.25, 0.1]

# Asset Tools
skeletal_mesh_tools = unreal.SkeletalMeshEditorSubsystem()
asset_registry = unreal.AssetRegistryHelpers.get_asset_registry()

def regenerate_lods_for_skeletal_mesh(asset_path):
    skeletal_mesh = unreal.load_asset(asset_path)
    if not skeletal_mesh:
        unreal.log_warning(f"Could not load {asset_path}")
        return

    # Regenerate LODs
    skeletal_mesh_tools.set_lod_count(skeletal_mesh, NUM_LODS)
    unreal.log(f"Regenerated {NUM_LODS} LODs for {asset_path}")

    # Set Screen Sizes
    lod_settings = skeletal_mesh.get_editor_property("lod_settings")
    if lod_settings:
        for idx, screen_size in enumerate(SCREEN_SIZES):
            if idx >= NUM_LODS:
                break
            lod_info = skeletal_mesh.get_editor_property("lod_info")[idx]
            lod_info.screen_size = screen_size

    skeletal_mesh.post_edit_change()
    skeletal_mesh.mark_package_dirty()
    skeletal_mesh_tools.refresh_lod_change(skeletal_mesh)

def process_directory(directory):
    assets = asset_registry.get_assets_by_path(directory, recursive=True)
    for asset_data in assets:
        if asset_data.asset_class == "SkeletalMesh":
            regenerate_lods_for_skeletal_mesh(asset_data.object_path)

# Run for all paths
for path in METAHUMAN_PATHS:
    process_directory(path)

unreal.log("Batch LOD regeneration complete!")

✅ How to run:

  1. In Unreal Editor, go to:
    Window > Developer Tools > Output Log
  2. Click the Python tab.
  3. Paste: pythonCopyEditexec(open("C:/Path/To/BatchRegenerateMetaHumanLODs.py").read()) (or drag/drop the file into the Output Log)
  4. Done!

🟦 2️⃣ Blueprint Utility Widget (Editor Tool)

This widget lets you adjust LOD screen size thresholds interactively:

✅ Select a Skeletal Mesh
✅ See current screen sizes
✅ Update them without coding


🛠 Steps to Create It:

1️⃣ Create Asset

  • Right-click Content Browser > Editor Utilities > Editor Utility Widget
  • Name it: MetaHumanLODManager

2️⃣ Design UI

  • Add:
    • Object Property (Skeletal Mesh Reference)
    • EditableText Boxes for each LOD Screen Size
    • Button to apply changes

3️⃣ Blueprint Logic

  • On Button Click:
    • Get the Skeletal Mesh
    • Use Set LOD Screen Size node for each LOD index
    • Call Mark Package Dirty to save changes

🖥️ Example Blueprint Nodes

Here’s the pseudocode logic in nodes:

mathematicaCopyEditOnButtonClicked:
    For Index in 0 to NumLODs-1:
        Get LOD Screen Size Input[Index]
        Call "Set LOD Screen Size" (SkeletalMesh, Index, ScreenSize)
    Mark SkeletalMesh Package Dirty
    Log("LOD Screen Sizes updated")

You can make it more advanced with:

  • A list view of all LODs
  • Auto-detection of groom assets
  • Batch apply to all MetaHumans in a folder

⚡ Pro Tip: Combine

You can combine both:

  • Use the Python script for regeneration
  • Use the Blueprint widget for tuning thresholds