LOD
LOD
LOD refers to Level of Detail. It is a performance saving technique employed by Unity. When an object is close to the camera, the geometry of the object is rendered at full resolution. The resolution of the geometry falls as the distance from the camera increases.
Setting up LOD in Unity
It is best practice to attach the LOD Group component to an empty parent gameObject, and have the different LOD levels be children of it.
Setting up LOD levels for a Sphere:
1. Create a sphere in Unity. This sphere is pretty high res, so if we have multiple of these spheres in our Game world, our GPU won't be too happy about it.
2. Now we create a lower resolution sphere inside of Blender. Open the default scene and delete the cube that comes along with it. Add an icosphere using SHIFT + A. In the modifier settings tab, create a subdivision surface. set the Levels Viewport to 2.
3. Import this sphere as a .obj in our Unity game assets folder.
4. Create more icospheres of varying resolution and import them into Unity.
Now hop back into Unity. Create an empty gameObject named sphere. Create and add a LOD Group component to it. Assign the appropriate renderers in the component.
You can now zoom in and out and observe the mesh change according to the distance set in the LOD group component.
References:
Unity 5 LOD Tutorial - How to Create LODs in Blender 2.78 (lmhpoly.com)
Comments
Post a Comment