Page 1 of 1

C 1.3.2 Win XP - Incorrect ring angles and dark hemispheres

Posted: 24.07.2005, 12:34
by bdm
I have been experimenting with rings on extrasolar planets and I have noticed the following anomalies:
  • Ring shadows do not always appear to be drawn at the correct angle with respect to the local illumination.
  • Ring shadows do not always appear when they should, and sometimes appear with the wrong thickness. This happens if the rings are narrower than a certain width (about 10,000 km).
  • Sometimes, the planet hemisphere on which the ring shadow falls will be noticeably darker than the opposite hemisphere. Sometimes this hemisphere will even be black.

Video card is GeForce 6200. The problems were the same with all possible Ctrl-V settings.

I used the following SSC file to replicate the issue. The exact behaviour that is seen depends on the values for Inner and Outer in the Rings section - see the comments in the SSC file.

Code: Select all

# To view the ring bugs, set the time to 2005 (near maximum ring opening),
# go to Epsilon Indi and view the planet with the local sun to one side.
# The ring shadows don't appear in the correct location.
# Try setting the inner and outer width of the rings to the listed values
# and observe the results.

"Ringbug" "Epsilon Indi"
{
    Texture "uranus.*"
    Color [ 1.0 1.0 0.85 ]
    HazeColor [ 0.0 0.0 1 ]
    HazeDensity 0.25
    Radius 29532
    # Density 1.21

    EllipticalOrbit
    {
        Period            98.3195409993
        SemiMajorAxis     18.6402398316
        Eccentricity      0.19136
        Inclination       50.0231
        AscendingNode     216.2236
        LongOfPericenter  331.6321
        MeanLongitude     88.5363

    }

    Atmosphere
    {
   Height 210
   Lower [ 0.75 0.85 1.0 ]
   Upper [ 0.5 0.8 0.9 ]
   Sky [ 0.6 0.7 0.7 ]


    }

    # 47600 - 57600 - no shadows 
    # 47600 - 58600 - no shadows 
    # 47600 - 59100 - very thin shadow in incorrect location
    # 47600 - 59600 - shading anomalies
    # 47600 - 60600 - shadow in incorrect location
    # 47600 - 61600 - shading errors

    # 55000 - 65000 - no shadows
    # 55000 - 70000 - shadow in incorrect location
    # 55000 - 70000 - shadow in incorrect location
    # 55000 - 75000 - ??

    Rings
    {
   Inner   55000
   Outer   73000
   Texture "saturn-rings.png"
    }

    RotationPeriod       138.330121
    Obliquity            14.5612
    EquatorAscendingNode 274.233
    RotationOffset       90.0000

    Albedo               0.58
}

Posted: 24.07.2005, 16:11
by selden
This problem is visible on my system, too.

It's generally best to eliminate all unnecessary code so it'll be as easy as possible to track down a bug.

Here's what I see with all of the conditions displayed simultaneously.

Image

Here's the code I used:

Code: Select all


"RingBug_1" "EPS Ind" {
   Texture "uranus.*"
   Radius 30000
   Obliquity 15

   EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.001
   }

   Rings {
      Inner 47600
      Outer 57600
      Texture "saturn-rings.*"
   }
}

"RingBug_2" "EPS Ind" {
   Texture "uranus.*"
   Radius 30000
   Obliquity 15

   EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.002
   }

   Rings {
      Inner 47600
      Outer 58600
      Texture "saturn-rings.*"
   }
}

"RingBug_3" "EPS Ind" {
   Texture "uranus.*"
   Radius 30000
   Obliquity 15

   EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.003
   }

   Rings {
      Inner 47600
      Outer 59100
      Texture "saturn-rings.*"
   }
}

"RingBug_4" "EPS Ind" {
   Texture "uranus.*"
   Radius 30000
   Obliquity 15

   EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.004
   }

   Rings {
      Inner 47600
      Outer 59600
      Texture "saturn-rings.*"
   }
}

"RingBug_5" "EPS Ind" {
   Texture "uranus.*"
   Radius 30000
   Obliquity 15

   EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.005
   }

   Rings {
      Inner 47600
      Outer 60600
      Texture "saturn-rings.*"
   }
}

"RingBug_6" "EPS Ind" {
   Texture "uranus.*"
   Radius 30000
   Obliquity 15

   EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.006
   }

   Rings {
      Inner 55000
      Outer 65000
      Texture "saturn-rings.*"
   }
}

"RingBug_7" "EPS Ind" {
   Texture "uranus.*"
   Radius 30000
   Obliquity 15

   EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.007
   }

   Rings {
      Inner 55000
      Outer 70000
      Texture "saturn-rings.*"
   }
}
"RingBug_8" "EPS Ind" {
   Texture "uranus.*"
   Radius 30000
   Obliquity 15

   EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.008
   }

   Rings {
      Inner 55000
      Outer 75000
      Texture "saturn-rings.*"
   }
}


System:
1GB 3.4GHz P4-550; WinXP Pro SP2
128MB GF6600GT, ForceWare v77.72
Celestia v1.4.0pre6
Celestia from CVS today

Posted: 24.07.2005, 21:21
by symaski62
cel://Follow/Sol:RingBug_3/2134-06-17T1 ... 06423&lm=1

LOOOOOOOL


Code: Select all

"RingBug_1" "Sol" {
   Texture "uranus.*"
   Radius 30000
   Obliquity 15

   EllipticalOrbit {Period 100 SemiMajorAxis 20

MeanLongitude 0.001
   }

   Rings {
      Inner 47600
      Outer 57600
      Texture "saturn-rings.*"
   }
}

"RingBug_2" "Sol" {
   Texture "uranus.*"
   Radius 30000
   Obliquity 15

   EllipticalOrbit {Period 100 SemiMajorAxis 20

MeanLongitude 0.003
   }

   Rings {
      Inner 47600
      Outer 58600
      Texture "saturn-rings.*"
   }
}

"RingBug_3" "Sol" {
   Texture "uranus.*"
   Radius 30000
   Obliquity 15

   EllipticalOrbit {Period 100 SemiMajorAxis 20

MeanLongitude 0.005
   }

   Rings {
      Inner 47600
      Outer 59100
      Texture "saturn-rings.*"
   }
}

"RingBug_4" "Sol" {
   Texture "uranus.*"
   Radius 30000
   Obliquity 15

   EllipticalOrbit {Period 100 SemiMajorAxis 20

MeanLongitude 0.007
   }

   Rings {
      Inner 47600
      Outer 59600
      Texture "saturn-rings.*"
   }
}

"RingBug_5" "Sol" {
   Texture "uranus.*"
   Radius 30000
   Obliquity 15

   EllipticalOrbit {Period 100 SemiMajorAxis 20

MeanLongitude 0.009
   }

   Rings {
      Inner 47600
      Outer 60600
      Texture "saturn-rings.*"
   }
}

"RingBug_6" "Sol" {
   Texture "uranus.*"
   Radius 30000
   Obliquity 15

   EllipticalOrbit {Period 100 SemiMajorAxis 20

MeanLongitude 0.011
   }

   Rings {
      Inner 55000
      Outer 65000
      Texture "saturn-rings.*"
   }
}

"RingBug_7" "Sol" {
   Texture "uranus.*"
   Radius 30000
   Obliquity 15

   EllipticalOrbit {Period 100 SemiMajorAxis 20

MeanLongitude 0.013
   }

   Rings {
      Inner 55000
      Outer 70000
      Texture "saturn-rings.*"
   }
}

"RingBug_8" "Sol" {
   Texture "uranus.*"
   Radius 30000
   Obliquity 15

   EllipticalOrbit {Period 100 SemiMajorAxis 20

MeanLongitude 0.015
   }

   Rings {
      Inner 55000
      Outer 75000
      Texture "saturn-rings.*"
   }
}


:lol:

Posted: 25.07.2005, 05:01
by bdm
selden wrote:It's generally best to eliminate all unnecessary code so it'll be as easy as possible to track down a bug.

I'm going to try your trimmed down version to see what happens. I will also try it with an orbital eccentricity of 50 degrees restored to the orbital parameters in case it is important.

Posted: 29.07.2005, 02:51
by bdm
Something interesting to try is turning on the ambient illumination and viewing the planet from the shadow side. It is quite revealing for those cases where the ring shadows don't appear.

Posted: 30.07.2005, 06:58
by bdm
I have just tried out Selden's version of the ringbug files, with one modification. I spaced the planets further apart (0.001, 0.003, 0.005 etc) so that the rings could be seen more easily.

I have found that when the Ambient light is turned up to Medium and the planets are viewed from the night side, the rings appear to cast shadows on the night side. This shadow takes the form of a dark ellipse.

There are three cases here:
* When the ring width is narrow, the ellipse is completely contained within the night side. No ring shadows appear on the day side of the planet. (Ringbug 1, 2, 3 and 6).
* When the ring is sufficiently wide, the ellipse becomes a girdle that encircles the planet. This girdle becomes the shadow of the rings when it crosses the daytime hemisphere. (Ringbug 8 )
* When the ring shadow is intermediate between these two extremes, the outer part of the ellipse crosses the day side but the inner part of the ellipse does not. When this happens, one hemisphere of the planet is darkened. (Ringbug 4, 5 and 7).

Posted: 30.07.2005, 07:26
by bdm
It is interesting to compare the effects of the following modifications:

Radius: 30000
Inner: ranges from 38000 to 54000 increasing by 2000
Outer: fixed at 60000 (2 x radius)
Effect: Darkened hemispheres between 38000 and 46000, 48000 appears to be a borderline case (4/5 x outer), 50000 and greater gives no shadows.

Radius: 30000
Inner: ranges from 58000 to 74000 increasing by 2000
Outer: fixed at 80000
Effect: Ring shadows rendered between 58000 to 66000, darkened hemispheres for 68000 and 70000, no shadows for 72000 and 74000.

"RingBug_1" "EPS Ind" {
Texture "uranus.*"
Radius 30000
Obliquity 15

EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.001
}

Rings {
Inner 47600
Outer 57600
Texture "saturn-rings.*"
}
}

"RingBug_2" "EPS Ind" {
Texture "uranus.*"
Radius 30000
Obliquity 15

EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.003
}

Rings {
Inner 47600
Outer 58600
Texture "saturn-rings.*"
}
}

"RingBug_3" "EPS Ind" {
Texture "uranus.*"
Radius 30000
Obliquity 15

EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.005
}

Rings {
Inner 47600
Outer 59100
Texture "saturn-rings.*"
}
}

"RingBug_4" "EPS Ind" {
Texture "uranus.*"
Radius 30000
Obliquity 15

EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.007
}

Rings {
Inner 47600
Outer 59600
Texture "saturn-rings.*"
}
}

"RingBug_5" "EPS Ind" {
Texture "uranus.*"
Radius 30000
Obliquity 15

EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.009
}

Rings {
Inner 47600
Outer 60600
Texture "saturn-rings.*"
}
}

"RingBug_6" "EPS Ind" {
Texture "uranus.*"
Radius 30000
Obliquity 15

EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.011
}

Rings {
Inner 55000
Outer 65000
Texture "saturn-rings.*"
}
}

"RingBug_7" "EPS Ind" {
Texture "uranus.*"
Radius 30000
Obliquity 15

EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.013
}

Rings {
Inner 55000
Outer 70000
Texture "saturn-rings.*"
}
}
"RingBug_8" "EPS Ind" {
Texture "uranus.*"
Radius 30000
Obliquity 15

EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.015
}

Rings {
Inner 55000
Outer 75000
Texture "saturn-rings.*"
}
}


##############################

"RingBug_10" "EPS Ind" {
Texture "uranus.*"
Radius 30000
Obliquity 15

EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.019
}

Rings {
Inner 38000
Outer 60000
Texture "saturn-rings.*"
}
}


"RingBug_11" "EPS Ind" {
Texture "uranus.*"
Radius 30000
Obliquity 15

EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.021
}

Rings {
Inner 40000
Outer 60000
Texture "saturn-rings.*"
}
}

"RingBug_12" "EPS Ind" {
Texture "uranus.*"
Radius 30000
Obliquity 15

EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.023
}

Rings {
Inner 42000
Outer 60000
Texture "saturn-rings.*"
}
}

"RingBug_13" "EPS Ind" {
Texture "uranus.*"
Radius 30000
Obliquity 15

EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.025
}

Rings {
Inner 44000
Outer 60000
Texture "saturn-rings.*"
}
}

"RingBug_14" "EPS Ind" {
Texture "uranus.*"
Radius 30000
Obliquity 15

EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.027
}

Rings {
Inner 46000
Outer 60000
Texture "saturn-rings.*"
}
}

"RingBug_15" "EPS Ind" {
Texture "uranus.*"
Radius 30000
Obliquity 15

EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.029
}

Rings {
Inner 48000
Outer 60000
Texture "saturn-rings.*"
}
}

"RingBug_16" "EPS Ind" {
Texture "uranus.*"
Radius 30000
Obliquity 15

EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.031
}

Rings {
Inner 50000
Outer 60000
Texture "saturn-rings.*"
}
}

"RingBug_17" "EPS Ind" {
Texture "uranus.*"
Radius 30000
Obliquity 15

EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.033
}

Rings {
Inner 52000
Outer 60000
Texture "saturn-rings.*"
}
}
"RingBug_18" "EPS Ind" {
Texture "uranus.*"
Radius 30000
Obliquity 15

EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.035
}

Rings {
Inner 54000
Outer 60000
Texture "saturn-rings.*"
}
}

#####################################

"RingBug_20" "EPS Ind" {
Texture "uranus.*"
Radius 30000
Obliquity 15

EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.039
}

Rings {
Inner 58000
Outer 80000
Texture "saturn-rings.*"
}
}


"RingBug_21" "EPS Ind" {
Texture "uranus.*"
Radius 30000
Obliquity 15

EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.041
}

Rings {
Inner 60000
Outer 80000
Texture "saturn-rings.*"
}
}

"RingBug_22" "EPS Ind" {
Texture "uranus.*"
Radius 30000
Obliquity 15

EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.043
}

Rings {
Inner 62000
Outer 80000
Texture "saturn-rings.*"
}
}

"RingBug_23" "EPS Ind" {
Texture "uranus.*"
Radius 30000
Obliquity 15

EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.045
}

Rings {
Inner 64000
Outer 80000
Texture "saturn-rings.*"
}
}

"RingBug_24" "EPS Ind" {
Texture "uranus.*"
Radius 30000
Obliquity 15

EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.047
}

Rings {
Inner 66000
Outer 80000
Texture "saturn-rings.*"
}
}

"RingBug_25" "EPS Ind" {
Texture "uranus.*"
Radius 30000
Obliquity 15

EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.049
}

Rings {
Inner 68000
Outer 80000
Texture "saturn-rings.*"
}
}

"RingBug_26" "EPS Ind" {
Texture "uranus.*"
Radius 30000
Obliquity 15

EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.051
}

Rings {
Inner 70000
Outer 80000
Texture "saturn-rings.*"
}
}

"RingBug_27" "EPS Ind" {
Texture "uranus.*"
Radius 30000
Obliquity 15

EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.053
}

Rings {
Inner 72000
Outer 80000
Texture "saturn-rings.*"
}
}

"RingBug_28" "EPS Ind" {
Texture "uranus.*"
Radius 30000
Obliquity 15

EllipticalOrbit {Period 100 SemiMajorAxis 20 MeanLongitude 0.055
}

Rings {
Inner 74000
Outer 80000
Texture "saturn-rings.*"
}
}

Posted: 30.07.2005, 15:55
by symaski62

Posted: 31.07.2005, 02:47
by bdm
Here is something else to try that does not require any custom planets.

1. Set time to current time (July or August 2005).
2. Go to Uranus.
3. View Uranus from the night side.
4. Turn up Ambient light to Medium.

The shadow of the rings will appear as ellipses on the night side of Uranus.

Here is a Celestia URL that shows the problem. Make sure Ambient illumination is set to Low or Medium.

cel://Follow/Sol:Uranus/2005-07-31T02:4 ... 803&lm=135

Posted: 31.07.2005, 11:18
by bdm
The following is an image that illustrates an incorrect angle for the rings. The image does not show it very well, but the shadow of the planet just makes it onto the faint ring on the left. On the right, the shadow of the rings should also just clip the planet, but instead the shadow is almost parallel to the equator.

Image

Here is the SSC entry for this world. I have cut out some fields from the original file. The texture is a 64 x 1 image of my own creation, but any other 64 x 1 png image can be substituted.

"Novitas" "HIP 106440"
{
Texture "neptune.*"
Radius 25078

EllipticalOrbit {
Period 89.4437564559
SemiMajorAxis 15.8741332572
Eccentricity 0.51046
Inclination 54.2334
AscendingNode 188.3315
LongOfPericenter 36.2554
MeanLongitude 19.3365
}

Rings
{
Inner 49700
Outer 61100
# Texture "faint 9.png"
Texture "thin ring.png" # width 64 px, height 1 px
}

RotationPeriod 15.321846
Obliquity 16.25613
EquatorAscendingNode 83.6645
RotationOffset 0

Albedo 0.73
}

Posted: 31.07.2005, 12:44
by selden
The ambient light ring-shadow bug has always been with us. Ambient light is non-physical, so you shoudn't be surprised to see other non-physical side effects.

That said, Chris has made an attempt to fix it in the new OpenGL 2.0 render path that's in Celestia v1.4.0 prereleases. You also need a recent model graphics card (an Nvidia FX 5nnn or better or an ATI Radeon 9500 or better) and the vendor's most recent graphics drivers to see that rendering method.

Posted: 01.08.2005, 01:28
by bdm
selden wrote:The ambient light ring-shadow bug has always been with us.

I'm not referring to the ambient light ring shadow. I am attempting to illustrate the incorrect angle that the ring shadows make on the ball of the planet. This is one of the points I raised in my original post. In my illustration, the sunlight is coming from the 3 o'clock position. The narrow ring is aligned such that the shadows just brush the rings and should just brush the planet. The shadow of the planet on the rings is rendered correctly. However, the shadow of the rings on the planet is being rendered as if the sunlight was coming from the 4 o'clock position.

I will use the ambient ring shadow to illustrate another aspect of this bug. If the ambient ring shadow is a projection of the ring shadows on the ball of the planet, then why is it deformed? Surely it should be approximately planar, given the shadow of the rings is only meant to just touch the planet in the polar region? It will curve a bit, but not to the extent seen in the illustration.

What I believe is happening here is that some mechanism is pulling the ring shadow out of true, by pulling it toward the point on the equator that intersects the terminator. Careful experiments reveal that this effect is real; when the ring shadow reaches the terminator the dark hemisphere effect is seen.

re

Posted: 03.08.2005, 02:48
by John Van Vliet
as to seldons reply 100% correct any small difernces like that are due to making celestia run at 30-60frames/sec
in order to have all the litle things like this be 100% ,would meen that the f/s
would be frames/min. or hour

this ts a good exp. The cassini images try and recreat them( the ones with moons and the ring ) , no mater how had you try all the moons will be a bit off .

Re: re

Posted: 03.08.2005, 05:59
by bdm
john Van Vliet wrote:as to seldons reply 100% correct any small difernces like that are due to making celestia run at 30-60frames/sec
in order to have all the litle things like this be 100% ,would meen that the f/s
would be frames/min. or hour

this ts a good exp. The cassini images try and recreat them( the ones with moons and the ring ) , no mater how had you try all the moons will be a bit off .

I've not done advanced graphics programming, so I have no good idea of how to do the fine detail. Thus, I don't know how technically feasible the following idea would be. But I present the following mathematical model in the hope that it may be useful.

The shadow of a particular ring on a planet always comes from the part of the ring that lies between the planet and the light source. When the rings cast a shadow, the light rays must pass through an imaginary plane that is normal to the incident rays. If we project the rings onto this plane (both toward and away from the planet as needed), then the plane becomes a mask of varying transparency that has essentially the same optical properties as the rings. We could model the shadow that the rings cast in this manner.

To create the mask, the rings would be drawn as a half-ellipse with a height:width ratio of the full ellipse equal to sin i, where i is the angle between the incident light rays and the normal to the plane. A half ellipse is drawn rather than a full ellipse because the part of the rings in the shadow half of the planet cannot cast a shadow on the lit side of the planet. Sin i only needs to be computed once, and then the ellipse can be drawn using standard (fast) circle-drawing algorithms.

A weakness of this algorithm is it does not take into account sources of light that are not points. This may or may not be a problem depending on what the current capabilities of graphics cards are.

One more point with this algorithm: if sin i × the inner width of the rings is greater than the radius of the planet, then the ring drawing can be skipped without computing anything else because the rings will not cast a shadow on the planet. For nonpoint sources, one must subtract half the angular width of the light source w from i when computing whether the rings will cast shadows; if i - w < 0 then assume i = 0.

This idea should be feasible, but I have no idea if it would be fast. Can anyone comment on the likely speed of such an algorithm?

Posted: 03.08.2005, 06:03
by bdm
On second thought, the algorithm is more complex than absolutely necessary. Why create a mask when the rings themselves can be used as a mask at a different angle and with better accuracy for nonpoint sources?

The algorithm does have one useful feature - a way to determine whether ring shadows can be skipped. That has to be useful somewhere.