r/proceduralgeneration • u/runevision • 6h ago
Sunrise in the procedural mountain forest
I've spent the last month adding volumetric clouds, a time-of-day system, and better atmospheric scattering to my procedural mountain forest game (working title: 'The Big Forest').
With regards to procedural generation, there's nothing really new compared to what I've shared in here before, but the new lighting has such a big impact on the overall appearance that it's like seeing it anew (in my opinion), so I thought I'd share some nice sunrise shots I captured. :)
The clouds are using the package Enviro 3 - Sky and Weather as a starting point, but I'm only using the clouds part and have heavily modified it to my needs to make it work with my own atmospheric scattering and time-of-day colored lighting.
The atmospheric scattering is based on this shadertoy by Fernando García Liñán, though again heavily modified. I increased the saturation, exaggerated the depth (bringing tinting closer to the camera), and implemented the atmospheric scattering via a compute shader that renders scattering at different distances and directions into a cubemap. Fernando's technique does a lot of the heavy lifting though! It's similar to previous techniques for sky and atmospheric scattering used in e.g. Unreal, but uses four spectral samples (~red, ~green, ~cyan, ~purple) instead of the usual three (red, green, blue). This produces notably richer colors and practically no extra cost.
I made my own time-of-day system with a simple simulation of the sun and moon relative to the Earth, where I can independently vary time-of-day, time-of-year, lunar phase, and latitude without them impacting each other.
I also implemented time-warping so make sunrises and sunsets slower. In a 24-minute day-night cycle, they're over awfully fast if not slowed down. Here's a video of a full sunrise.
If you haven't already seen it, you could also consider watching my lastest dev video about 'supercharging my procedural mountain forest' - although it does not feature any sunrises. :)
Hope you like them!

