Cannot set custom Nanite fallback "minimum LOD" during static mesh re-import via python

I am trying to create a batch re-import tool that sets a new source file path, and a bunch of static mesh/Nanite parameters for selected assets via python, to support a custom fallback mesh generation pipeline.

The new source path for each asset is an FBX file that includes the original source mesh (labeled in the FBX as _LOD0), and a custom fallback mesh (labeled _LOD1).

To make this possible, I need to set the “Minimum LOD” to 1 on these assets so the FBX’s included custom fallback is used, but I cannot find a way to set this value via the existing python API, but maybe I am missing it somewhere? I don’t see an option to set this via import settings, mesh settings, or elsewhere.

I was also hoping to validate that Unreal only uses FBX model names to identify if an included model is an LOD at all (but not the level), and uses the order they are listed in the FBX to determine the LOD level?

For example, the following FBX contents would set the “_LOD1” model as the LOD0, and the “_LOD0” model as LOD1?

Model: 147183867392, “Model::LODGroup”, “LodGroup” {

Version: 232

Properties70: {

P: “ScalingMax”, “Vector3D”, “Vector”, “”,0,0,0

P: “DefaultAttributeIndex”, “int”, “Integer”, “”,0

}

Shading: Y

Culling: “CullingOff”

}

Model: 147466524160, “Model::_LOD1”, “Mesh” {

Version: 232

Properties70: {

P: “ScalingMax”, “Vector3D”, “Vector”, “”,0,0,0

P: “DefaultAttributeIndex”, “int”, “Integer”, “”,0

P: “Visibility Inheritance”, “Visibility Inheritance”, “”, “”,0

}

Shading: Y

Culling: “CullingOff”

}

Model: 147183862016, “Model::_LOD0”, “Mesh” {

Version: 232

Properties70: {

P: “ScalingMax”, “Vector3D”, “Vector”, “”,0,0,0

P: “DefaultAttributeIndex”, “int”, “Integer”, “”,0

P: “Visibility Inheritance”, “Visibility Inheritance”, “”, “”,0

}

Shading: Y

Culling: “CullingOff”

}

Hi Bryan,

With regard to LODs, the order they are listed in the file is not used to assign the LODs to their proper section in UE.

Let say you have Foo_LOD1 and Foo_LOD0 in your FBX file, Fool_LOD0 will go at the index 0 of the mesh Foo’s LODs and Foo_LOD1 at its index 1. No matter the order of appearance during the ingestion of the file.

And that applies to the reimport too. Note that when Nanite is enabled, the LOD0 may be a mesh generated by Nanite itself.

Regards,

Jean-Luc