> For the complete documentation index, see [llms.txt](https://teogames.gitbook.io/dynamic-mesh-combiner-demo/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://teogames.gitbook.io/dynamic-mesh-combiner-demo/components/mc-combinable/mc-lod-combinable.md).

# MC LOD Combinable

The `MC LOD Combinable` component functions similarly to the [MC Combinable](/dynamic-mesh-combiner-demo/components/mc-combinable.md) component but is specifically designed to work with LODs (Level of Detail). It allows you to show only the correct LOD level based on the camera distance and LOD settings.

When using the `MC LOD Combinable` component, you can assign LOD meshes to the corresponding LOD levels. The component will automatically determine the appropriate LOD level to display based on the camera's distance from the object. This ensures that the most suitable LOD is rendered, optimizing performance without sacrificing visual quality.

## Setup

To set up and use the `MC LOD Combinable` component for managing LOD levels, follow these steps:

1. Create the LOD levels for your object: Determine the different levels of detail required for your object and create meshes representing each LOD level. Ensure that the LOD meshes are properly optimized for performance.
2. Add the `MC LOD Combinable` component: Attach the `MC LOD Combinable` component to each individual mesh within its respective LOD level. This can be done by selecting the mesh object in the Unity Editor and adding the component through the Inspector window or by using scripts.
3. Configure LOD distances: Set up the LOD distances and their corresponding thresholds. These thresholds define the camera distance at which each LOD level should be displayed. Adjust the LOD distances based on your desired visual quality and performance requirements.
4. Assign LOD meshes: Assign the appropriate LOD mesh to each `MC LOD Combinable` component. This ensures that the correct LOD level will be displayed based on the camera distance.
5. Test and optimize: Test your scene and observe the LOD transitions as the camera moves closer or farther from the object. Adjust the LOD distances and LOD meshes as needed to achieve the desired visual quality and performance balance.

{% hint style="info" %}
When using the `MC LOD Combinable` component, it's important to be aware of potential CPU usage increases due to LOD transitions. Each LOD transition requires mesh baking, which involves combining the meshes and creating a new baked mesh for rendering. If there are frequent LOD transitions, such as when the camera rapidly moves closer or farther from the object, it may result in more frequent mesh baking operations and increased CPU usage.

To optimize performance when using `MC LOD Combinable`, consider the following:

* Minimize sudden and frequent LOD transitions by adjusting LOD distance thresholds to match the desired visual experience and camera behavior.
* Avoid unnecessary LOD level changes when the camera's movement is erratic or produces rapid transitions.

By optimizing LOD settings and reducing the number of LOD transitions, you can help mitigate any potential performance impact associated with mesh baking and CPU usage.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://teogames.gitbook.io/dynamic-mesh-combiner-demo/components/mc-combinable/mc-lod-combinable.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
