The LOD Group component manages level of detailThe Level Of Detail (LOD) technique is an optimization that reduces the number of triangles that Unity has to render for a GameObject when its distance from the Camera increases. More info
See in Glossary (LOD) for GameObjectsThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info
See in Glossary.
Controls for transitioning between LOD levels
LOD Group selection bar for switching between LOD levels and previewing LOD rendering
Information about the Lod Bias Quality setting. This message appears if the Lod Bias property is set to anything other than 1.
Fade Transition Width setting for the selected LOD level. This property only appears if you disable the Animate Cross-fading property: that is, when you choose to set a transition zone by width instead of time.
Mesh Renderers set for the selected LOD level
In addition there are two buttons at the bottom of the component:
The LOD Group selection bar represents the different LOD levels as colored boxes.
The percentage that appears in each LOD level box represents the threshold at which that level becomes active, based on the ratio of the GameObject’s screen space height to the total screen height. For example, if the threshold for LOD 1 is set to 50%, then LOD 1 becomes active when the cameraA component which creates an image of a particular viewpoint in your scene. The output is either drawn to the screen or captured as a texture. More info
See in Glossary pulls back far enough that the GameObject’s height fills half of the view.
The playhead for the LOD preview. You can scrub the camera icon back and forth to test the LOD levels and their transitions. At the bottom of the playhead you can see the current percentage.
To select a level, click on the level box. For each LOD level you select, you can pick the Renderer to use or customize the transition zone.
To add and remove LOD levels from the selection bar, right-click the LOD level box and then choose Insert Before or Delete from the context menu.
Level adjustment control. To change the percentage value for the LOD level, drag the left border of the LOD level box’s boundary.
Note: If the Lod Bias property is not set to 1, the Camera position might not match the position where each LOD level actually transitions from the next. In this case, a warning message appears below the selection bar.
The SceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary view displays a preview of the transitions between LOD levels when you move the camera icon on the LOD Group selection bar. The camera icon acts like a playhead which you can use to scrub back and forth to control the exact position to preview along the LOD Group selection bar. The preview shows what the Camera will render at each LOD level.
The LOD preview playhead shows the exact position as a percentage along the LOD Group selection bar from 100% on the left to 0% on the right. The percentage represents the ratio of the GameObject’s screen space height to the total screen height.
As you move through the levels, the Scene viewAn interactive view into the world you are creating. You use the Scene View to select and position scenery, characters, cameras, lights, and all other types of Game Object. More info
See in Glossary displays the bounding box of the Tree Asset and the overlay indicates which LOD is active:
Note: Unity only displays the LOD label when a single GameObject is selected. It is not displayed when multiple GameObjects are selected.
When you select an LOD level box on the LOD Group selection bar, a Renderers panel appears.
The ‘Renderers’ are actually GameObjects that hold the Mesh for that LOD level. Usually this is a child of the GameObject that has the LODGroup component.
To set a renderer Mesh for the current LOD level, click the Add box and choose the GameObject for that LOD level from the object picker.
You can choose any GameObject for the renderer, but if you choose a GameObject that isn’t already a child, Unity prompts you to parent it to the LODGroup GameObject.
Smooth transitions between LOD levels improves the player’s experience of your game. As the Camera moves closer or farther away, you don’t want players to see an obvious switchover (sometimes called popping) from the current LOD level to the next.
Smooth transitions take place inside transition zones, where Unity renders both the current and next LOD levels separately, and then cross-fades them together.
Cross-fading is the technique of rendering two levels at the same time, with a weighting of 1 to 0 for the current LOD level and 0 to 1 for the next LOD level:
Unity usually implements the cross-fading by using either screen-space dithering or transparency. For the last LOD level, there is no cross-fading: the current level just fades out.
To set up smooth transitions on your LOD levels:
Select the Fade Mode drop-down menu and choose Cross Fade:
Note: If your Tree Asset was made with SpeedTree, choose the Speed Tree mode instead. For more information, see Working with SpeedTree Models.
By default, the Animate Cross-fading option is enabled, meaning that Unity performs a time-based transition. If you want to define your own transition zone based on the Camera’s position, disable the Animate Cross-fading option and set the Fade Transition Width property.
For more information, see Customizing the transition zone value.
The transition between two LOD levels begins the moment the Model’s height ratio crosses the next LOD threshold. For example, if the LOD 1 threshold is set at 60%, the transition between the LOD 0 and LOD 1 levels always begins as soon as the height of the Model is 60%. The transition lasts for a short period of time:
This behavior is animated by time, so you don’t need to set any properties once you enable the Animate Cross-fading property. The exact duration of the cross-fade is the same for every LOD level.
Alternatively, you can manually define transition zones inside each LOD level by its position. Each zone begins and ends before the next LOD level’s threshold. You define what proportion of each LOD level to use as the transition zone; that is, you set how far before the next level’s threshold the transition begins:
Use the Fade Transition Width property to define the transition zone on each LOD level:
Disable the Animate Cross-fading option.
Click on the specific LOD level box that you want to set.
The Fade Transition Width property appears below the LOD Group selection bar.
Set the Fade Transition Width property to define the width of the cross-fade transition zone as a proportion (between 0.0 and 1.0) of the current LOD level’s entire length. For example, specify a smaller value to delay the onset of the blending and create a faster transition.
SpeedTree geometries store the next LOD position for each vertex. Every vertex then knows how to interpolate between the current LOD position and the next LOD position. When Unity imports Models created in SpeedTree, it automatically sets them to the Speed Tree mode.
Unity only needs to render the current LOD geometry and provide a value from 0 to 1 to instruct each vertex to gradually move to the next LOD position. At the end of the transition, the geometries of the current LOD and the next LOD match perfectly.
Blending between two LOD levels begins at 0 and ends at 1. Any point along this zone is the blend factor, which represents the weighting between the current LOD level and the next LOD level:
The Speed Tree mode uses the blend factor to interpolate the vertex positions between the current Mesh LOD level and the next Mesh LOD level, and then renders the geometry at that position.
Note: The Speed Tree mode is only used for blending between two Mesh LOD levels: that is, when both current and next LOD levels have a Mesh Renderer. When transitioning to a BillboardA textured 2D object that rotates so that it always faces the Camera. More info
See in Glossary LOD level or when fading out entirely, Unity performs Cross Fade-style blending.
Unity doesn’t provide a default built-in technique to blend LOD geometries. You need to implement your own technique according to your game type and Asset production pipeline.
Unity calculates a blend factor from the GameObject’s screen size and passes it to your shaderA program that runs on the GPU. More info
See in Glossary in the unity_LODFade.x uniform variable. Depending on the Fade Mode you choose, use either the LOD_FADE_PERCENTAGE
or LOD_FADE_CROSSFADE
keyword for GameObjects rendered with LOD fading.
For time-based (animated) transitions, you can set the exact duration of the transition globally for every LOD level with the LODGroup.crossFadeAnimationDuration member.
For information on LOD naming conventions, see Import a mesh with LOD settings.
LODGroup
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.
When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.
More information
These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising. Some 3rd party video providers do not allow video views without targeting cookies. If you are experiencing difficulty viewing a video, you will need to set your cookie preferences for targeting to yes if you wish to view videos from these providers. Unity does not control this.
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.