Book Image

Building Levels in Unity

By : Volodymyr Gerasimov
Book Image

Building Levels in Unity

By: Volodymyr Gerasimov

Overview of this book

Table of Contents (17 chapters)
Building Levels in Unity
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
4
Dealing with Basic Animations
Index

Using LODs in Unity


LOD stands for Level of Details. This is an extremely useful functionality that allows you to optimize your game by switching highly detailed objects with those of a simpler geometry, based on their screen space.

Note

LODs are toggled based on the percentage of game screen that is being occupied by the object, not just the camera distance, as is the case in many other programs.

In Unity, LOD is represented by an LOD Group component.

How to prepare LODs

In order to make LODs work, you need to have the actual models—more precisely, multiple versions of the same model that scale down in polycount. Here are a few useful tips to follow when creating LOD models:

  • The number of versions is completely up to you as Unity will allow the creation of as many as you need.

  • Keep object silhouettes relatively close so that players won't notice when models are being swapped.

Setting up LODs in Unity

To demonstrate how LODs work, we are going to utilize meshes that were imported with external package...