logoalt Hacker News

Rendering the Sky, Sunsets, and Planets

343 pointsby ibobevtoday at 1:26 PM30 commentsview on HN

Comments

etra0today at 2:48 PM

I saw this a while ago so it might not be totally related, but Sebastian Lague did a video on atmospheres for his planet generation experiment which was also very entertaining to watch [1].

There's something particularly entertaining on developing visuals and watching them come a reality — I hope at some point be able to experiment in this field.

[1] https://www.youtube.com/watch?v=DxfEbulyFcY

show 2 replies
rollulustoday at 5:22 PM

Incredible what mobile phones and browsers can do nowadays. I remember implementing this paper from 1993 (the absolutely OG for this topic and very readable): “Display of The Earth Taking into Account Atmospheric Scattering” by Nishita et al: https://www.researchgate.net/publication/2933032_Display_of_...

show 1 reply
baliextoday at 3:09 PM

This is absolutely fantastic.

I've thought before about trying to render skies on the web as a series of gradients overlaid on top of one another. I expect I could have had some level of success and gotten some mediocre results, but it would be nothing compared to what you've created.

Thank you so much for sharing this; it's inspirational, must have taken you a very long time to put together, and I'm blown away by your results.

show 1 reply
mrsharpobluntotoday at 5:54 PM

Love a good graphics writeup - I've been working on similar things for my procedural space/planet generator. The cool thing with atmospheric scattering is you can combine it with volumetric cloud rendering and get amazing sunsets & sky scenes

https://www.threads.com/@mrsharpoblunto/post/DVS4wfYiG8f?xmt... https://www.threads.com/@mrsharpoblunto/post/C6Vc-S1O9mX?xmt... https://www.threads.com/@mrsharpoblunto/post/C6apksDRa8q?xmt...

dinfinitytoday at 2:38 PM

SpaceEngine is also known for putting quite some effort into this; highly recommended: https://www.youtube.com/watch?v=_4TjdVAbXks

https://spaceengine.org/

show 2 replies
xerox13stertoday at 5:41 PM

Oh hell yeah this is beautiful and a great read.

Also given this is MIT licensed, the skybox for my game is a solved problem! All I need is that render where the sun traverses the sky since perspective will be fixed. This allows me to extend it for the variation of the Sun’s angle through the year with sinusoidal periodicity.

laandertoday at 6:51 PM

Stunning - both the result and interactive walkthrough of how you got there.

Will store this next to my collection of Sebastian Lague favs. Thanks for sharing it with the world

dekhntoday at 4:57 PM

Scattering has long been key to making realistic looking rendered images. One of my favorite papers: http://www.graphics.stanford.edu/papers/bssrdf/bssrdf.pdf which I think is the first time I learned that rendering milk is a tricky problem.

sdoeringtoday at 2:10 PM

Wow. This was quite a ride. I only understood maybe 5% - but I was massively impressed.

show 1 reply
gabrielcsapotoday at 2:45 PM

Incredible personal website, great post. Super awesome content!

show 1 reply
jeremyscanvictoday at 2:16 PM

I wonder how this relates to the Perez All-Weather and Preetham sky models. Not an expert about that but I managed to implement those in the past and it was quite a fun project!

https://github.com/jscanvic/SkySim

whickstoday at 4:58 PM

This is hugely relevant to my interests. In my spare time I've been building a planetarium/star map app (iOS / Vision Pro) and atmospheric scattering is something that has been on my todo list for awhile. This is definitely above and beyond what I'm going for atmosphere-wise but still amazing to see. Thanks to Maxime for this write up!

arjietoday at 3:20 PM

Oh these are gorgeous. And I’m partial to the kind of things that are based on physics models as opposed to the techniques based on graphics hacks (stacked gradients etc.).

swiftcodertoday at 4:14 PM

Love it, this is one of the best explainers of atmosphere rendering I've seen on the web

botanricetoday at 7:08 PM

so amazing thank you for sharing!!

slopinthebagtoday at 5:39 PM

I love how just a bit of math can create such beautiful visuals

katzitotoday at 6:06 PM

Whoa! Oo Inspiring.

colechristensentoday at 6:54 PM

That's really great and quite conveniently timed for me I've been working on my own sky rendering over the last week or so of evenings[1], to end up as a Godot plugin and perhaps a writeup. It started as deep dissatisfaction with the results I could achieve with what was available. I'm still on the fence about the distance to go for realism vs whatever I find aesthetically pleasing.

https://www.youtube.com/watch?v=BJDgmVUL7HY

This paper was the point I jumped in with An analytic model for full spectral sky-dome radiance

https://dl.acm.org/doi/10.1145/2185520.2185591

show 1 reply
mirekrusintoday at 2:13 PM

Gem.

Flat earth version for comparison would be fun.

seabasstoday at 5:09 PM

[dead]