LOD (Level of Detail) models can improve performance by swapping out high detail models for lower detail models when they appear further away from the camera. Making LOD models can be automated using Maya LT, including models with skinned meshes. When LOD model naming convention is followed, Unity can set up LOD Group component on import.
Why LOD?
A common technique to increase rendering performance is to use different LOD models for meshes rendered based on object’s distance from the camera. For objects further away from the camera, a mesh with reduced detail is used.
Creating LOD models
Models can be created manually by reducing the number of triangles of the original high resolution model. But when we have a skinned mesh that is already bound to the skeleton with all the vertex weights painted, the manual process is a bit more complicated since it includes binding of skeletons and transferring weights to all reduced LOD meshes.
With Maya LT LOD models can be generated using an automated process. And that includes models with skinned meshes since weights are also transferred automatically to generated reduced LOD models.
The “Generate LOD Meshes” command is accessible from the main menu, in Maya LT 2018 that is Edit > LOD (Level Of Detail) > Generate LOD Meshes.
This will set the original skinned mesh as LOD0 and automatically create desired number of LOD models with reduced mesh complexity.
Preparing models for Unity
Maya will create and name LOD groups for each mesh with reduced detail. The original mesh name will be preserved. But in order for Unity to recognize LOD levels automatically, the meshes inside the groups need to be renamed and follow Unity’s naming convention. The meshes should have a suffix of “_LOD” followed by the LOD number. LOD0 is considered to be the one with the highest level of detail. Skinned meshes with LOD groups are now ready to be sent to Unity.
Importing skinned meshes with LOD groups in Unity
If the naming convention for the meshes contained in the export file is followed, Unity does everything without any need to intervene.
A LOD Group component is added and set-up automatically. All that is left for us is to tweak the parameters to achieve the effect that is performing well and is visually acceptable.
Conclusion
Adding LOD models to speed up rendering performance of a game can be done with very little effort with Maya LT’s LOD functionality. Tweaking the parameters to get the desired look is the only thing that takes up time. And when following Unity’s naming conventions LOD Groups are set up out of the box.