Page 1 of 1

Night Texture in Eclipse Bug

Posted: 08.03.2020, 04:48
by Sirius_Alpha
While testing some functionality for short-period exomoons around hot planets, I noticed the following problem:

In situations where a body with a night-texture has an eclipse-shadow on it, the night-texture is not rendered in the eclipse, creating rather odd visual effects. After the eclipse has progressed a certain amount, the night-texture on the opposite hemisphere of the body then vanishes.

Sample .ssc file:

Code: Select all

"KAP And b" "KAP And"
{
   Class "planet"
   Texture "browndwarf.*"
   Emissive true
   Color [1 0.5 0.5]
   Radius 68854
   Oblateness 0.06
   EllipticalOrbit
   {
      Period 420
      SemiMajorAxis 80
      Eccentricity 0.74
      Inclination 12.247017
      AscendingNode 156.053294
      ArgOfPericenter 75.188749
   }
   UniformRotation
   {
      Period 2.603896
      Inclination 12.247017
      AscendingNode 156.053294
   }
   LunarLambert 0.5
}

"I" "KAP And/KAP And b"
{
   Class "moon"
   Texture "venuslike.*"
   NightTexture "venuslikenight.*"
   Radius 12742
   OrbitFrame { EclipticJ2000 { Center "KAP And/KAP And b" } }
   BodyFrame { EclipticJ2000 { Center "KAP And/KAP And b" } }
   EllipticalOrbit
   {
      Period 0.125
      SemiMajorAxis 169449.222677007
      ArgOfPericenter 122.070392643132
      MeanAnomaly -6.70552253723145E-07
   }
   LunarLambert 0.5
}


NightShadowBug.jpg
Lack of night-texture in eclipsed area.

NightShadowBug2.jpg
Now the night-texture disappears on part of the anti-star hemisphere.

Posted: 08.03.2020, 05:15
by John Van Vliet
I think i can reproduce the bug

it is in "multitexture" and "OpenGL+nvidia" BUT NOT in OpenGL2 rendering

using IO as an example

this first one is gl1+nvidia
OGL.Nvidia.png


this one is OpenGL2 shader
OGL2.png

Posted: 08.03.2020, 17:27
by SevenSpheres
I can reproduce the first bug in all render paths (including OpenGL 2.0), but I can't reproduce the second bug in any render path. Specifically, in "Multitexture", "OpenGL vertex program", and "OpenGL 2.0", no night texture is shown on the eclipsed part of the moon, but the night texture on the anti-starward side is always visible.