Automatic LOD Help

  1. User Manual
    1. Generating LODs
    2. Main panel
    3. Child panel
  2. Parameter reference
  3. FAQ

User Manual

Generating LODs

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:

Mainpanel_1

Now configure the following parameters:

  • If you are handling a full object hierarchy enable "Recurse Into Children" to process the child GameObjects as well.
  • Set "Levels To Generate" to the number of different LOD levels you want to generate

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.

Main Panel

At this point, your interface should look more or less like this:

Mainpanel_2

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":

Camera Distance

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.

Screen Coverage

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.

Vertexrelevance

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).

Lodbarcan do several operations using the LOD bar:
  • Click and drag slightly above the bar to move the preview cursor and put the scene window cameras momentarily in preview mode. Now while you drag the cursor the scene window cameras will move to/away from the object that is selected:
    • If the LOD Switch Criteria is set to CameraDistance, the leftmost cursor position represents a distance of 0 from the object to the camera. The rightmost position represents a distance set using the "Max Camera Distance" parameter which we viewed earlier on "LOD Switch Criteria".
    • If the LOD Switch Criteria is set to ScreenCoverage, the leftmost cursor position represents a screen coverage of 100% (the object covers all the screen space) while the rightmost cursor position represents the object covering no screen space at all.
  • Click on each box to select a given LOD level. Here you can change the amount of vertices and recompute its mesh. This will also show important mesh information regarding the selected LOD level.
  • Drag the box's left or right limits to change the camera distance or screen coverage range they are linked to.
  • Right click on the bar to insert or remove LOD levels.

"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.

Child panel

If you have child GameObjects below an AutomaticLOD with "Recurse Into Children" activated, you will see child AutomaticLOD panels like this:

Childpanel_1

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.

Childpanel_2

Parameter Reference

Main Panel

Recurse Into Children

If checked, we will traverse the whole GameObject's hierarchy looking for meshes.

Levels To Generate

Tells how many levels to create by default, but can be changed later on.

Generate LODs

Starts the LOD generation process.

LOD Switch Criteria

Changes the criteria used to switch from one LOD to another at runtime.

Max Camera Distance

If CameraDistance was selected as LOD Switch Criteria, this is the furthest camera distance to consider and will be drawn on the LOD bar.

Enable Prefab Usage

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.

Vertex Relevance Modifiers

Use vertex relevance spheres to select which vertices should be preserved with more or less priority when simplifying the mesh.

Position/Rotation/Scale

Sphere dimensions

Relevance

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.

Total vertices %

For the selected LOD's mesh, the percentage of vertices from the original mesh to keep when simplifying it

Compute mesh

Generates the selected LOD's mesh

Recompute all meshes

Recomputes all LOD meshes at once

Delete LOD data

Deletes all LOD data and restores the original GameObject's mesh

Child Panel

Override xxx settings

Will allow to edit this object's own parameters, instead of inheriting those of the root Automatic LOD GameObject

LOD x vertex %

The percentage of vertices from the original mesh to keep when simplifying it

Regenerate

Recomputes this level's mesh

Exclude from LOD tree

Restores this GameObject's original mesh and excludes it from the LOD computation

FAQ

Work in progress :)