Creating a pseudo realistic planetary atmosphere on the cheap

Hello,

I have been trying to add atmospheres to the planets (sphere geometries) in my space simulator, but thus far my attempts have not been very successful: sprite looks quite good, but since sprites do no react to light, the night side of my planets end up having a visible atmosphere. I have tried copy pasting some atmospheric scattering shaders, and while beautiful, they cost a lot in terms of gpu.

I’m wondering if anyone has any ideas as to how one could wrap an atmosphere around a sphere and only have the part of the atmosphere that is exposed to light be visible? Something akin to Three.js -- Template, but with the shader taking light into account, kind of.

Oh, I found this thread - How to create an atmospheric glow effect on surface of globe/sphere - and it helped me achieve that which I was after :smiley:.

1 Like

Some time ago I did “atmosphere” with css - put the empty square block with rounded corners and box-shadows above the “planet”: globus - KYC
But in general it needs a synchronization of “atmosphere” size and position with the planet object.

2 Likes