Rendering the Sky, Sunsets, and Planets

(blog.maximeheckel.com)

263 points | by ibobev 4 hours ago

15 comments

  • xerox13ster 4 minutes ago
    Oh hell yah this is beautiful and a great read. Also given this is MIT licensed, the skybox for my game is a solved problem!
  • etra0 2 hours ago
    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

    • TheRoque 1 hour ago
      For me the most amazing thing about Sebastian Lague is how the youtube algorithm can screw you up. He used to do millions of view on his videos, and now he barely makes half a million. Well it might also be because of covid, and everyone at home getting interesting in random stuff.
  • rollulus 23 minutes ago
    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_...
  • baliex 2 hours ago
    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.

    • jrowen 1 hour ago
      I implemented Rayleigh and Mie scattering for a game engine once (my own, hobbyist thing). It was pretty crazy to see a quite good sunset/sunrise cycle from those alone. IIRC even the sun itself popped out of that somehow.

      I was using XNA (Microsoft's C# gamedev platform) and following Riemer's excellent series of tutorials, which have been preserved here[0], but I don't see anything about scattering. I might have gotten that bit from somewhere else. I do recall reading papers with math equations.

      [0] https://github.com/SimonDarksideJ/XNAGameStudio/wiki/Riemers...

  • dekhn 48 minutes ago
    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.
  • dinfinity 3 hours ago
    SpaceEngine is also known for putting quite some effort into this; highly recommended: https://www.youtube.com/watch?v=_4TjdVAbXks

    https://spaceengine.org/

    • the__alchemist 2 hours ago
      It's fantastic software that's been around for many years, and has exquisite attention to detail on this and many other topics; this article also reminded me of it!
  • whicks 47 minutes ago
    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!
  • slopinthebag 6 minutes ago
    I love how just a bit of math can create such beautiful visuals
  • sdoering 3 hours ago
    Wow. This was quite a ride. I only understood maybe 5% - but I was massively impressed.
    • MeshHideaki 2 hours ago
      Same here. The visuals alone made it worth reading.
      • sdoering 2 hours ago
        Absolutely. Could not agree more!
  • jeremyscanvic 3 hours ago
    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

  • arjie 2 hours ago
    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.).
  • swiftcoder 1 hour ago
    Love it, this is one of the best explainers of atmosphere rendering I've seen on the web
  • gabrielcsapo 3 hours ago
    Incredible personal website, great post. Super awesome content!
    • DonaldPShimoda 1 hour ago
      Agreed, this is a gorgeous blog. Makes me get the itch to redesign my own at some point (even though I've never been great at design).
  • mirekrusin 3 hours ago
    Gem.

    Flat earth version for comparison would be fun.

  • seabass 36 minutes ago
    [dead]