I'm trying to plan out how I'm gonna design levels in a game I'm working on.
I'm currently using small terrain chunks bridged together by mesh sections. Each terrain chunk is basically a level which contains various challenges, encounters, puzzles, etc.
Some of the puzzles include navigation through dark areas where you need to help of lighting to know the way. To do this, I need to set up localized lighting conditions within an existing scene, so that some areas will have a certain set of lights applied to them (including directional lights), and some others will not only have a different set of lights, but also a completely different lightmapping solution/GI settings.
I'm working with Unity. Right now the only thing I can think of is actually creating the different terrain chunks as separate scenes, setting up everything in there, and taking care of the transitions through loading. But that's not something I want to do. I'd really rather be able to change lighting conditions on the fly. But in that field, I kinda lack knowledge.
Would appreciate any help
Thanks.
Replies
Either way - regarding layers, it's actually a pretty good solution but in my case I need control over global parameters, like ambient light, reflection intensity, etc (unity specific).
In the meanwhile we've made a script which connects a trigger to the different parameters and interpolates between "lighting profiles" through time/curve.
I'll share that when it's properly written, but until then I'd be happy to hear any other possible methods...
I worked with a custom MMO engine not long ago, which let artists paint invisible regions on the terrain. Each region could have its own set of textures, light settings, fog, bloom, color correction, etc. The changeover was tied to player position in the world, with a fade-in timer (usually 3 - 5 seconds) to prevent jarring sudden changes. The system worked pretty well, you could have the player's lighting transition as they went from a sunlit glade into a dark shadowy forest, and it looked great.
So, getting back to Unity, maybe you could tie your changes in global settings to the player's position.
You define a trigger, and upon entering it, a transition between different lighting conditions occurs. For now it specifically controls a set of parameters in chosen lights and the global lighting parameters, but it can be expanded.
Thing is, I'm not entirely sure this is the "right way" to do this? It seems a bit hacky, and I'm curious what other methods have been in use.