The "mie" setting influences the density of the atmosphere. The number of zero's after the decimal point in the "rayleigh" and "aborption values must be the same number of zero's after the decimal point as the "mie" parameters.

Example:

Code: Select all

`Mie 0.0112`

MieAsymmetry -0.26

Rayleigh [ 0.0103 0.025 0.061 ]

Absorption [ 0.0234375 0.040625 0.01125 ]

MieScaleHeight 13.5

Code: Select all

`Mie 0.00112`

MieAsymmetry -0.26

Rayleigh [ 0.00103 0.0025 0.0061 ]

Absorption [ 0.00234375 0.0040625 0.001125 ]

MieScaleHeight 13.5

Code: Select all

`Mie 0.000112`

MieAsymmetry -0.26

Rayleigh [ 0.000103 0.00025 0.00061 ]

Absorption [ 0.000234375 0.00040625 0.0001125 ]

MieScaleHeight 13.5

The "rayleigh" numbers are the RGB numbers for the color of the atmosphere, in RGB order.

The "absorption" numbers influence the colors of the sunset. HOWEVER, aborption goes from the top down, instead of bottom up like the other color values do.

For example, the RGB value for lavender, converted into celestia format, is [ 0.71 0.49 0.86 ], which would normaly give you a lavender sky if you used these numbers for the "rayleigh" setting. To get lavender sunsets, you must subtract these numbers from "1", so it would be 1 - 0.71 = 0.29 for the Red, 1 - 0.49 = 0.51 for the green, and 1 - 0.86 = 0.14 for the blue, and use those numbers for the "absorption" values, so [ 0.29 0.51 0.86 ] as the absorption values. Don't forget to add the zero's in between the decimal point and the first number AFTER the decimal point, so in the end, your "absorption" values should look like this [ 0.0029 0.0051 0.0086 ].

The "MieScaleHeight" adjusts how tall the atmosphere is, multiplied by 5. The .ssc definition for Earth's atmosphere default atmosphere height is 60 km. Divide that by 5, and you get 12, which is the MieScaleHeight value given for Earth's atmosphere. Multiply 12 by 5, you get 60, and so forth.

Also, the size of the planet influences how many zero's you should place in between the decimal point and the first number, in the "Mie", "Rayleigh" and "Absorption" settings. The bigger the planet, the more zeroes you need to insert. So for Earth, you get:

Code: Select all

`Mie 0.001`

MieAsymmetry -0.25

Rayleigh [ 0.001 0.0025 0.006 ]

MieScaleHeight 12

However, for planets with radii higher than, say, 20000 km, you need to insert a third zero, as well as increase the MieScaleHeight. So, for Neptune, you get:

Code: Select all

`Mie 0.0001`

MieAsymmetry -0.25

Rayleigh [ 0.0001 0.00025 0.0006 ]

MieScaleHeight 120

For objects significantly smaller than Earth, with, say, a radii below 2000 km, you'd take a way a zero from the Mie, Rayleigh, and Absorption values.

So, for example, the Moon would get:

Code: Select all

`Mie 0.01`

MieAsymmetry -0.25

Rayleigh [ 0.01 0.025 0.06 ]

MieScaleHeight 3

Also, the "MieAssymetry" values, which is from -1.0 to 1.0, shows how light goes through the atmosphere, with 1.0 deflecting light back to the sun, and -1.0 makes the planet's nightside appear to "shine", if you put the planet between you and the light source.

Finally, the "absorption" line is completely optional. You don't have to use it if you don't want to.

Maybe someone with better understanding can explain it better than I just did.