It is currently Mon, 10-12-18, 8:50 GMT

All times are UTC




Post new topic Reply to topic  [ 96 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  Next
Author Message
 Post subject:
PostPosted: Thu, 15-11-07, 21:24 GMT 
Offline
Site Admin
User avatar

Joined: Fri, 31-08-07, 7:01 GMT
Posts: 4591
Location: Hamburg, Germany
chris wrote:
chris wrote:
t00fri wrote:
The result of the call

> scattersim -l -w 1024 -h 1024 earth.cfg

seems to exhibit still some strange artefacts in the image in topright position:



You're right . . . I hadn't noticed it in the smaller views. I'm looking into it now--it's quite tricky to use the lookup tables properly.

--Chris


It looks like they're artifacts of bilinear interpolation in the extinction lookup table. I think that I probably need to change my approach slightly and create a lookup table of optical depths, then compute the extinction from that. The optical depth doesn't vary linearly either (with view height and angle), but it's much closer to linear than extinction, which is exp(optical depth).

--Chris


Chris,

it seems to me that such regular "interference type" patterns dont look very much like interpolation artefacts. But probably one has simply to try otherwise.

Bye Fridger


Top
 Profile  
 
 Post subject:
PostPosted: Thu, 15-11-07, 21:45 GMT 
Offline
User avatar

Joined: Wed, 05-09-07, 0:09 GMT
Posts: 57
Location: Seattle, WA, USA
t00fri wrote:
chris wrote:
It looks like they're artifacts of bilinear interpolation in the extinction lookup table. I think that I probably need to change my approach slightly and create a lookup table of optical depths, then compute the extinction from that. The optical depth doesn't vary linearly either (with view height and angle), but it's much closer to linear than extinction, which is exp(optical depth).

--Chris


Chris,

it seems to me that such regular "interference type" patterns dont look very much like interpolation artefacts. But probably one has simply to try otherwise.

Bye Fridger


Some evidence that it is an interpolation artifact: you can work around the problem for now by increasing the size of the extinction lookup table: in scattersim.cpp, adjust the constant ExtinctionLUTViewAngleSteps from 256 to 512.

--Chris


Top
 Profile  
 
 Post subject:
PostPosted: Thu, 15-11-07, 22:03 GMT 
Offline
Site Admin
User avatar

Joined: Fri, 31-08-07, 7:01 GMT
Posts: 4591
Location: Hamburg, Germany
Chris,

indeed, I modified both

// Extinction lookup table dimensions
const unsigned int ExtinctionLUTHeightSteps = 256;
const unsigned int ExtinctionLUTViewAngleSteps = 512;

and the artefact was gone. Any reason against increasing 'const unsigned int ExtinctionLUTHeightSteps = 256;' also by a factor of two?

It is clear that it is related to the LUT, since without the -l option the artefact is not present.

bye Fridger

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu, 15-11-07, 22:11 GMT 
Offline
User avatar

Joined: Wed, 05-09-07, 0:09 GMT
Posts: 57
Location: Seattle, WA, USA
t00fri wrote:
Chris,

indeed, I modified both

// Extinction lookup table dimensions
const unsigned int ExtinctionLUTHeightSteps = 256;
const unsigned int ExtinctionLUTViewAngleSteps = 512;

and the artefact was gone. Any reason against increasing 'const unsigned int ExtinctionLUTHeightSteps = 256;' also by a factor of two?

It is clear that it is related to the LUT, since without the -l option the artefact is not present.


I've been trying to keep the LUTs as small as possible. Since my plan is to implement this technique in Celestia on the GPU with the LUTs in textures, it's best to not waste graphics memory by making them unnecessarily large. Increasing the size of the extinction LUT isn't such a problem since it's only 2D. However, the inscattering LUT is 3D, and thus the maximum size of any dimension is quite constrained.

--Chris


Top
 Profile  
 
 Post subject:
PostPosted: Thu, 15-11-07, 22:22 GMT 
Offline
Site Admin
User avatar

Joined: Fri, 31-08-07, 7:01 GMT
Posts: 4591
Location: Hamburg, Germany
Chris,

in your .cfg files, did you generally tune the wavelengths corresponding to your Rayleigh colors to be in the ration 1/lambda^4? The relation between RGB colors and wavelengths can be looked up in the net.


F.

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu, 15-11-07, 22:47 GMT 
Offline
User avatar

Joined: Wed, 05-09-07, 0:09 GMT
Posts: 57
Location: Seattle, WA, USA
t00fri wrote:
Chris,

in your .cfg files, did you generally tune the wavelengths corresponding to your Rayleigh colors to be in the ration 1/lambda^4? The relation between RGB colors and wavelengths can be looked up in the net.


Yes, I did. I assumed 600nm for red, 520nm for green, and 450nm for blue. It occurs to me that the cfg files would be easier to edit if there was a separate term multiplied that was multiplied by the scattering coefficients. Then you could change the density of the atmosphere by adjusting that one term while leaving the separate rgb values alone and maintaining the 1/lambda^4 relationship.

--Chris


Top
 Profile  
 
 Post subject:
PostPosted: Thu, 15-11-07, 23:11 GMT 
Offline
Site Admin
User avatar

Joined: Fri, 31-08-07, 7:01 GMT
Posts: 4591
Location: Hamburg, Germany
Good...

I wonder how to simplify the adjustments of the various color-related parameters. Perhaps it would be easier to use my H S V -> RGB routine (galaxy.cpp) with the constraint of 1/lambda^4 RGB-lambda ratios. What one typically wants is to modify the Value=V, and the Hue=H. It may be the easier approach to reality. Normally one wants to keep the Saturation=S rather constant.


While I didn't have the time to compare the definitions of your various Mie parameters in scattersim with those previously used in Celestia, the question is how similiar they are at this time? It rather seems their definition is NOT identical.

Bye F.


Top
 Profile  
 
 Post subject:
PostPosted: Fri, 16-11-07, 0:29 GMT 
Offline
Site Admin
User avatar

Joined: Fri, 31-08-07, 7:01 GMT
Posts: 4591
Location: Hamburg, Germany
Warming up a bit with 'scattersim' for Titan...

Image

Here are the modified parameters:

Code:
Radius                   2575

SurfaceRed               0.5
SurfaceGreen             0.5
SurfaceBlue              0.5

RayleighScaleHeight      0
RayleighRed              0.00106
RayleighGreen            0.0018
RayleighBlue             0.00323

MieScaleHeight           220.0
Mie                      0.00005
MieAsymmetry             -0.15

AbsorbScaleHeight        60
AbsorbRed                0.0035
AbsorbGreen              0.0075
AbsorbBlue               0.025


The Raleigh ratios have not been changed in order to retain 1/lambda^4 scaling.

Bye F.


Top
 Profile  
 
 Post subject:
PostPosted: Fri, 16-11-07, 0:32 GMT 
Offline
Site Admin
User avatar

Joined: Fri, 31-08-07, 7:01 GMT
Posts: 4591
Location: Hamburg, Germany
I don't really understand the behaviour of the MieAssymetry parameter. Got to look into the code.
The backscattering is not really increasing when it's negative value grows...

F.

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Fri, 16-11-07, 0:45 GMT 
Offline
User avatar

Joined: Wed, 05-09-07, 0:09 GMT
Posts: 57
Location: Seattle, WA, USA
t00fri wrote:
Good...

I wonder how to simplify the adjustments of the various color-related parameters. Perhaps it would be easier to use my H S V -> RGB routine (galaxy.cpp) with the constraint of 1/lambda^4 RGB-lambda ratios. What one typically wants is to modify the Value=V, and the Hue=H. It may be the easier approach to reality. Normally one wants to keep the Saturation=S rather constant.


While I didn't have the time to compare the definitions of your various Mie parameters in scattersim with those previously used in Celestia, the question is how similiar they are at this time? It rather seems their definition is NOT identical.


I think that the Rayleigh and Mie parameters in scattersim are differ from Celestia's by a factor of 4*PI. Scattersim should probably be modified. In Celestia, the Rayleigh and Mie values represent the fraction of light lost to outscattering per kilometer at h=0 (sea level.) In scattersim, these values K/lambda^4, where K is the constant molecular density at sea level. The attenuation due to outscattering is 4*PI*K/lambda^4. I think that attenuation is the more intuitive quantity to use.

I don't think that it's appropriate to use HSV here, since we're not describing a color but attenuation as a function of wavelength (albeit with just three wavelength samples.)

We should be able to calculate correct values for Earth's atmosphere. Nishita gives K as:

2*pi^2*(n^2 - 1)^2 / (3*Ns)

where n is the index of refraction of air, and Ns is the molecular number density of the standard atmosphere. If you try this, keep in mind that both scattersim and Celestia want attenuation coefficients in units of km^-1, not meters^-1.

--Chris


Top
 Profile  
 
 Post subject:
PostPosted: Fri, 16-11-07, 0:48 GMT 
Offline
User avatar

Joined: Wed, 05-09-07, 0:09 GMT
Posts: 57
Location: Seattle, WA, USA
t00fri wrote:
Warming up a bit with 'scattersim' for Titan...

Here are the modified parameters:

Code:
Radius                   2575

SurfaceRed               0.5
SurfaceGreen             0.5
SurfaceBlue              0.5

RayleighScaleHeight      0
RayleighRed              0.00106
RayleighGreen            0.0018
RayleighBlue             0.00323

MieScaleHeight           220.0
Mie                      0.00005
MieAsymmetry             -0.15

AbsorbScaleHeight        60
AbsorbRed                0.0035
AbsorbGreen              0.0075
AbsorbBlue               0.025


The Raleigh ratios have not been changed in order to retain 1/lambda^4 scaling.


Hmmm . . . I don't think that the Rayleigh scale height should be zero--surely the molecular nitrogen in Titan's atmosphere is responsible for some Rayleigh scattering.

--Chris


Top
 Profile  
 
 Post subject:
PostPosted: Fri, 16-11-07, 1:05 GMT 
Offline
Site Admin
User avatar

Joined: Fri, 31-08-07, 7:01 GMT
Posts: 4591
Location: Hamburg, Germany
chris wrote:

I think that the Rayleigh and Mie parameters in scattersim are differ from Celestia's by a factor of 4*PI. Scattersim should probably be modified. In Celestia, the Rayleigh and Mie values represent the fraction of light lost to outscattering per kilometer at h=0 (sea level.) In scattersim, these values K/lambda^4, where K is the constant molecular density at sea level. The attenuation due to outscattering is 4*PI*K/lambda^4. I think that attenuation is the more intuitive quantity to use.


Aha! That's what I mostly figured out qualitatively.

Quote:
I don't think that it's appropriate to use HSV here, since we're not describing a color but attenuation as a function of wavelength (albeit with just three wavelength samples.)

We should be able to calculate correct values for Earth's atmosphere. Nishita gives K as:

2*pi^2*(n^2 - 1)^2 / (3*Ns)

where n is the index of refraction of air, and Ns is the molecular number density of the standard atmosphere. If you try this, keep in mind that both scattersim and Celestia want attenuation coefficients in units of km^-1, not meters^-1.

--Chris

Yes for Earth we can calculate it, but for Titan and Venus I don't think we can.

F.


Top
 Profile  
 
 Post subject:
PostPosted: Fri, 16-11-07, 1:10 GMT 
Offline
Site Admin
User avatar

Joined: Fri, 31-08-07, 7:01 GMT
Posts: 4591
Location: Hamburg, Germany
chris wrote:
t00fri wrote:
Warming up a bit with 'scattersim' for Titan...

Here are the modified parameters:

Code:
Radius                   2575

SurfaceRed               0.5
SurfaceGreen             0.5
SurfaceBlue              0.5

RayleighScaleHeight      0
RayleighRed              0.00106
RayleighGreen            0.0018
RayleighBlue             0.00323

MieScaleHeight           220.0
Mie                      0.00005
MieAsymmetry             -0.15

AbsorbScaleHeight        60
AbsorbRed                0.0035
AbsorbGreen              0.0075
AbsorbBlue               0.025


The Raleigh ratios have not been changed in order to retain 1/lambda^4 scaling.


Hmmm . . . I don't think that the Rayleigh scale height should be zero--surely the molecular nitrogen in Titan's atmosphere is responsible for some Rayleigh scattering.

--Chris


Of course, the height should be nonzero. But if I set a non-zero value, a sharp colored ring appears around the scale height, which is obviously incorrect. So I got to see what's in the code. If I set the scale height 1-2 it's still OK. But bigger values produce that artefact.

F.


Top
 Profile  
 
 Post subject:
PostPosted: Fri, 16-11-07, 22:56 GMT 
Offline
User avatar

Joined: Wed, 05-09-07, 0:09 GMT
Posts: 57
Location: Seattle, WA, USA
t00fri wrote:
Of course, the height should be nonzero. But if I set a non-zero value, a sharp colored ring appears around the scale height, which is obviously incorrect. So I got to see what's in the code. If I set the scale height 1-2 it's still OK. But bigger values produce that artefact.


I'd like to see an image of this phenomenon along with the parameter set you used to produce it. There could be bugs in the code, but I'm confident enough in it that I think what you're seeing might be realistic.

--Chris


Top
 Profile  
 
 Post subject:
PostPosted: Fri, 16-11-07, 23:18 GMT 
Offline
Site Admin
User avatar

Joined: Fri, 31-08-07, 7:01 GMT
Posts: 4591
Location: Hamburg, Germany
chris wrote:
t00fri wrote:
Of course, the height should be nonzero. But if I set a non-zero value, a sharp colored ring appears around the scale height, which is obviously incorrect. So I got to see what's in the code. If I set the scale height 1-2 it's still OK. But bigger values produce that artefact.


I'd like to see an image of this phenomenon along with the parameter set you used to produce it. There could be bugs in the code, but I'm confident enough in it that I think what you're seeing might be realistic.

--Chris


OK here it is. Same parameters as previous titan image, except RayleighScaleHeight = 100.0 instead of = 0, previously.

Image

Bye Fridger


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 96 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group