To use the AutomaticLOD component just click "Add Component" on the inspector panel of the object you want to create levels of detail for and select AutomaticLOD.
If you are interested in adding LODs to a GameObject with multiple children, add it to the root node and the tool will automatically take care of the children as well.
The panel should be visible now ready to operate:
Now configure the following parameters:
Now if you press "Generate LODs" you should start the mesh generation process. Depending on the number of objects, levels and mesh complexity it may take a while.
At this point, your interface should look more or less like this:
Also if you had child GameObjects processed, they will have a different panel. We will take a look at it later.
First, select your preferred algorithm on "LOD Switch Criteria":
Will assign a LOD mesh depending on the distance from the object to the camera.
Farther distances will use LOD meshes with less polygon count.
The "Max Camera Distance" will limit the maximum camera distance the LOD bar (see later) will consider.
Will assign a LOD mesh depending on the area the objects occupies on screen.
When the object covers a larger amount of screen space (measured in %) it will use meshes with higher polygon count. Smaller screen space coverage will use simpler meshes.
The "Enable Prefab Usage" will allow you to save this object as a prefab and instance it at runtime or duplicating it. Use it only if needed.
This will save the generated meshes to disk and will enable multiple instancing. If you try to instantiate prefabs without having this option enabled, all mesh slots will have empty unreferenced meshes.
The following "Vertex Relevance Spheres" section is used to fine-tune mesh simplification.
Vertex relevance spheres can be added so that all vertices that lie inside can have a relevance assigned. Positive relevance values mean the mesh simplification algorithm will try to keep these ertices whereas negative values will discard the vertices easier in the process. 0 is the default relevance.
Spheres can be shown/hidden in the scene window simply by using the fold-out controls of each sphere or the global "Vertex Relevance Spheres" fold-out control.
Note: If you change vertex relevance sphere parameters you should recompute all LOD level meshes in order for the changes to take place. Meshes will be preprocessed again so this can take some time.
Next is the main LOD configuration bar. Here you can easily configure and preview all LOD levels:
Each box represents a LOD level. Levels will have less mesh complexity going from left to right. The leftmost one is used when more detail is needed (camera is close or object covers a lot of screen space) and the rightmost one where less detail is needed (the camera is far away or the object covers very little screen space).
"Recompute all meshes" will allow you to regenerate all LOD level meshes at once and "Delete LOD data..." will restore the original mesh and delete all LOD level data.
If you have child GameObjects below an AutomaticLOD with "Recurse Into Children" activated, you will see child AutomaticLOD panels like this:
By default all settings are disabled and the child GameObject inherits all its parameters from the root AutomaticLOD. However, if you enable the override checkbox you can set individual parameters for each child.
This is useful if there is a specific child you want to finetune by adding or removing detail to a specific LOD level. You can also select to remove it from the LOD tree which means the original mesh will be restored and no LOD management will be done for this object.
If checked, we will traverse the whole GameObject's hierarchy looking for meshes.
Tells how many levels to create by default, but can be changed later on.
Starts the LOD generation process.
Changes the criteria used to switch from one LOD to another at runtime.
If CameraDistance was selected as LOD Switch Criteria, this is the furthest camera distance to consider and will be drawn on the LOD bar.
Will save the generated mesh assets to disk, so that this GameObject can be used as a prefab and be instantiated at runtime. Otherwise the mesh won't be available.
Use vertex relevance spheres to select which vertices should be preserved with more or less priority when simplifying the mesh.
Sphere dimensions
All vertices inside this sphere will be assigned this relevance. Positive relevance values mean the mesh simplification algorithm will try to keep these vertices whereas negative values will discard the vertices easier in the process. 0 is the default relevance.
For the selected LOD's mesh, the percentage of vertices from the original mesh to keep when simplifying it
Generates the selected LOD's mesh
Recomputes all LOD meshes at once
Deletes all LOD data and restores the original GameObject's mesh
Will allow to edit this object's own parameters, instead of inheriting those of the root Automatic LOD GameObject
The percentage of vertices from the original mesh to keep when simplifying it
Recomputes this level's mesh
Restores this GameObject's original mesh and excludes it from the LOD computation
Work in progress :)