HN
Today

Rendering pretty sky in Around The World game

This post dives deep into the intricate process of rendering a beautiful and dynamic sky for a game, meticulously detailing how to achieve realistic clouds, atmospheric effects, and lighting. It showcases clever hacks and custom solutions to common graphics challenges, appealing to developers keen on advanced game rendering techniques. The author's iterative problem-solving and deep technical insights make it a compelling read for graphics programmers.

10
Score
0
Comments
#4
Highest Rank
8h
on Front Page
First Seen
Oct 17, 2:00 PM
Last Seen
Oct 17, 9:00 PM
Rank Over Time
84467192224

The Lowdown

The author of "Around The World" shares a technical deep dive into crafting a visually stunning sky for their in-development exploration game. Dissatisfied with previous results, this post chronicles a series of sophisticated rendering adjustments, from cloud lighting to atmospheric scattering, ultimately transforming the game's celestial canvas.

  • Custom Cloud Scattering: The author developed a bespoke multithreaded Monte Carlo ray tracer in Rust to generate an improved lookup table for cloud light scattering, enhancing realism over existing povray methods by simulating multiple scattering.
  • Indirect Cloud Illumination: A "weird trick" involving subtly altering the normal direction for cloud undersides allowed Godot's indirect lighting system to tint clouds with realistic sky hues, adapting to different times of day (e.g., blueish during day, pinkish at sunset).
  • Atmospheric Ray Marching Refinement: The blog post details how reversing the order of operations (attenuation before inscattering) in the atmospheric ray march resolved an unnatural yellow horizon issue, leading to a more consistent blue-to-white gradient.
  • Small Planet Horizon Fix: To compensate for the game's planet being 75x smaller than Earth, a "horizon bending" hack was implemented, adjusting the global view vector to hide the discrepancy between the sky shader's and the game's actual horizon.
  • Calibrated Tone Mapping: After experimenting with Godot's built-in options, the Filmic tone mapper with a specific white point (2.0) was chosen and carefully tuned, significantly improving the soft appearance and depth of the clouds and overall scene.
  • Orrery-Based Day/Night Cycle: Instead of complex mathematical calculations, the author simulated a physical orrery (planet and moon) within the engine to derive celestial object positions for a dynamic, location- and season-dependent day-night cycle.

Through a combination of custom code, subtle hacks, and careful calibration, the author successfully elevated the game's sky rendering to a new level of fidelity, demonstrating the iterative and often ingenious nature of game graphics development. The result is a truly "pretty sky" that dynamically responds to the game world.