Page 1 of 1
Toggling Lightmaps?

Posted:
Tue Sep 18, 2012 3:31 pm
by Justintime9
Hey guys. I'm considering writing a new age, so at this point it's just brainstorming. But I had an interesting idea and I wondered if it's possible. Say I wanted a dark/dimly lit room (lightmapped to look that way.) Would it be possible to lightmap the room TWICE? As in, lightmap it a second time with the lights on? And (here's the really tricky part) with the press of a button toggle between the lightmaps? I don't mean link to a different page like I did in Zefora, but instantaneously change the lighting. To give the affect that a light has been switched on.
Re: Toggling Lightmaps?

Posted:
Tue Sep 18, 2012 7:39 pm
by Calena
I've done this in one of the ages I built for my family. All you need to do is create two textures, one lit and one dark. You can use a material animation to switch between "on" and "off". Depending on the complexity of your scene, it could be a lot of work; so if you're toggling several textures, put them all on a single texture and UV map to the different sections you need for different objects. To make it even easier, once you've built your scene, join all the objects into one.
In other words, yes, it's very easy to do, but think it through first. Good luck with your age!
Re: Toggling Lightmaps?

Posted:
Tue Sep 18, 2012 8:58 pm
by Paradox
You cannot do it with real lightmap layers, but you could fake it with two normal shadow map layers.
The problem with real lightmap layers is that as soon as you change the opacity, your mesh starts becoming transparent. I played around with this in my Pahts shell, and couldn't find a good way to do it (since I needed both light and shadows, I couldn't use two shadow maps).