Spec Map Problem

Tips for creating and manipulating planet textures for Celestia.
Topic author
ares2101

Spec Map Problem

Post #1by ares2101 » 17.07.2009, 02:16

Mostly due to laziness I've never bothered to make spec maps for my stuff before, but I decided to give it a try. I read up on making spec maps and to get a sample of how they should turn out, I studied some spec maps I found within add-ons for Orion's Arm and ArcBuilders, I put all of this to the test but I have a problem, unlike what I observe when I look at Earth in Celestia, everything is acting reflective, the reflection does not disappear when land is over it. This comes from 2 planets I've made spec maps for, here's the run down.

Both have white for water and black for land

Both are 2048x1024, the same resolution as their normal map counterparts

One had a transparent layer at one point while I was experimenting, but both currently have no transparent layer, I remembered that being being and removed it from the first, didn't put it in at all in the second

Neither has an alpha channel

Both are .jpg files, like the other spec maps I looked at

This persists for both when designating "X-Spec.*" or "X-Spec.jpg"

Aside from file name, entire Spec code section pasted from Earth's, same spec power, color, etc

Not an artifact of clouds or atmosphere, I toggled them off to check

I'm stumped, I'm sure I followed all the tips and directions for making these maps and neither works right.

System info in my new signature

fungun
Posts: 315
Joined: 30.07.2007
Age: 63
With us: 17 years 4 months
Location: Iowa, USA

Re: Spec Map Problem

Post #2by fungun » 17.07.2009, 08:27

What is your SpecularColor and SpecularPower set to in your scc file for those planets?

Tim

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

Re: Spec Map Problem

Post #3by t00fri » 17.07.2009, 08:47

ares2101 wrote:Mostly due to laziness I've never bothered to make spec maps for my stuff before, but I decided to give it a try. I read up on making spec maps and to get a sample of how they should turn out, I studied some spec maps I found within add-ons for Orion's Arm and ArcBuilders, I put all of this to the test but I have a problem, unlike what I observe when I look at Earth in Celestia, everything is acting reflective, the reflection does not disappear when land is over it. This comes from 2 planets I've made spec maps for, here's the run down.

Both have white for water and black for land

Both are 2048x1024, the same resolution as their normal map counterparts

One had a transparent layer at one point while I was experimenting, but both currently have no transparent layer, I remembered that being being and removed it from the first, didn't put it in at all in the second

Neither has an alpha channel

Both are .jpg files, like the other spec maps I looked at

This persists for both when designating "X-Spec.*" or "X-Spec.jpg"

Aside from file name, entire Spec code section pasted from Earth's, same spec power, color, etc

Not an artifact of clouds or atmosphere, I toggled them off to check

I'm stumped, I'm sure I followed all the tips and directions for making these maps and neither works right.

System info in my new signature

There are two different ways of implementing specmaps:

1) one is like it's done for Earth: you need .PNG format and add the specmap as a "fourth color" (<=> alpha channel) so to speak, on top of the RGB base texture. PNG format can do that while JPG cannot.

With GIMP it's VERY easy to pack the specmap as a layer on top of the base texture. Also my F-TexTools can do this even for monster sized textures where GIMP has to give up. This way of implementing the specmap is more economic, notably for bigger textures.

2) The other way is to make a separate grayscale specmap and register it separately in the .ssc file. Then the base texture should not carry a specmap as well in its alpha channel.

So be careful not to mix these two methods, e.g. by copying in textures from different sources.

I can assure you that specmaps work perfectly in Celestia if they are correctly made and implemented. From the limited information I have, I cannot spot anything wrong in your description.

Fridger
Image

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

Re: Spec Map Problem

Post #4by selden » 17.07.2009, 12:05

Ares,

Your symptoms are consistent with Celestia not being able to find the specmaps.

You might try turning on Celestia's "console log" to see if there are any error messages:
type a tilde (~) and then use the up/down arrow keys to navigate in it.

[edit]
p.s. One issue I noticed in your Addons was that you'd changed the capitalization of the names of the textures directories. You must not do that. Macs and Linux systems require that the capitalization of files and directories exactly match what Celestia is looking for. Otherwise, Celestia won't be able to find them. All of the directory names that Celestia uses are lower case. In particular, "Textures" should be spelled "textures" and "Medres" should be spelled "medres". If you're running under Windows, you won't notice this problem since Windows is case-blind in most circumstances.
[/edit]
Selden

Topic author
ares2101

Re: Spec Map Problem

Post #5by ares2101 » 17.07.2009, 15:38

What is your SpecularColor and SpecularPower set to in your scc file for those planets?

Tim

As I said, pasted straight from Earth values.

SpecularColor [ 0.8 0.8 0.85 ]
SpecularPower 25.0

1) one is like it's done for Earth: you need .PNG format and add the specmap as a "fourth color" (<=> alpha channel) so to speak, on top of the RGB base texture. PNG format can do that while JPG cannot.

With GIMP it's VERY easy to pack the specmap as a layer on top of the base texture.

I do use GIMP, but I don't know how to do this. I've looked at the Earth.png in it and I see what you mean, but I've never put a picture in the alpha before. How do I do that?

Come to think of it, if Earth gets its spec map this way, why does the .ssc specify a nonexistent "earth-spec.*"?

Your symptoms are consistent with Celestia not being able to find the specmaps.

You might try turning on Celestia's "console log" to see if there are any error messages:
type a tilde (~) and then use the up/down arrow keys to navigate in it.

The fact that I saw a reflection, just too much of one, made me skeptical on this, but I think you're right. The console log makes no mention of my spec maps at all, not even a "can't find it" message. Hmm...maybe a problem in the .ssc file.

Wow, it was that simple, I figured it out. Above I mentioned I copied the spec stuff from Earth's file, I posted only what was specific to the question, this is the whole thing:

Code: Select all

# SpecularTexture "earth-spec.*"
   Color [ 0.85 0.85 1.0 ]
   SpecularColor [ 0.8 0.8 0.85 ]
   SpecularPower 25.0


It occurred to me that the "#" might be the answer to my question about why Earth designates a spec map despite having no separate one, the # apparently negates the line. I removed it from both my test planets and now it works just fine.

p.s. One issue I noticed in your Addons was that you'd changed the capitalization of the names of the textures directories. You must not do that. Macs and Linux systems require that the capitalization of files and directories exactly match what Celestia is looking for. Otherwise, Celestia won't be able to find them. All of the directory names that Celestia uses are lower case. In particular, "Textures" should be spelled "textures" and "Medres" should be spelled "medres". If you're running under Windows, you won't notice this problem since Windows is case-blind in most circumstances.

I'll be sure to fix this in the next uploads.

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

Re: Spec Map Problem

Post #6by t00fri » 17.07.2009, 15:58

ares2101 wrote:...
I do use GIMP, but I don't know how to do this. I've looked at the Earth.png in it and I see what you mean, but I've never put a picture in the alpha before. How do I do that?

GIMP has an EXCELLENT manual with many examples. It looks like a vaste of time, if I repeat what is written there very well understandably...How can I know what you know already and what not? Surely, you need to know how to add and fill the alpha channel... It's hard to overlook in the manual.

Come to think of it, if Earth gets its spec map this way, why does the .ssc specify a nonexistent "earth-spec.*"?
Because, some people may prefer to add the spec-map of new, improved Earth textures this way, e.g. because they don't want to learn how to do it otherwise. So this line shows how to do it...

I explicitly wrote to you that you should NOT mix the two ways of implementing a specmap. That's why the separate "earth-spec.*" registration in solarsys.ssc has been commented out as you seem to have discovered yourself lately.

Fridger
Image


Return to “Textures”