hi all,
was thinking about this for the last 2 weeks and i have some first ideas how to do it with scripting but i wonder if there isn’t still a solution for something like a texture-cube?
now what am i talking about?
what i want to achieve is sort of a animated texture for day-night-cycles, especially for the lightmaps.
my first attempt was to do a blend form a bright to a dark lightmap and back, but the transition doesnt look right.
the other extreme would be a movie-texture as lightmap, but there would be too few control on playback, no to speek about memory …
so i came up with the following:
to keep it simple lets say there are 4 lightmaps: morning, midday, dawn and night.
a special “shader” has an accessible rangeslider 0.0-1.0 (or 0-360)
the lightmaps are connected to the slider as follows:
night->0.00, morning->0.25, midday->0.50, dawn->0.75, and again night->1.0 to complete the cycle.
as daytime moves on, the rangesliders variable increases and the “shaders” output is a blend between the two appropriate lightmaps. ( e.g.: slider at 0.55 → blend midday(80%)*dawn(20%) )
of course, doing all this blending stuff by script at each fram-update would bloat the shader way up through the ceiling ![]()
my idea is to do all the blending stuff in an extra script which is called every few seconds to minutes, depending on the cycle speed etc. and export the output texture to the real shaders lightmap.
i also was thinking about some kind of script attached to the rangeslider doing all the cycle stuff automatically etc…
what do you think?
might this be working?
will it work with unity free?
cheers siggi