The previous article discussed some tips when working with lights in our scene. Today we pick up the conversation by talking about “baked light.”
Objects can be static, that is, they do not and should not move at runtime, or they can be dynamic when they can move within an environment.
If a The fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and…
This choice affects the calculations that are made by the computer. Lights, like many other elements in our game, require more resources. When this exceeds, we risk seeing slowdowns if not game crashes.
Let’s take an example. If we are making a game where we have a closed room, or we know that there is no day/night cycle, we can lighten the workload by baking the lights since they will never change the positions of the shadows or the reflection on some aspects of the scene.
In the practical case of my laboratory, we can select the elements in the scene that we have already grouped in the level design phase and make them static.
Two essential tips:
- Disable light generation at runtime.
- Making an object static is not an absolute decision; we can make an object static according to the use we want to make of it with the practical flag menu
How do we bake the lights? We go to the lighting panel and start the baking process.
When the process is finished, we will immediately notice the difference in the lights set to “mixed” and “baked.”
If you have the automatic generation of lights at every change, it will have to recalculate everything. If it is not active, remember to do it manually when the scene is ready and before doing a build.
I hope you found this article useful.
See you in the next article🚀.