Is it possible to use lightmaps for procedural made levels? For example, a city where buildings can be placed randomly around the roads.
Hey there,
What you want to do is possible. Usually people bake lighting for prefabs, and then load them in at runtime.
Here are some links you might find helpful:
https://unity.com/how-to/advanced/optimize-lighting-mobile-games
Hope this helps
I have a similar Problem but the majority of my game is based on procedurally generated meshes. So is there a possibility to bake it at runtime?
@Alendon I’m afraid not.
My reply here might be of help to you Can I make my own custom dynamic lightmap baking in Unity?
Hello all. Dig this topic, but i have some doubt relationed.
So, how can i bake prefabs? Everywhere I look it says unity doesn’t support that.
I have a game based on rooms in a big house. Such as: bedrooms, living rooms, bathrooms etc.
The need arose for these rooms to be randomly placed in runTime.
So I have no idea what I’m going to do with the baked lights.
Currently my rooms are static and they are all pre-assembled in the editor. So I’m baking the whole scene. And I have no problems with that.
But if I have to do it at runtime, I don’t know how to proceed.
The first idea is to turn an entire room into a prefab. Cook the prefab and make it available dynamically.
Can anyone give me some support on this?
@julio_kolbapps Baked lighting in prefabs is unfortunately not really a supported workflow, although you can try solutions such as these:
- Optimizing lighting for a healthy frame rate | Mobile app & game development | Unity
- GitHub - Ayfel/PrefabLightmapping: Script for saving lightmapping data to prefabs. Used through the Assets tab in Unity. Place your prefbas in the scene with this script at the root. Set up your lighting and in the editor go to Assets->Bake Prefab Lightmaps. After is processed you can now spawn your prefabs in different scenes and they will use the lightmapping from the original scene.
One thing you can do instead is to section your rooms into several scenes, each of which will have their own lighting data, and then use additive scene loading to load rooms individually at runtime.
Hello, when will Unity allow us to change light probe position at runtime, for procedural levels? I’m talking without resorting to hacky reverse engineering of lighting data
I believe this asset can solve the problem more or less: Radiant Global Illumination | Fullscreen & Camera Effects | Unity Asset Store