Friends, food, and flourishing

Lighting test scenes

A quick Unity tip for my future self.

Lighting in Unity is crazy complex. You’ll need to do a lot of experiments, like  changing light sources between realtime and baked. You’ll probably need baked lights to get good performance on slower devices.

To see what a scene will look like in the final game, you’ll need to regenerate the baked lighting again and again. Unfortunately, that takes a long time when you have a reasonably complex scene.

Three suggestions. First, turn off auto generate in Lighting | Scene:

Autogenerate off

When it’s on, Unity will automatically start baking lights when anything that affects lights changes. Turning it off makes it easier to keep track of your experiments. To do an experiment, change some settings, then, when everything is the way you want, tell Unity to get baking, by clicking the Generate Lighting button.

Second, make a small test scene. Light baking will be  faster. You can do more, smaller experiments.

Suggestion: make an MT test scene, open the main scene additively, duplicate part of main scene, drag it into the test scene. Change the skybox of the test scene to match the main scene, and duplicate environmental lights, like the sun. Close the main scene before you start baking lights.

Third, change just one or two settings in each experiment. So many settings affect each other, that changing a bunch at a time won’t teach you much.

Note: I still can’t work out what’s going on, not completely. I made some changes just now, and a set of lights in my test scene went dark. (Sigh) Time to experiments on my experiments.

So, future me, if you read this, the lessons are: lighting is hard, do experiments in baby steps.

Leave a Reply

Your email address will not be published. Required fields are marked *