Book Image

Mastering Unity 5.x

By : Alan Thorn
Book Image

Mastering Unity 5.x

By: Alan Thorn

Overview of this book

Mastering Unity 5.x is for developers wishing to optimize the features of Unity 5.x. With an in-depth focus on a practical project, learn all about Unity architecture and impressive animation techniques. With this book, produce fun games with confidence.
Table of Contents (16 chapters)
Mastering Unity 5.x
Credits
About the Author
Acknowledgment
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Level lighting - preparation


Reaching this far you've now made a complete scene in terms of meshes representing the first level, composed from modular environment pieces (corridor sections). Presently, the level features no lighting, navigation meshes, music or audio, and Occlusion Data; but, we'll add these soon. Let's start with lighting. In Unity, there are three main lighting types or systems, which exist on a spectrum:

  • Baked lighting

  • Real-time lighting

  • Precomputed global illumination

These are discussed in detail further here.

Baked lighting

Baked lighting is the optimal lighting method, but it can only be used under specific circumstances. With Baked lighting, all lighting data (highlights, shadows, and so on) are precalculated and saved to a texture (lightmap). The lightmap is then applied to scene geometry using a second UV channel (Lightmap UVs), on top of their standard materials, using multiplicative blending. This makes geometry appear illuminated by scene lights. This approach...