- Home /
Possible to save baked Lightprobes/maps in Prefab?
I have serveral room as Prefabs and I want to arrange them randomly at runtime. My question is:
Is it somehow possible to bake each room individually (probes and maps), save it as prefab and instatiate it later at runtime?
I got it to work with the lightmaps. But only when all rooms are in the scene at baking time. The baked lightprobes however stay where they are when I move/delete individual rooms.
EDIT: Found an old forum post which fomulates the problem much better than I do: Thread
Answer by hvilela · Nov 18, 2012 at 03:07 AM
Yes. The easiest way is using light manager.
This would solve the individual lightmap problem which I have a workaround for.
All Lightmanager does with light probes is it makes the coefficient values editable in the Inspector but not their position.
As I said in my answer below :). I don't think you can move the lightprobes position :)
Answer by liszto · Nov 18, 2012 at 11:51 AM
I already do this cause LightManager cost a lot for me (student é_è)
What I done is to baked all my level in independent scene because I instantiate each level in the same scene so the common lightmap process cannot work.
When I bake my lightmap they are create in the scene folder (as the common process does) then when the lightmap bake is over. I move my lightmaps files in "Resources" folder in the appropriate folder.
If you need some informations I can answer to you and share my editor scritp with you if you really need it. ;).
But move lightprobs at runtime I don't think it can work ( and I don't know if Lightmap Manager does it) I test the free version and I don't see it.
It is not over cause I've got lot of work but if someone want test it and make me some return on it that can be really cool. And I can add more novelties. :)
Yeah I've come up with a similar solution for the lightmaps. I too use a "baking scene". In unity 4 you can now bake selected without loosing the already baked maps and the prefabs keep their indices. So I can add more rooms to the baking scene and bake them individually.
But your lightprobes problem is probably unsolvable :( (For their position)
Yeah, there goes the idea of dynamic content creation (Nav$$anonymous$$esh has the same problem). This is very unfortunate :(
I read somewhere else where the person got around the light probes issue by changing the Anchor Override property for all light-probing objects :)
Your answer
Follow this Question
Related Questions
Scene Lighting prefabs and dynamic loading 1 Answer
Lightmapping a closed indoor area? 2 Answers
Editing Lightmaps At Edit Time 1 Answer