LFS Editor/Guides/Modeller Draw Order of Materials and Triangles

From LFS Manual
Jump to navigationJump to search
LFS Editor
Vehicle Mods

Draw order of materials

You can see a material list in the vehicle editor Textures tab. That should represent the draw order of the materials.

To actually change the draw order of the materials, you adjust the draw order of the cutouts in the Modeller. The draw order is assigned by the order the materials are first encountered in the cutout list. The material's index is the number on the right of the 'material' column in the list of cutouts.

The idea is to make sure the material for the steel frame appears in the cutout list before the material for the cloth cover. For example if you selected a material with material index '2' and move it to the top of the list, then on reaching the top, it should acquire material index '1'. What was material 1 will become material 2.

Draw order of individual triangles

Within materials, triangles are drawn in the order they appear in the internal list of triangles. LFS doesn't give you direct control over this list, but you can improve the draw order by clicking magic triangle sort. This function tries to adjust the draw order so that further away triangles are likely to be drawn first. This may be better than randomly ordered triangles, and may help with "Z fight" problems if the nearby surfaces share a material so you can't manually correct the draw order by ordering the materials.