Create Characters with LODs » History » Version 6
Create Characters with LODs¶
What is the HowTo about?¶
Here you will learn how to setup Mutable so that it generates characters with multiple LODs (Levels Of Detail), so that at further distances from the camera a simpler and less expensive character is displayed.
What assets are needed?¶
First of all you have to make sure that the skeletal meshes you want to use in the "Skeletal Mesh" nodes do have LODs, for example by creating them in simplygon or in your software of choice.
Navigate to the reference mesh you are using in your customizable objects. Check its number of LODs, it has to have at least the same number of LODs as the previously mentioned skeletal meshes. If it doesn't, create them with your LOD tool such as simplygon.
In the LOD section of the reference mesh set the values of the "Screen Size" and "LODHysteresis" variables for each LOD level, in the following picture you can see an example for LOD0, but you have to do the same for all LODs. These values will be used by the customizable objects to decide when to switch LOD levels as the generated meshes get bigger or smaller on screen.
There are three options on how to setup the mutable graphs for your different Customizable Object assets, "automatic from mesh", "manual" and "inherit from parent". You can select it in the "Base Object" node in each of your mutable graphs.
-Automatic from mesh
You just have to select this option from the "Base Object" node, and the rest is automatic if the skeletal mesh node has a mesh with LODs. Mutable will duplicate the material structure from the existing LOD0 material into LOD1, LOD2, etc... Since everything is automatic, the only difference between LODs will be the used skeletal mesh LOD. In other words, you just take an existing customizable object and change the "AutoLODStrategy" field to "Automatic from mesh", and it will work automatically if the used skeletal mesh has LODs.
Here you have to select "Only Manually created LODs" from the "Base Object" node, set the number of LODs in the "Num LODs" field. Then create a material node for each LOD, and connect this material node to the correct LOD of the mesh, as well as the correct LOD pin in the "Base Object" node. Here everything is manual, so on top of being able to use a lower resolution mesh, you have the possibility to drop features or simplify the graph for the higher LODs for performance. For example, LOD0 could have a character with earrings and a medallion but LOD2 could drop all the accessories.
In the root customizable object asset of your customizable object hierarchy, you should set its "Base Object" node LOD Strategy to "Manual" and its Num LODs to the number of LODs your characters will have.
-Inherit from parent
This option just uses the same strategy as the parent Customizable Object.
Once you have followed this steps and compiled the customizable objects, you can use the preview LOD selector in the mutable vieport (and other UE4 editor viewports) to check that the correct LODs are displayed at the correct distances.