Getting started with lightmapping

To start baking scene lighting, we'll first need to activate Lightmap UVs for the environment meshes and then position some lights in the scene where appropriate. To activate Lightmap UVs, select all environment meshes in the Project panel and enable Generate Lightmap UV from the object Inspector. Then, click on Apply. This method is useful for generating a second UV channel when one doesn't already exist. This defines how lighting is baked to the lightmap texture. Unity applies an autounwrap projection using settings from the Advanced roll out. If, by contrast, your own meshes already have a custom, second channel, and you can use this channel instead for Lightmap UVs simply by disabling Generate Lightmap ...

Get Mastering Unity 2017 Game Development with C# - Second Edition 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.