Automatic Mesh Validation

The following feature was added in release v40

Summary

We have added a mesh validation step to cooks, and upon saving StaticMesh and SkeletalMesh assets. If you are building for mobile (i.e. your .uproject has a IOS or Android related target platform), these checks will be run, to make sure your meshes will be performant to use.

At the point that you save when in-editor, it will check that enough LOD levels have been generated. If there are too few, some will be made automatically.

The checks will also be run when you cook your project (either in-editor, or externally, e.g. via CI). If assets exist that fail the mesh validation checks (i.e. they have too few LOD levels), the assets will be flagged. These assets will need to be fixed (they aren't fixed up automatically here, but can be fixed in-editor afterwards, e.g. by re-saving them)

NOTE: If your project is not targeting mobile platforms, this feature won't affect you by default. If you want the checks (and automatic fixes) to apply to your project, you can uncheck the Only Validate on Mobile flag.

For more details, see Configuring the mesh validationbelow.

Configuring the mesh validation

The mesh validation settings can be found in Project Settings | M2 World Builder | Mesh Validation. These can be freely configured to fit your project:

  • Validate Meshes - controls whether the validation steps will be run at all. If this is false, all the settings below it are ignored.

  • Only Validate on Mobile - true by default. If set, the validation steps will only be run if you have a mobile platform in your "Target Platforms" list in your .uproject file. If the value is false, then we won't check platforms, and will run the checks on all of them.

    • E.g. this example contains IOSClient, so we will validate even if Only Validate on Mobile is true.

    • The reasoning here is that projects that aren't intending to run on mobile may not need these LOD checks - the performance requirements on PC are not as severe, and nanite exists to handle performant meshes at different distances without LODs.

  • Auto-LOD Meshes - if this is true, then when you save meshes in-editor, if they fail the validation check, the required number of LODs will automatically be created for you.

  • Max Vertices Before Needing LODs - if a mesh has fewer vertices than this, then we don't bother enforcing a minimum number of LODs (e.g. if we have a model that is already very low-poly, it won't need multiple LODs)

  • Min Static Mesh LODs - how many LODs to require a large static mesh has.

  • Min Skeletal Mesh LODs - how many LODs to require a large skeletal mesh has.

Last updated

Was this helpful?