Documentation

Unity Engine

Unity Engine

LOD Group component reference

LOD Group component properties and UI elements.
Read time 5 minutesLast updated a month ago

The LOD Group component lets you manage level of detail (LOD) for GameObjects.

Property

Description

Fade ModeSelects the transition effect type to apply between LOD levels. The options are the following:
  • None: Switches to the next LOD without a smooth transition.
  • Cross Fade: Applies a cross-fading effect to the model between the current and the next LOD.
  • Speed Tree: Interpolates the vertex positions of a SpeedTree model between the current and the next LOD. Applies only to SpeedTree models with .spm and .st extensions. For more information, refer to Make LOD transitions smooth in LOD Group.
Animate Cross-fadingSets a single transition time for all LODs, which occurs after the LOD threshold is reached. This property is available only if you set Fade Mode to Cross Fade or Speed Tree. For more information, refer to Make LOD transitions smooth in LOD Group.
LOD Group selection barDisplays the LOD levels as colored boxes. For more information, refer to the LOD Group selection bar section.
Recalculate BoundsRecalculates the bounding volume that encompasses all LODs. Use this after you modify a LOD, for example if you adjust the Scale of the Transform component of a LOD renderer.
Recalculate Lightmap ScaleUpdates the Scale in Lightmap property on all Mesh Renderers in the LOD Group, based on any changes to the LOD level boundaries.
Global Illumination LODSelects which LOD in the group Unity uses for global illumination calculation in the scene. The options include each available LOD in the group, plus None to exclude the object from the calculation. The default is LOD0.

Unity always uses the selected LOD, regardless of any distance settings, when it computes lighting for objects outside the group. Typically LOD0 is used for the contribution to other instances outside the group, but when LOD0 is an extremely dense mesh it can be more efficient to select a lower LOD that represents the geometry well with fewer triangles.

Note: Unity doesn't use this setting when it computes lighting for a LOD inside the group. For example, if LOD0 uses lightmaps and Global Illumination LOD is set to LOD1, Unity uses the Renderers in LOD0 to contribute when it bakes the lightmap for LOD0.

This property applies only when Default Light Baker is set to Unity Compute Light Baker in the Graphics settings window. For more information, refer to Unity Compute Light Baker.
Object SizeSets the size of the object in meters for LOD Group calculations. For example, if you change Object Size from 1 to 0.6, an object that has a screen height of 100% is now considered to have a screen height of 60%. As a result, the transitions to smaller screen height percentages and less detailed LOD levels occur closer to the camera.
Reset Object SizeResets Object Size to its default of 1, but recalculates LOD level boundaries so the transition distances in meters stay the same.

LOD Group selection bar

The LOD Group selection bar displays the LOD levels as colored boxes.

LOD Group selection bar. Four colored boxes represent LOD 0, LOD 1, LOD 2, and culled. The percentages in the boxes represent when the LOD level becomes active. A camera icon is above the bar, and the current screen size ratio below.

A

LOD level box. Displays a percentage of the screen height. The LOD level is active between this height and the height in the next LOD level box. For example, 50% means the LOD level becomes active when the object fills half the height of the camera view.

B

When you drag the camera icon, the Scene view displays the LOD level the camera renders at that ratio. The rectangle around the object is the bounding box of the object.
Note
Unity only displays the LOD label in the Scene view when a single GameObject is selected.

C

LOD level boundary. To change when the LOD level becomes active, select and drag the boundary.
Note
To preview LODs without the rest of the Scene view turning gray, from the main menu go to Preferences >
Scene View

?

and disable Enable Filtering While Editing LOD Groups.

Renderers panel

To display the Renderers panel, select a LOD level box in the LOD Group selection bar.

Property

Description

Transition (% Screen Size)Sets the height of the object when the LOD level transitions to the next LOD level, as a percentage of the screen height.

To the right of this property, Unity displays the camera distance at which the LOD level transitions, in meters.
Set to CameraSets the Transition (% Screen Size) value to the height of the object in the current camera view.
Fade Transition WidthSets the transition width between this LOD level and the next. A smaller value delays the beginning of the transition and makes the transition shorter. For example, if you set the Fade Transition Width of LOD0 to 0.4, the transition to LOD1 occurs over 40% of the LOD0 range. This property is only available if you set Fade Mode to Cross Fade and disable Animate Cross-fading.

For more information, refer to Make LOD transitions smooth in LOD Group.
RenderersThe Renderers to render at this LOD level. To add Renderers, select the Add (+) button, then select the Renderer picker (⊙) or drag and drop to add the GameObject that contains the Renderers.

For more information, refer to Import or create LOD levels for a LOD Group.

Additional resources