In a conscious effort to update this blog more often, I bring to you, a quick glimpse into my Himalayan Valley project.
I’m currently working on various atmospheric effects such as volumetric fog and fake global illumination lighting (using 16px x 16px static cubemaps), as well as lens artifacts such as lens flare and oil marks.
Due to the sky system being fully dynamic, a creative solution was necessary in order for the static cubemap to convincingly reflect the time of day.
I wrote a simple material function that satisfies this problem by interpolating between four static cubemaps based upon the time of day. The actual time of day is expressed as a scalar ranging from 0.0 to 4.0.
The value 0.0 represents midnight, 1.0 represents sunrise, 2.0 represents midday, 3.0 represents sunset, and 4.0 is synonymous with 0.0 in that it represents midnight. This means that a looping sequence counting from 0.0 to 4.0 will seamlessly interpolate between the four cubemaps. The material function is set up to enable animation of the time value using Matinee but also has an arbitrary counter for previewing purposes.