LOD Handling - BadDogSkyrim/PyNifly GitHub Wiki
As of V25.3, we have special handling for BSMeshLODTriShape blocks.
These provide 3 LOD levels. LOD0, far distance, shows the fewest triangles. LOD1 adds more, and LOD2 is the full mesh.
On import, vertex groups are created to represent the first two levels (the third is "everything" so it doesn't need its own group). LOD0 contains the faces for the first level; LOD1 includes those faces and the ones for the second LOD level. The shape is given a "Mask" modifier. You can choose LOD0 or LOD1 in the mask modifier to see what the shape looks like at each level.
On export faces will be associated with their LOD levels and the right data will be written to the nif to manage them.
Vertex groups are defined by vertex not face, so you need to be sure what you define makes sense. If a face is to be in LOD0, all its vertices must be in LOD0.
In a nif, a Starfield shape can hold up to four LODs, referenced by the BSGeometry node. Each LOD is held in its own .mesh file.
Import creates one object per distinct LOD .mesh, named <shape>:LOD0 (most detail) through <shape>:LOD3 (least detail). Sometimes levels 1 and 2 share a mesh, in which case the name is <shape>:LOD1-2. Higher LODs are initially hidden by default.
Export gathers any LODs into one nif whether they are visible or not. This is an exception to PyNifly's usual rule that only visible objects are exported. To add LODs to your own mesh, name the objects according to the above scheme and parent them to the geometry node.
NOTE: Some vanilla meshes (the hands, about a fifth of clothing) also carry LODs inside the .mesh file. These are not currently supported. Import warns about these; they aren't imported, and export drops them.