Realistic atmospheres

Hello. I am currently working on an open universe project and was wondering about atmospheres. Specifically, I want to have atmosphere colors determined by a mixed composition such as Oxygen, Hydrogen, Argon etc, and for the edges to have a fall off, like a real atmosphere, where it fades to completely clear, based on density, is there such a way that would allow simple light scattering, and for it to be clear where it is night? I need a smooth transition from day to night, and for areas closer to ground level to be more dense, as of now I just use a sphere model I made:

But I would like something a bit more like this:

I would appreciate any help, or ideas on implementing this.

This would require a custom shader. I am not aware of any PlayCanvas-based projects as an example, but if you are familiar with shaders, this could give you a start:

1 Like

Yeah it looks almost what I need, but I am not so good with shaders, and I didn’t see any of the code, sadly. I appreciate your reply though, I might try to test a few things and build it from scratch.