Rendering Realistic Skies: Multiple Scattering in Game Engines
The developer behind Around The World discovered that POVray’s cloud light-scattering lookup tables failed to simulate multiple scattering effects, creating unnaturally harsh “metallic” cloud lighting. To confirm this limitation, they built a custom Monte Carlo ray tracer in Rust that properly models how light bounces within clouds. The comparison was striking: correctly rendered clouds showed uniform brightness and softer transitions, dramatically improving visual realism.
Achieving natural cloud coloring required working with Godot’s indirect lighting system. By inverting surface normals at cloud bottoms to point skyward rather than downward, the engine now samples environmental radiance from the sky. This single change introduced realistic blue tints during daylight and pink hues at sunset—effects that emerge from clouds simultaneously scattering blue indirect sky light and red direct sunlight.
Further refinements addressed remaining atmospheric artifacts. Reversing the order of inscattering and outscattering calculations eliminated an unnatural yellow cast near the horizon, a shader adjustment resolved curvature mismatches between the game’s smaller planet and Earth’s atmospheric model, and careful selection of the Filmic tone mapper with a white point of 2.0 prevented HDR oversaturation in bright regions.
Read the full article
Continue reading at Hacker News →This is an AI-generated summary. Read the original for the full story.