Skip to content
On this page

LOD Recipe

A LOD Recipe is a description of how to optimize one or more assets, the result will be stored as one or more LODs for the specified asset(s). The description is based on Simplygon's collection of Pipelines which include mesh optimization, material baking and work distribution. Some common optimization methods are; Reduction, Aggregation, Remeshing and Impostor.

Figure 1: LOD-chain generated by a LOD Recipe with four LOD levels.
Figure 1: LOD-chain generated by a LOD Recipe with four LOD levels.

When to use LOD Recipes?

A LOD Recipe is intended to improve the user experience in the following areas:

  • When creating different LOD categories, for example characters, foliage and prop recipes of various sizes.
  • Reduce the time it takes to generate LODs by utilizing distribution.
  • Batching and automated LOD generation.

The LOD Recipe editor

The simplest way to create a LOD Recipe is to right-click somewhere in the Content Browser, then select Simplygon → LOD Recipe. To open up the LOD Recipe, simply double-click the new LOD Recipe object. See LOD generation using LOD Recipe for a more detailed guide on how to work with LOD Recipes.

Below is a short description of the all the parts of the LOD Recipe editor:

Figure 2: The parts of a LOD Recipe.
Figure 2: The parts of a LOD Recipe.
NoColorDescription
1——Toolbar widget
2——LOD Recipe widget
3——Assets section
4——LOD section
5——LOD settings section
6——Advanced section
7——Morph Target widget

Toolbar widget

The LOD Recipe toolbar contains four elements:

UI ElementDescription
SaveSaves the LOD Recipe.
Find in Content BrowserLocates the LOD Recipe in the Content Browser.
Add MeshAdds a Static- and / or Skeletal Mesh to the LOD Recipe.
BuildBuilds the LODs for all assets specified in the LOD Recipe.

LOD Recipe widget

The LOD Recipe widget contains the information necessary to describe a LOD Recipe.

Assets section

The Asset section lists all Static- and Skeletal Mesh Actors that has been added to the LOD Recipe.

LOD section

The LOD (or LOD-chain) widget displays the settings for all LODs in this LOD Recipe, it also has the ability to set the number of LODs.

LOD settings section

Each individual LOD section is displayed in this view. From here it is possible to change the type of optimization for a specific LOD; in Simplygon we call these descriptions Pipelines.

By expanding a LOD section it is possible to view (and modify) the settings for the currently selected Pipeline (See figure 3).

Figure 3: Pipeline settings.
Figure 3: Pipeline settings.

Cascaded LODs

For each pipeline in LOD Recipe the BaseLOD can be used to setup cascaded pipelines. Default BaseLOD is 0.

Advanced section

This section introduces more advanced features of the LOD Recipe.

Flatten Material settings

Simplygon relies on the flatten functionality built into the Unreal Engine to be able to get material data to Simplygon. This section includes settings that is related to how that is handled.

Nanite Fallback Meshes

LOD Recipes can be used to replace Nanite fallback mesh. You need to enable checkboxes for both bUseSourceMeshData and bReplaceNaniteFallback. Furthermore the feature requires that you have a High Res mesh setup. Check Nanite Setting on your static mesh asset to verify that Source Import Filename point to the source files used to import Nanite asset. High Res data will make sure that your inlined LOD0 in DDC is not used.

Ray Tracing LODs

The following settings are available when using LODs for ray tracing.

UI ElementDescription
Is Used For Ray tracingEnable this to setup MinLOD for ray tracing.
Pack Material Attributes To VertexColorSee
Min LODRay tracing MinLOD index.
Metallic ThresholdThreshold to control bit value for metallic bit when using (bPackMaterialAttributesToVertexColor)

For skeletal meshes if bIsUsedForRayTracing and MinLOD is specified the ray tracing MinLOD setting would be updated on the asset. For static meshes where Nanite is enabled the MinLOD setting on the asset would be updated, if Nanite fallback meshes are not replaced.

When bPackMaterialAttributesToVertexColor is enabled, Simplygon UE integration will bake and bit pack texture data into vertex color. An additional UV channel is also created at the LODLevel. The UV channel will store EmissiveScale.

Material Attribute(s)Vertex Color ChannelBit(s)
BaseColor/EmissiveRGBN/A
Ambient OcclusionAlpha4 Bits
RoughnessAlpha3 Bits
MetallicAlpha1 Bit

Morph target widget

The Morph Target widget has the ability to choose whether a LOD should include morph targets or not. It is also possible to choose which targets to keep. See the Morph target how-to for a more detailed walk-through on how to use the Morph Target widget.

Commandlet

LOD Recipes can be built from a command line using the LODRecipeCommandlet, see the LOD Recipe commandlet how-to for more details on how to run this commandlet.

Python scripting

LOD Recipes can also be created and modified through Python scripting, this can be helpful in areas such as automation. See Python scripting for a more detailed explanation.