Lightmapping quickstart

Lightmapping is the process of baking or precalculating the lighting on a texture to static objects to make the game run faster and allow us to get the most out of our projects.

This generally isn't done as an optimization until you have your entire level finished, but I think this is probably the best place to talk about it. If you prefer to wait, come back to this section when you are done with your level, as doing a lightmapping pass can take a long time:

  1. Go to Edit | Render Settings, and set Ambient Light to Black, as we want to have all the light to be from our lighting.
  2. Next, we will need to select all of our model files in the Models/Props and Models/Modular Pieces folders (not the prefabs). From there, check Generate ...

Get Unity Game Development Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.