Overview of skydome material, depicting procedural cloud generation & cubemap based lighting function (bottom-centre).

Mosaic depicting lighting variation throughout 24-hour cycle (UDK).

This project consists of a dynamic 24-hour skydome and image-based lighting system providing fake global illumination. As the sun completes its daily cycle, scene assets (including terrain) are dynamically lit by a series of cubemaps in synchronisation to the sky. It was made for Unreal Development Kit prior to the widespread adoption of physically-based rendering and image-based lighting in realtime engines. At the time, this system was quite advanced.

The position of the sun, stars and moon, and the colouration of the clouds, sky and sun are all driven by a single floating-point number indicating time of day. With the standard Phong shader model, a material’s specular and diffuse intensities derive from two dot product calculations containing light, normal, and camera direction vector terms. My UDK material simply replaces the two dot product calculations with cubemap terms: one set for diffuse reflectence and one set for specular reflectence.

Here is the Phong shader model in mathematical notation:

Natural environment showcasing procedural terrain (bottom-left & top-left) & mountains ― all lit by sky system (UDK).

Sunrise time-lapse mosaic demonstrating dynamic aesthetic properties of sky shader (UDK).

Modular hill assets lit by sky system (UDK).

Modular hill texture sheets.

Overview of skydome material, depicting procedural cloud generation & cubemap based lighting function (bottom-centre).

Mosaic depicting lighting variation throughout 24-hour cycle (UDK).

The position of the sun, stars and moon, and the colouration of the clouds, sky and sun are all driven by a single floating-point number indicating time of day. With the standard Phong shader model, a material’s specular and diffuse intensities derive from two dot product calculations containing light, normal, and camera direction vector terms. My UDK material simply replaces the two dot product calculations with cubemap terms: one set for diffuse reflectence and one set for specular reflectence.

Here is the Phong shader model in mathematical notation:

$latex

\sum\limits_{m \in \textbf{lights}} \left (k_{d} { \left ( \vec{L_{m}} \cdot \vec{N} \right ) } i_{m,d} + k_s { \left ( \vec{R_{m}} \cdot \vec{V} \right ) ^{\alpha}} i_{m,s} \right )

&s=2 &bg=ffffff $

The expressions $latex \left ( \vec{L_{m}} \cdot \vec{N} \right ) &s=0 &bg=ffffff $ and $latex \left ( \vec{R_{m}} \cdot \vec{V} \right ) ^{\alpha} &s=0 &bg=ffffff $ are the ones replaced by cubemap terms.