Page 1 of 1

Atmosphere problem with 1.5.0

Posted: 28.11.2006, 06:16
by Cham
I discovered something very wrong with the new atmosphere code (latest CVS version). I defined a planet around HD 98231. There are two other stars pretty close (Alula Australis Ba and Bb), as seen on the picture below. Look at the vivid atmosphere. This isn't normal. I used exactly the same code for a planet around another star, and the atmosphere works as it should there.

Image

And here's exactly the same planet around another star (Sig Col). The atmosphere rendering is okay in this case (with only one source of light) :

Image

Here's the planet's definition which revealed the problem (I don't think the textures matter much here) :

Code: Select all

"Testella" "HD 98231"
{
   Texture "vol-moon.dds"
   NightTexture "vol-moon-night.dds"
   BumpMap "vol-moonbump.jpg"
   BumpHeight 3
   Radius 2370

   Atmosphere {
      Height 60
      Lower [ 0.8 0.5 0.3 ]
      Upper [ 0.75 0.45 0.25 ]
      Sky [ 0.7 0.4 0.2 ]
      Mie 0.0005
      MieAsymmetry -0.15
      Rayleigh [ 0.0010 0.0001 0.00035 ]
      Absorption [ 0.0 0.000022 0.00022 ]
      MieScaleHeight 18
      CloudHeight 4
      CloudSpeed 10
      CloudMap "vol-moon-clouds.png"
   }

   EllipticalOrbit {
      Period            1.6152
      SemiMajorAxis     0.08
      Eccentricity      0.0068
      Inclination       0.3947
      AscendingNode     76.681
      LongOfPericenter 131.533
           MeanLongitude    181.979
   }

   RotationPeriod  0.12
   Obliquity       177.4
   LongOfRotationAxis 121.07
   Albedo            0.9
}


Posted: 28.11.2006, 11:01
by selden
Cham,


I think perhaps you've forgotten that bright red = vertex shader program error. In other words, it isn't simply a problem with the atmosphere code. It's usually caused by Celestia being unable to cope with a large number of simultaneous surface effects. (I suspect it'll go away if you turn off "show cloud shadows.")

Please provide a copy of shaders.log

Posted: 28.11.2006, 16:01
by chris
selden wrote:Cham,


I think perhaps you've forgotten that bright red = vertex shader program error. In other words, it isn't simply a problem with the atmosphere code. It's usually caused by Celestia being unable to cope with a large number of simultaneous surface effects. (I suspect it'll go away if you turn off "show cloud shadows.")

Please provide a copy of shaders.log


It's probably a bug in how Celestia deals with atmospheres when there are multiple light sources. The surface itself looks fine, it's the atmosphere that looks wrong. Unlike surfaces, atmospheres don't require a lot of interpolants (since there are no textures), so the usual problem where the shaders exceed the hardware limit is probably not the issue here.

--Chris

Posted: 28.11.2006, 16:29
by Cham
Selden,

The surface itself is prefectly fine. All textures are working properly. And cloud shadows is already OFF (it simply doesn't work at all anyway!). In this case, as Chris said, it's only the atmosphere itself which has a problem.