- Home /
Multiple lightmaps / 1 scene
Hi, at the moment I have a lot of questions ^ ^.
I wanted to get your opinion on a method that I intended to put in place and whether it was viable. I counted used lightmaps from different scene in the same scene.
For this, I bake my lightmaps counted so that a stage has held in one or two textures lightmaps. (I have a dozen scenes) At the time of each bake I make sure that the atlas is locked for not editing on the previous one.
The content of the scene I bake is contained in a prefab for each one.
When launching a part of my game, the player has a choice between 10 levels (and therefore 10 different scenes) when loading my prefab in the scene that only serves me to load all my levels I intended to call my lightmap(s) according to the prefab load.
Is that possible or lightmaps are associated with a single stage?
If yes, I thought bake and stored them in the Resources folder to be able to access it when I want and each wholesale store them in a folder corresponding to the name of each prefab to find them easily and dynamically load their info tilling / offset in LightmapSettings. Is that possible too?
Me what course would suit me is that the table lightmap is shared between all the scenes ^^ (but I do not think that is the case)
Otherwise latter, I bake my lightmaps in the scene where I call and not each in a different stage. Hence my scene called (level) contain all the information of my lightmaps and can be retrieved easily at each stage of loading prefab by making a link between the index of the lightmap in the atlas and current index prefab.
Here, if I was not clear, let me know. Otherwise all your comments and opinions are welcome.
I find a solution that can post it after when all the process gonna work :)
If you have found the solution please add it in the answers! :)
Answer by liszto · Oct 10, 2012 at 06:32 AM
The solution is quite simple, Bake lightmap in an empty scene. Store them in Resources Folder. Then call them when you init your scene with the lightmapData parameter ;)
If you need more information just say it. I gonna put a higher explanation here ;)
P.S : More details are present in my question
Thanks I managed to do that using a script I found smewhere around answers.unit3d.com ..
I made a script too and some editor script to manage a complete pipeline build for an entire game. I don't get it on this computer but if someone need it. I can share it probably
Hi... Please...Can you both tell how to find the script you are talking about...?!!