Advanced Atmosphere Code (Mie and Rayleigh)
-
Topic authorares2101
Advanced Atmosphere Code (Mie and Rayleigh)
I did a search on Mie and Rayleight Scattering, but the results I saw were a bit, well, scattered and not quite what I was looking for. I was wondering if anyone could explain just how the mie and rayleight declarations work, i.e., what each part means and what its effect is. I'd like to know how control the thickness of planetary halos, what colors should be used where and when (like for different atmo compositions and planet types) and how and when to make the scattering so dominant as to positively glow the way Titan's nightside now does in Celestia 1.6.
Any help is appreciated, thanks in advance.
Any help is appreciated, thanks in advance.
- t00fri
- Developer
- Posts: 8772
- Joined: 29.03.2002
- Age: 22
- With us: 22 years 7 months
- Location: Hamburg, Germany
Re: Advanced Atmosphere Code (Mie and Rayleigh)
ares2101 wrote:I did a search on Mie and Rayleight Scattering, but the results I saw were a bit, well, scattered and not quite what I was looking for. I was wondering if anyone could explain just how the mie and rayleight declarations work, i.e., what each part means and what its effect is. I'd like to know how control the thickness of planetary halos, what colors should be used where and when (like for different atmo compositions and planet types) and how and when to make the scattering so dominant as to positively glow the way Titan's nightside now does in Celestia 1.6.
Any help is appreciated, thanks in advance.
You have been searching in the wrong forum
Try this thread
http://forum.celestialmatters.org/viewtopic.php?t=116
on our CelestialMatters site http://forum.celestialmatters.org/index.php. You will meet many familiar names there and quite a few topics of interest, I suppose
At the end of this thread on making gorgeous Nightlight textures,
http://forum.celestialmatters.org/viewtopic.php?t=222
you will also find my modified set of Mie parameters that quite a few people use. (As a physicist, I do understand Mie theory).
Fridger
-
Topic authorares2101
Re: Advanced Atmosphere Code (Mie and Rayleigh)
I'd actually found that first thread before, but left it because I didn't see what I was looking for. There's a lot of scattered material on all this Mie stuff, I just need a sort of compressed explanation.
Here's what I mean. First, does the above relate to 3 separate settings or 3 different layers of some sort? I see the same labels repeated 3 times. I'm leaning towards separate, because when I look at what Titan has in its code, I see this stuff only once.
Second, what do each of these things mean and do? What does MieAsymmetry do and what is the effect of different values? Same for the others. Does one of these control the apparent thickness of the backlit halo?
Bear with me, this sort of thing is outside my specialty, I need it put simply and in a concise manner to have any hope of grasping it. Coding in Celestia has always given me a bit of a headache.
Code: Select all
# Mie 0.001
# MieAsymmetry -0.25
# Rayleigh [ 0.001 0.0025 0.006 ]
# MieScaleHeight 12
# my old values
## Mie 0.0005
## MieAsymmetry -0.15
## Rayleigh [ 0.00025 0.0009 0.0015 ]
## Absorption [ 0.00018 0.00005 0.0 ]
## MieScaleHeight 18
Mie 0.0050
MieAsymmetry -0.35
Rayleigh [ 0.0008121 0.0020775 0.00375 ]
Absorption [ 0.00057 0.0004 0.0 ]
MieScaleHeight 15
}
Here's what I mean. First, does the above relate to 3 separate settings or 3 different layers of some sort? I see the same labels repeated 3 times. I'm leaning towards separate, because when I look at what Titan has in its code, I see this stuff only once.
Second, what do each of these things mean and do? What does MieAsymmetry do and what is the effect of different values? Same for the others. Does one of these control the apparent thickness of the backlit halo?
Bear with me, this sort of thing is outside my specialty, I need it put simply and in a concise manner to have any hope of grasping it. Coding in Celestia has always given me a bit of a headache.
- t00fri
- Developer
- Posts: 8772
- Joined: 29.03.2002
- Age: 22
- With us: 22 years 7 months
- Location: Hamburg, Germany
Re: Advanced Atmosphere Code (Mie and Rayleigh)
ares2101 wrote:I'd actually found that first thread before, but left it because I didn't see what I was looking for. There's a lot of scattered material on all this Mie stuff, I just need a sort of compressed explanation.Code: Select all
# Mie 0.001
# MieAsymmetry -0.25
# Rayleigh [ 0.001 0.0025 0.006 ]
# MieScaleHeight 12
# my old values
## Mie 0.0005
## MieAsymmetry -0.15
## Rayleigh [ 0.00025 0.0009 0.0015 ]
## Absorption [ 0.00018 0.00005 0.0 ]
## MieScaleHeight 18
Mie 0.0050
MieAsymmetry -0.35
Rayleigh [ 0.0008121 0.0020775 0.00375 ]
Absorption [ 0.00057 0.0004 0.0 ]
MieScaleHeight 15
}
Here's what I mean. First, does the above relate to 3 separate settings or 3 different layers of some sort? I see the same labels repeated 3 times. I'm leaning towards separate, because when I look at what Titan has in its code, I see this stuff only once.
Second, what do each of these things mean and do? What does MieAsymmetry do and what is the effect of different values? Same for the others. Does one of these control the apparent thickness of the backlit halo?
Bear with me, this sort of thing is outside my specialty, I need it put simply and in a concise manner to have any hope of grasping it. Coding in Celestia has always given me a bit of a headache.
Mie theory is complex since it's very general. For a "controlled" parameter adjustment some physics knowledge about the main dependences on wavelength etc. is required.
But unfortunately, I have no time for "personal training". A concise summary of the definitions of the Mie parameters was contained in the first reference I gave you:
http://forum.celestialmatters.org/viewt ... c&start=75
Titan's backlit glow is also by me. If you had read that "excecutive Mie summary" in the reference I gave you, you would know how to do such glows, for example. I made some respective comments at the bottom of that post.
Fridger
-
Topic authorares2101
Re: Advanced Atmosphere Code (Mie and Rayleigh)
http://forum.celestialmatters.org/viewt%20...%20c&start=75
Let me add some further qualitative remarks about the essential effects these parameters have:
* A larger (negative) MieAsymmetry than on Earth (e.g. -0.55)
is responsible for the conspicuous "ring of light"
when the atmosphere is backlit (cf TITAN!)
* the Rayleigh RGB values indicate the color components that are to be prominent in the highest part of the illuminated atmosphere
* the Absorption RGB values specify the amount of absorption as visible in the backlit color composition of the "ring of light". R=0.0 means red remains (i.e undergoes ZERO absorption)! Etc.
Wow, you're right about a knowledge of physics being important...but I think this link gives me enough to intelligently experiment. I think all I need now is some rules of thumb on what sort of effects different world types might show, but I think I'll get those elsewhere, I might be more likely to get the answers I'm looking for by going directly to the sci-fi forums and mailing lists these world types are more known in.
Thanks Fridger
- t00fri
- Developer
- Posts: 8772
- Joined: 29.03.2002
- Age: 22
- With us: 22 years 7 months
- Location: Hamburg, Germany
Re: Advanced Atmosphere Code (Mie and Rayleigh)
ares2101 wrote:http://forum.celestialmatters.org/viewt%20...%20c&start=75
Let me add some further qualitative remarks about the essential effects these parameters have:
* A larger (negative) MieAsymmetry than on Earth (e.g. -0.55)
is responsible for the conspicuous "ring of light"
when the atmosphere is backlit (cf TITAN!)
* the Rayleigh RGB values indicate the color components that are to be prominent in the highest part of the illuminated atmosphere
* the Absorption RGB values specify the amount of absorption as visible in the backlit color composition of the "ring of light". R=0.0 means red remains (i.e undergoes ZERO absorption)! Etc.
Wow, you're right about a knowledge of physics being important...but I think this link gives me enough to intelligently experiment.
Yes, I think so, too. That's why I gave you this link in the first place . Try understanding e.g. the values of Titan's Mie parameters, qualitatively. How I did the blue halo in the upper atmosphere etc. It can be mostly traced back to the three rules I gave above.
It's fun, too
Fridger
-
- Posts: 103
- Joined: 05.02.2007
- With us: 17 years 9 months
Re: Advanced Atmosphere Code (Mie and Rayleigh)
Yeah, I'm going to try to work on tweaking some of these values tomorrow. The nightside of Titan is WAY too bright. True, the halo effect is quite distinct because of Titan's extended atmosphere, but you would not see nightside glow against the disk that brightly. As far as seeing the atmosphere glow like it does in eclipse, clearly that is a bug.
Hands off: C55AFB738D58F4B81D3A4722551D25E1
The Gish Bar Times - A Blog all about Jupiter's Moon Io
The Gish Bar Times - A Blog all about Jupiter's Moon Io
- t00fri
- Developer
- Posts: 8772
- Joined: 29.03.2002
- Age: 22
- With us: 22 years 7 months
- Location: Hamburg, Germany
Re: Advanced Atmosphere Code (Mie and Rayleigh)
volcanopele wrote:Yeah, I'm going to try to work on tweaking some of these values tomorrow. The nightside of Titan is WAY too bright. True, the halo effect is quite distinct because of Titan's extended atmosphere, but you would not see nightside glow against the disk that brightly. As far as seeing the atmosphere glow like it does in eclipse, clearly that is a bug.
Good...
many of the Ciclops images are "color enhanced" which is good for illustrating an effect, but misleading for modelling things according to unaided vision. Same holds for the blue halo in Titan's upper atmosphere, which is also too strong for now.
I even had some very fruitful exchanges on that matter with one of the senior scientists @Ciclops.
An important cross check for the Mie parameters is to get the colors in backlit configuration right! Another physicist reconstructed a colored image from the raw BW data some time ago (visible light).
http://world.std.com/~mmcirvin/titan_backlit.jpg
That's the reference I was using..
Unfortunately, the present implementation in Celestia models Mie scattering only very incompletely. I would love to see an improvement here. ChrisL wrote a little "Mie tool" (Scattersim) some time ago that is supposed to provide a better approximation. We both played for a while with it at Celestial Matters.
http://forum.celestialmatters.org/viewtopic.php?t=116
Looking forward to your improvements.
Fridger
-
Topic authorares2101
Re: Advanced Atmosphere Code (Mie and Rayleigh)
I've started implementing mie and rayleigh parameters into my add-ons, but I've run into a problem when trying to do this for my Earth-like worlds that don't have blue skies, namely, combining that with a desired sunset/halo color. Two of my planets orbiting Alpha Centauri B have light bluish-purple skies, I can easily make this happen with the following values...
...but the problem is the effect on the sunset/halo color, it's green. I've tried toying with various Absorption values, but it still always comes out green. I've even tried keeping the original block of atmo code with the mie and rayleigh code, as I noticed Earth manages to keep red sunsets despite a lack of absorption values.
Mine
Earth's
Still, the sunset stays green. I noticed a difficulty controlling the sunset/halo color when I first experimented, I took it to mean it's heavily influenced by the rayleigh value. How does one control this aspect? I don't want green sunsets on these worlds, there's not air plankton or anything on these planets, they just have a redder sky than Earth does, sunsets should still be red.
Just in case the visuals help, here are two images of one of the world's in question.
Code: Select all
Mie 0.001
MieAsymmetry -0.25
Rayleigh [ 0.0055 0.0022 0.0096 ]
MieScaleHeight 12
...but the problem is the effect on the sunset/halo color, it's green. I've tried toying with various Absorption values, but it still always comes out green. I've even tried keeping the original block of atmo code with the mie and rayleigh code, as I noticed Earth manages to keep red sunsets despite a lack of absorption values.
Mine
Code: Select all
Lower [ 1.14 0.5 1.4 ]
Upper [ 1.1 0.44 1.65 ]
Sky [ 1.14 0.47 1.63 ]
Sunset [ 1 0 0 ]
Mie 0.001
MieAsymmetry -0.25
Rayleigh [ 0.0055 0.0022 0.0096 ]
MieScaleHeight 12
Earth's
Code: Select all
Atmosphere {
Height 60
Lower [ 0.43 0.52 0.65 ]
Upper [ 0.26 0.47 0.84 ]
Sky [ 0.40 0.6 1.0 ]
Sunset [ 1.0 0.6 0.2 ]
CloudHeight 7
CloudSpeed 65
CloudMap "earth-clouds.*"
CloudShadowDepth 1.0
Mie 0.001
MieAsymmetry -0.25
Rayleigh [ 0.001 0.0025 0.006 ]
MieScaleHeight 12
}
Still, the sunset stays green. I noticed a difficulty controlling the sunset/halo color when I first experimented, I took it to mean it's heavily influenced by the rayleigh value. How does one control this aspect? I don't want green sunsets on these worlds, there's not air plankton or anything on these planets, they just have a redder sky than Earth does, sunsets should still be red.
Just in case the visuals help, here are two images of one of the world's in question.
- t00fri
- Developer
- Posts: 8772
- Joined: 29.03.2002
- Age: 22
- With us: 22 years 7 months
- Location: Hamburg, Germany
Re: Advanced Atmosphere Code (Mie and Rayleigh)
Sorry, no time for playing right now. But remember, sunsets are BLUE on Mars.
This is NOT Celestia, but NASA imaging
Celestia reproduces the sunset pretty well with my Mie settings:
How do you produce these nice surface structures in Celestia like in your above image?
Fridger
This is NOT Celestia, but NASA imaging
Celestia reproduces the sunset pretty well with my Mie settings:
How do you produce these nice surface structures in Celestia like in your above image?
Fridger
-
Topic authorares2101
Re: Advanced Atmosphere Code (Mie and Rayleigh)
How do you produce these nice surface structures in Celestia like in your above image?
Fridger
You mean the second image? That's actually all Terragen, I put it in to help illustrate what I'm trying to produce in Celestia.
Sorry, no time for playing right now. But remember, sunsets are BLUE on Mars.
Mars is an odd case because of all the dust. My two worlds have purplish skies because of slightly different solar spectra, otherwise they're very Earth-like. Based on experimenting I've done in Terragen, namely changing the sky color but keeping the various haze and density parameters the same, sunset should head toward orange-red, then head to dark purple for twilight. Green is nowhere to be seen in the sky.
Can anyone help on this? I like how using mie and rayleigh makes worlds look from the front (very pretty), but it's gonna bug me if the sunset and backlit halo are wrong.
- t00fri
- Developer
- Posts: 8772
- Joined: 29.03.2002
- Age: 22
- With us: 22 years 7 months
- Location: Hamburg, Germany
Re: Advanced Atmosphere Code (Mie and Rayleigh)
you probably didn't choose all the Mie parameters correctly, yet. The colors under backlighting conditions are VERY sensitive, for example.
Fridger
Fridger
-
Topic authorares2101
Re: Advanced Atmosphere Code (Mie and Rayleigh)
t00fri wrote:you probably didn't choose all the Mie parameters correctly, yet. The colors under backlighting conditions are VERY sensitive, for example.
Fridger
So I've gathered, my question was basically"does anyone know how to get my desired result without endless blind tweaking?"
*Edit*'
Strike that, apparently putting only 2 zeroes after the decimal accomplishes what I wanted, previous experimenting had caused to me to avoid doing that, must have been bad luck before.
- t00fri
- Developer
- Posts: 8772
- Joined: 29.03.2002
- Age: 22
- With us: 22 years 7 months
- Location: Hamburg, Germany
Re: Advanced Atmosphere Code (Mie and Rayleigh)
ares2101 wrote:t00fri wrote:you probably didn't choose all the Mie parameters correctly, yet. The colors under backlighting conditions are VERY sensitive, for example.
Fridger
So I've gathered, my question was basically"does anyone know how to get my desired result without endless blind tweaking?"
*Edit*'
Strike that, apparently putting only 2 zeroes after the decimal accomplishes what I wanted, previous experimenting had caused to me to avoid doing that, must have been bad luck before.
Yes I could certainly get things right fairly quickly, but sorry, we are developping "fulltime" these days, which has priority...
Fridger