Celestia 1.6.0 and PNG

Report bugs, bug fixes and workarounds here.
Topic author
ivan.scillone
Posts: 2
Joined: 28.07.2009
With us: 15 years 3 months

Celestia 1.6.0 and PNG

Post #1by ivan.scillone » 28.07.2009, 07:41

In Celestia 1.6.0 (build on Debian Testing) some planets looks like this and all this planets have PNG texture. With version 1.5.1 there are no problems.


Image

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Re: Celestia 1.6.0 and PNG

Post #2by selden » 28.07.2009, 10:10

Please provide the SSC code for a failing example.

Red planets means errors are being returned by the graphics driver's vertex shader compiler.
That's usually caused by Celestia trying to call too many of them -- too many simultaneous different types of shadows, for example.
Selden

Topic author
ivan.scillone
Posts: 2
Joined: 28.07.2009
With us: 15 years 3 months

Re: Celestia 1.6.0 and PNG

Post #3by ivan.scillone » 05.08.2009, 09:49

selden wrote:Please provide the SSC code for a failing example.

If I remove SpecularTexture the planet appears normal.

Code: Select all

"Vulcan" "40 Eri/T'Khut (Charis)"
{
        Class "moon"
        InfoURL "http://www.geocities.com/shirkahr/VulcanAstronomy.html"
        Texture "vulcan.png"
        NightTexture "vulcanite.jpg"
        NormalMap "Vulcanormal.jpg"
        SpecularTexture "vulcanspec.jpg"
        Color [ 0.85 0.85 1.0 ]
        SpecularColor [ 0.7 0.55 0.65 ]
        SpecularPower 20.0
        HazeColor [ 0.43 0.72 1 ]
        HazeDensity 0.5
        Radius 10043
        Atmosphere {
                Height 90
                Lower [ 0.5 0.45 0.6 ]
                Upper [ 0.4 0.35 0.3 ]
                Sky [0.35 0.2 0.5 ]
                CloudHeight 20
                CloudSpeed 100
                CloudMap "myclouds2.png"
        }
        EllipticalOrbit{
                Period 21
                SemiMajorAxis 162889
        }
        RotationPeriod 27
        Albedo 0.45
}

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Re: Celestia 1.6.0 and PNG

Post #4by selden » 05.08.2009, 11:47

If vulcan.png includes an alpha channel, then it conflicts with having a separate SpecularTexture. When a png is used as a Texture, its alpha channel is what defines the surface's specularity.

If you want to provide a separate SpecularTexture, then convert vulcan.png into a jpg image, vulcan.jpg. Traditional jpg images cannot include alpha channels, so there would be no conflict.
Selden


Return to “Bugs”