What is the best way to do “day/night cycle” with lightmaps for models in Unity.
(maybe) Have one light for the sun and maybe 3 different sky boxes - but what about the lightmaps on second UV for each model - would these have to be updated too and would this not be very slow?
I have started playing around with this with the new simulator I am working. I am able to change the skyboxes etc. but I would like to know how to fade the skyboxes into each other instead of using the cheesy trick of having a player drive through a tunnel and trigger the change that way.
Plus, we are using clouds and I have a sad hack that is changing the alpha channel values on each of the materials, this is really ugly and would love to hear some other solutions or ideas.
Wiki has Unity 1 shader for skybox that blends from one texture to another:
I haven’t tested the shader in Unity 2, but it should be possible rewrite if it does not work.
Another option is to use a shader that handles multiple textures. One is used to darken the sky by changing the alpha.
In Lies and Seductions (www.liesandseductions.com) we did change from the day to night using texture animation. It is bit heavy and you can see the steps, but for some reason we didn’t go for either the above solutions. The source code of Lies can be downloaded at www.mlab.taik.fi/~plankosk/blog/?p=308
How can you access the Blend of a Shader in a non assigned Skybox?
I assigned the Skybox shader to the RenderSettings Skybox. Is it possible to modify the Blend value when it is assigned into the Main Project’s Render Settings Skybox?