Himalayan Valley Lens Flare

Himalayan Valley: Atmosphere and Lens Effects

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.

Himalayan Valley Sunrise

Himalayan Valley Lens FlareHimalayan Valley Diffusely Convolved Lighting 01Himalayan Valley Mountains

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.

Himalayan Valley Cubemap Material FunctionHimalayan Valley Cubemap Material Himalayan Valley Diffusely Convolved Lighting 02

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.