saved
Around The World, Part 34: A pretty sky
Hraness wrote this summary from a saved copy of the source. Quotations are taken word for word from the source.
gist
Thomas ten Cate tunes the sky, clouds and lighting of his seafaring exploration game Around The World in Godot until sea, sky and clouds finally look right together. Fixes include a hand-written multiple-scattering ray tracer for cloud lighting, upward-bent normals for sky-tinted cloud bottoms, horizon bending, Filmic tone mapping and an in-engine orrery.
ideas
- Multiple scattering. A few hundred lines of Rust Monte Carlo ray tracing confirmed povray skipped multiple scattering; the new lookup table brightens thick cloud bottoms and removes a metallic look.
- One weird trick. Pointing cloud normals upward samples Godot's indirect sky light, giving clouds a bluish daytime tint and pink sunset undersides.
- Sky fixes. Swapping the order of outscattering and inscattering in the ray march removed a yellow horizon, and nudging the view vector hides a dark band caused by a planet 75 times smaller than Earth.
- Tone mapping. Filmic with a white point of 2.0, plus halving sky brightness, replaced clipped yellow patches around the sun with smooth gradients.
- Orrery. Rather than derive astronomy formulas, he simulates planet and moon motion in the engine and inverts it to place the sun and moon in the sky.
quotes
“In the end, curiosity got the better of me”
“The clouds have turned pink!”
“It’s a hack, but cheap and effective.”