I have a character which I created a LOD version of so I have _LOD0 and _LOD1 for high poly and low poly.
I followed the Unity manual for creating a LOD Group which works perfectly for objects like rocks and buildings that dont move but when I do this for a character it has some issues transitioning between LOD versions.
It seems to transition between 2 versions of the character rather than just switching between the high poly and low poly mesh on the same character but I can’t figure out how to set this up properly in the LOD Group.
I tried adding only LOD0 and then adding just the skinned mesh renderer object in the LOD1 slot which makes the LOD versions appear in the same place but only the LOD0 one is animating.
Please can someone explain how to setup a LOD Group for a character properly?
The workflow for setting up a character for LOD support is as follows:
Create and name an empty game object in your scene - e.g. characterName
Drag both LOD0 and LOD1 models from your project pane onto this node in the hierarchy
Add Component > Rendering > LODGroup to the characterName node
Select the LOD: 0 group and Add the LOD:0 Renderer
Select the LOD: 1 group and Add the LOD:1 Renderer (repeat for other LODs)
Make relevant adjustments to the Distance by dragging
The character controller scripts will then determine which animations to use etc.
Note LOD does not understand the concept ‘same character’ so yes in a sense it is simply switching between two models, but they share the animation. Here is a link to our 3.5 pro features demo with the soldiers set up for LOD:
Try using a 3D modeling program, and on your character, duplicate the skin 2 times. Select the second layer and dumb down some of the vertices. Do this for the third layer as well. Import into unity, drop a LOD Group on the base of the model above the rig. Drag in the separate layers of the model into each different LOD. And you should be good, now all your different model layers will use the same rig, and also use the LOD group.
Here is an example script that doesn’t require a bunch of objects. You just setup the materials (in the right order) and the meshes. Character LOD Script