
Hi everyone,
As you have probably seen in Unity’s roadmap, we have been working on a new runtime level of detail (LOD) system called Mesh LOD, which is a specialized solution to reduce vertex pressure on the GPU while minimizing additional memory usage.
We are excited to announce its release in Unity 6.2 alpha 8, marking the first foundation of our new Mesh LOD system. While this marks an important milestone, we want you to know that we are already hard at work improving and building on it. Your feedback will be invaluable in guiding us as we refine and enhance the system further. This is just the beginning, and we’re looking forward to growing and evolving it together with your input!
Level of detail systems, such as the LOD Group component, reduce rendering complexity of an object by rendering less complex versions of that object, typically as the object becomes smaller on the screen. As a result, this reduces the number of GPU vertex operations needed to render distant objects, while still maintaining their perceived aspect.
Unlike LOD Group, where each LOD is a set of distinct Renderer(s), Mesh LOD keeps all LODs within a Mesh without creating new GameObjects, components or assets such as a Mesh Renderer. Manual settings are also kept at minimum in order to make it easy to configure and use. Mesh LOD is a foundational rendering technology, adding to the existing LOD Group, and allows you to write your own generator and tools.
For more technical information about LOD within Unity please refer to the documentation.
How does Mesh LOD work?
- Mesh LOD runtime
All Mesh LODs reside within the Mesh’s index buffer, which is uploaded as usual. For every instance of the Mesh on-screen, the LOD to be rendered is determined by a LOD Selection Curve stored on the Mesh (Mesh.lodSelectionCurve). This curve maps the relative size on screen of the mesh bounds, adjusted by quality settings, to a LOD. The selected LOD can be adjusted on each renderer component.
A correctly configured curve’s objective is to select the best LOD that can fulfill both criteria:
- Generate the least amount of (visual) error compared to the reference mesh when displayed on screen.
- Have the lowest geometric complexity
The Mesh LOD system then adjusts the draw range to match the selected level.
- Mesh LOD generation
A key benefit of Mesh LOD is the ability to automatically generate levels of detail at import time. Automatic LOD generation inside the Editor provides multiple advantages:
- LOD generation can be a very time consuming manual process; auto-generation reduces the time spent authoring LODs.
- This results in a simplified workflow, by removing the need to use an external DCC and to manually re-author your LODs each time the full detail model is modified, thereby reducing iteration times.
- It reduces the risk of manual error by saving LOD quality settings in your project and by letting you focus only on the most detailed version of your models, while relying on the system to automatically keep the lower LODs in sync.
You can preview the generated Mesh LODs in a Mesh Preview window. If you wish to limit the LOD count to a maximum, you can do so by modifying the appropriate setting in the importer window and re-generating the Mesh LODs.
This lightweight generator is intentionally constrained to minimize memory usage by reusing existing vertices. Without explicit LOD count limit, it generates as many LODs as possible, through clustering and edge collapse, until the mesh cannot be simplified anymore. As a result it has a low memory footprint, and works better with high poly count / organic meshes. Quality might be more limited when reaching low vertex count or with meshes that have disconnected vertices like trees.
Example of generation limitation
You can read more about the current limitations and controls available to get the best results in the documentation.
- Mesh LOD API
We have exposed a C# API to enable flexibility when using Mesh LOD. It allows you to create your own tools, add your own generator or take control at runtime. The generator can be called with the API from C# in the Editor. But you can also set your own Mesh LOD data using the C# API in either Editor or in your game at runtime.
using UnityEngine;
using UnityEditor;
public class MeshLODWindow : EditorWindow
{
Mesh m_Mesh;
[MenuItem("Tools/Mesh LOD Generator")]
public static void ShowWindow() => GetWindow<MeshLODWindow>("Mesh LOD Window");
void OnGUI()
{
m_Mesh = EditorGUILayout.ObjectField("Mesh", m_Mesh, typeof(Mesh), false) as Mesh;
if (GUILayout.Button("Generate LODs"))
{
if (m_Mesh != null)
GenerateAndSaveMeshToProject(m_Mesh);
else
EditorUtility.DisplayDialog("Error", "Please assign a Mesh before saving.", "OK");
}
}
void GenerateAndSaveMeshToProject(Mesh mesh)
{
var path = EditorUtility.SaveFilePanelInProject("Save Mesh", name, "mesh", "Choose a location to save the mesh");
if (string.IsNullOrEmpty(path))
return;
Mesh meshCopy = Instantiate(mesh);
MeshLodUtility.GenerateMeshLods(meshCopy);
AssetDatabase.CreateAsset(meshCopy, path);
}
}
Example to create a tool that generates LODs from a mesh
When to use Mesh LOD?
Mesh LOD is ideal to use during the early stages of production or while prototyping, offering an efficient way to start achieving your LODs. It allows you to quickly test ideas and concepts before committing. As you progress, you might need to transition to other LOD solutions to solve other issues, for example if:
- You identify assets which do not produce the desired results given the generation constraints, for example trees or already-low poly meshes.
- You have a need to optimize something other than vertex pressure. In those cases, you may prefer solutions that provide billboards, HLOD, imposters, specific culling or switching between different materials.
- You are using LOD stripping to remove the more detailed LOD(s) from a build, but you identify that the LODs generated with Mesh LOD may not have high enough fidelity to serve as the maximum LOD, for lower-end platforms.
Comparison to LOD Groups
Mesh LOD is not a replacement for LOD Groups. Each system excels in specific contexts and are in fact complementary. They can be combined in a scene, with some objects using Mesh LOD and others using LOD Group, or even on the same object. However, for now, we recommend avoiding the use of both solutions on the same object, as it creates a complex workflow.
LOD Group is the solution that provides the most versatility. Each LOD needs to be imported and is a new object with a set of renderers. It allows you for example to use billboards or meshes with different materials. You can also define when the object needs to be culled. One of the drawbacks is that it has an impact on memory.
LOD Group works both on GameObject and Components and has per-level selection controls.
You can find more information about LOD Group in the documentation.
What’s next?
As mentioned in the introduction, this is the first foundational step of the Mesh LOD system.
While this version introduces important capabilities, we recognize there are current limitations, and we are actively working to address them as part of our ongoing development process.
For example, one of the improvements already on our roadmap is the addition of debug functionalities. It will allow you to better understand which level is currently visible in your scene.
To learn more about all limitations please refer to the documentation.
As we are working to improve the system, please don’t hesitate to provide feedback in this thread.






