MC LOD Combinable

Please note that the LOD (Level of Detail) feature in the mesh combiner is still experimental and may be unstable. While it offers the ability to show different LOD levels based on distance, it's important to use this feature with caution.

The MC LOD Combinable component functions similarly to the MC Combinable 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.

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.