Level Of Details
The common practice of LOD is to use low-poly for some objects that are far away from the screen or unimportant instead.
To enable LOD in the engine, select the Add Component button in the Inspector panel and select the LOD Group component.
When added, the words Culled or LOD will be displayed in the scene.
The properties of the LOD Group component are described as follows.
Click on any > LOD(0 ~ 3) on the Inspector panel to expand it and the following image will be displayed.
Its properties and description are as follows.
Properties | Description |
---|---|
Screen Ratio(%) | Screen Ratio [0, 1]。 Developers can enter a custom screen ratio in the back input box, or the screen ratio can be calculated automatically with Apply Current Screen Ratio When the screen ratio is lower than the currently configured value, LOD will automatically switch to the next level; if there are no more levels, the object will be culled |
Apply Current Screen Ratio | Applying the Current Screen Ratio When pressed, the LOD Group component takes the screen ratio of the current display state as the value of Screen Ratio (%) |
Mesh Renderers | Mesh Renderer Please refer to the documentation below for more detailed information |
0 Triangle - 0 Sub Mesh(es) | This property shows the number of triangulated surfaces configured at the current level and the number of their submeshes |
The mesh renderer can be changed by clicking on the and buttons below to add or remove actions.
LOD
Mouse over the right side of the LOD to display the mesh information to show the Add or Remove Levels button.
Clicking on will add a new LOD to the end of the array.
Clicking on will delete the LOD currently pointed to by the mouse; after deletion, subsequent LODs are automatically shifted forward.
Once you have configured the LOD, you can preview the different levels with the mouse wheel in the scene manager.
As the mouse scrolling changes, the scene camera will gradually pull away, and the level of the LOD will change, if the screen ratio of the current object is lower than the configured screen ratio of LOD2, the scene management system will cull it. The screen will show the current LOD Group’s hierarchy status LOD(0~3) or Culled.
Use of scripts
The developer can obtain the component via the getComponent
method.
API reference could be found at
In real project development, artists can perform faceting operations in DCC software (Maya, 3D Max, Blender) and export the model.
Automatic Matching
The LOD Group component automatically matches child meshes or mesh renderers of models exported via DCC software that have multiple child nodes ending in _lod+[0,N].
Example of automatic matching
Make sure you have exported the appropriate model according to the rules above.
Import the prepared FBX or glTF file into the engine’s Asset Manager at
In this case, the asset import system automatically recognizes these nodes and enables LOD Groups for automatic matching.
Q&A
Can I add more than one LOD Group?
Yes. They will work well with each other.
Can I use LODs within a 2D scene?
Since LOD Group components only recognize MeshRenderers and 2D or UI components usually don’t have MeshRenderers, it doesn’t make much sense to do so.