@Beanzvision Woah!! That's epic though.
The atmosphere is always so tricky. I've attempted basing mine as much as possible on Rayleigh scattering.
I'm finishing a few updates now on the clouds. After that I will be sure to share a link to the project file.
For the atmosphere:
• I have stacked multiple spheres on top of/over each other.
• I've named them from smallest to largest: Deep Red, Red, Orange, Yellow, etc. (until Blue and UV)
• Each object got its own Volume Material
• From the smallest "wavelengths" I'm giving the volume:
— Absorption of 99% White
— Scattering of 100% Full Color
(I Used a wavelength to hex-color converter, then bracketed the color values for each corresponding volume material)
— Scattering - Texture with an Image: Atmospheric Thickness map from NASA
With a Mix mode set to Multiply, at 66%
• Then for each volume I'm changing the Directionality.
— Red at 0.75, Green at 0.25, Blue at -0.15, UV at -0.7 (Everything in between is equidistant from the surrounding values.
• The layered volumes each scatter one color of light that combines into White light. Each color of light is either scattered towards the camera (the warmer tones) or away from the camera (the colder tones). This gives "blue scattering around the planet" and "orange scattering towards the camera" effect. This also helps with getting sunset effects.
• To control their intensities + color mixing I used Xpresso.
I've attached an image of the node-tree but simply put (From Left to Right):
— A Math node Subtracts the Radius of object "Blue" from the Radius of object Earth.
The Result is the "Thickness of the Atmosphere". This is our Value1.
— Now we need a quick control for the color mixing. I made a Constant Node with a Real value of 0-1.
Dark blue: 0.1
Blue: 0.27
Cyan: 0.3
Green: 0.15
Yellow: 0.12
etc.
You want to ease-in from Deep Red to Cyan, and then ease out from the Blues into UV Blue.
These Constants are our Value2.
— I created another Constant that should be a much larger number than my planet's radius (74500 cm).
I'm using a Formula node in the next step for which I want to divide this big number by a smaller number. That will give us a Distance value for the Volume material.
I wanted there to be about 15% more "Volume" for the atmosphere. 74500/0.15 = 500000
After testing I used a value of 439576. Which became Value3.
— These values go into a Formula Node in with the following formula:
Value3/(Value1*Value2)
The Result is plugged into the Distance value from each corresponding Volume Material.
It gives a number that is big enough to always make a clear atmosphere.
Each parameter can quickly be adjusted to get more accurate color mixing.
Processing this is quite heavy. My computer is a 2017 iMac, and it's struggling quite a bit with the file.
But I'm happy to see what kind of results it gives :)
Hope this helps!