Specular in Celestia 1.4.0 pre 6.Is it worth?

General discussion about Celestia that doesn't fit into other forums.
Topic author
danielj
Posts: 1477
Joined: 15.08.2003
With us: 21 years 3 months

Specular in Celestia 1.4.0 pre 6.Is it worth?

Post #1by danielj » 23.03.2005, 22:28

I think the Open GL 2.0 path in Celestia 1.4.0 pre 6 has a kind of specular effect.So,I wonder if is it worth using a Specular Map(maybe the exception could be the Earth).
And aside Earth,what planet or moon really looks better with a specular texture?

Sky Pilot
Posts: 99
Joined: 01.12.2004
With us: 19 years 11 months
Location: Moved recently from the Bihem System, now in Fort Worth, Texas, USA

Post #2by Sky Pilot » 23.03.2005, 22:41

I just took a look around the room and saw several people looking at each other as if they wanted to ask what a "specular texture" is, but no one wanted to come forward to look really stupid, so I volunteered.

Um, what's a specular texture?
"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Don. Edwards
Posts: 1510
Joined: 07.09.2002
Age: 59
With us: 22 years 2 months
Location: Albany, Oregon

Post #3by Don. Edwards » 23.03.2005, 22:56

It the black and white texture of Earth that shows the oceans as white and the land as black. What does it does do. It tells Celestia were to render reflective sun light of the water and were not to. Anyone that has a video card that render the specmap effects and doesn't use them is really mising out.

BTW,
Specmap support has been in Celestia and the OpenGL extentions almost from the begining. It is not something that has just be added. I have used the effect on my Celestia installs for almost three years now.

Don. Edwards
I am officially a retired member.
I might answer a PM or a post if its relevant to something.

Ah, never say never!!
Past texture releases, Hmm let me think about it

Thanks for your understanding.

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #4by t00fri » 23.03.2005, 23:04

Sky Pilot wrote:I just took a look around the room and saw several people looking at each other as if they wanted to ask what a "specular texture" is, but no one wanted to come forward to look really stupid, so I volunteered.

Um, what's a specular texture?


Sky Pilot,

you surely know that a standard colored texture is actually composed of 3 distinct grayscale channels, one for Red, one for Green and one for Blue (RGB). But there is a fourth channel that less people are aware of: the so-called 'alpha channel'. It's also a grayscale channel but serves a variety of possible functions. The alpha channel may e.g. encode altitude information about the texture. white=highest, black=lowest. Then we call this a 'bump map'. Or it may be used to characterize /transparency/ in the texture. This we often use when making cloud textures! (you want to see down to the surface here and there...)

Or, it may be used to carry information about the 'reflectivity' properties of the texture: black=unreflective , white=total reflection.

That's what a specular texture exploits: suppose you encode all oceans in white (totally reflective) and all land in black in that 'alpha-channel'.
Then in the resulting 3d display you see the Sun's reflection in the sea and no reflections on continents.

In Celestia the reflectivity properties in form of an alpha channel are administrated in a separate so-called specular texture. It is interpreted as an alpha channel internally and produces the decribed effect.

Was this about clear?

Bye Fridger
Last edited by t00fri on 24.03.2005, 13:04, edited 1 time in total.

Topic author
danielj
Posts: 1477
Joined: 15.08.2003
With us: 21 years 3 months

Post #5by danielj » 23.03.2005, 23:27

I am using a earthspec32k.ctx,but there aren??t any reflection on water,only on earth.What can I do?
Aside Harald Schmidt,is there another specular texture that shows reflections on water?

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #6by t00fri » 23.03.2005, 23:35

danielj wrote:I am using a earthspec32k.ctx,but there aren??t any reflection on water,only on earth.What can I do?
Aside Harald Schmidt,is there another specular texture that shows reflections on water?


If this is really the case (which sounds hard to believe), you just need to invert the whole earthspec texture, i.e. black -> white, white -> black.

Apparently you did not understand what I tried to explain to Sky Pilot above. Too bad...

There must be many such spec textures on Motherlode. I don't really know. If I need one I quickly make one. Takes less than 2 minutes. Certainly less than writing this post ;-)

Try smaller sizes first. Like 4k. Look whether they are also inverted (land <-> sea reflectivity).

Bye Fridger

Andy74 M
Posts: 114
Joined: 21.07.2004
Age: 50
With us: 20 years 4 months
Location: Regensburg, Germany

Post #7by Andy74 » 24.03.2005, 09:35

Fridger,

I really appreciate your explanation about the usage of the alpha channel in textures.
If you could spend another minute, I'd have just one more question: Is the alpha channel also used with normal maps?

Thanks
Andy

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #8by t00fri » 24.03.2005, 12:57

Andy74 wrote:Fridger,

I really appreciate your explanation about the usage of the alpha channel in textures.
If you could spend another minute, I'd have just one more question: Is the alpha channel also used with normal maps?

Thanks
Andy


Andy,

Normal maps are submitted to rendering in Celestia as regular RGB textures with the normals to the surface in question being encoded with particular colors.

Here is a small illustration of how a normal map of the Himalaya region on Earth would look like:

Bye Fridger

PS: I should have added above that not all image formats are able to host an alpha channel besides RGB! JPG cannot but PNG can...DXT1 cannot but DXT3 can...

Image

Sky Pilot
Posts: 99
Joined: 01.12.2004
With us: 19 years 11 months
Location: Moved recently from the Bihem System, now in Fort Worth, Texas, USA

Post #9by Sky Pilot » 24.03.2005, 14:12

Wow! Thanks Fridger. I really didn't know all of that. I appreciate very much your answer.

I suppose it's not possible to use the alpha channel for multiple purposes at the same time?? So if I want reflectivity and transparancy and a bump map, I would have to create three seperate textures? Also, I wasn't clear on whether the term "spectral map" refers to ALL uses of the alpha channel or just to its use to provide reflectivity between the land and oceans.

Many thanks.
"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #10by t00fri » 24.03.2005, 16:03

Sky Pilot wrote:Wow! Thanks Fridger. I really didn't know all of that. I appreciate very much your answer.

I suppose it's not possible to use the alpha channel for multiple purposes at the same time?? So if I want reflectivity and transparancy and a bump map, I would have to create three seperate textures? Also, I wasn't clear on whether the term "spectral map" refers to ALL uses of the alpha channel or just to its use to provide reflectivity between the land and oceans.

Many thanks.


Here is an example what can be done along these lines:

As I said, certain image formats allow to host an alpha channel besides the 3 RGB channels. Celestia can indeed directly interpret the alpha channel of such a 4 channel texture file in the rendering process as transparency information.

Standard image manipulation programs (Photoshop, GIMP) have nice facilities to /statically/ render a bump map for the main texture. The result would be a texture with transparency information /and/ static (i.e. time-independent) 3d shading of mountains and valleys...

Via dialogs in the programs, one may once for all adjust the angles of incidence of the lights source responsible for the shadow generation process.

Example: Clouds having a nice 3d like appearance (due to static bump mapping) /and/ transparency, such that we can see through to the planet's surface here and there.

This way, one may indeed combine static shading and transparency in ONE single texture. That's how we actually did it in the early versions of Celestia....

Clearly, the disadvantage is that the shadow patterns would not adapt to the changing position of the Sun!


Bye Fridger

Andy74 M
Posts: 114
Joined: 21.07.2004
Age: 50
With us: 20 years 4 months
Location: Regensburg, Germany

Post #11by Andy74 » 24.03.2005, 16:11

Fridger,

thank you very much for your helpful illustrations.
:D

Andy


Return to “Celestia Users”