Alternate Map Bug?

Report bugs, bug fixes and workarounds here.
Topic author
Rich

Alternate Map Bug?

Post #1by Rich » 17.06.2004, 16:07

Hi,
Is this a bug? Seems like one:
When I choose and alternate texmap for a planet, other planets' texmaps change as well. I tested this by viewing Earth & Moon simultaneously, and when I selected an alt texmap for one, the other one changed as well... to one of IT'S alt texmaps. I think I saw a posting with this subject in the past, but can't for the life of me find it.

Further Weirdness: It seems when I've been looking at alot of hi-rez planets, eventually some of the texmaps change to a garbled-looking combination of several maps. Maybe the memory on the GForce get full & doesn't purge the maps? There is no way to purge the texmap (other than choosing a low-res alternate), is there?

-Rich

don
Posts: 1709
Joined: 12.07.2003
With us: 21 years 4 months
Location: Colorado, USA (7000 ft)

Post #2by don » 17.06.2004, 21:02

Hi Rich,

Sounds strange, but like you, also familiar to me in some way.

Could you post some info about your system? For example, the OS, Celestia version, graphics card & it's memory size, and maybe even the text from Celestia's "Help / OpenGL Info" box. This would help a lot.

A step-by-step means of reproducing the error would be perfect, but it sounds like it might be difficult with this one?

Thanks Rich.
-Don G.
My Celestia Scripting Resources page

Avatar: Total Lunar Eclipse from our back yard, Oct 2004. Panasonic FZ1 digital camera (no telescope), 36X digital zoom, 8 second exposure at f6.5.

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

Post #3by selden » 17.06.2004, 21:21

Rich,

If your alternate textures have the same AltSurface names, what you are describing is exactly what is supposed to happen.

For example, when an AltSurface named "Blue" is selected for Earth, if Mars has an AltSurface named "Blue" then Mars will switch to that AltSurface, too.

I just tested the following AltSurface.SSC file:

Code: Select all

AltSurface "Blue" "Sol/Earth" {
   Texture "Europa.*"
}
AltSurface "Blue" "Sol/Mars" {
   Texture "Europa.*"
}
AltSurface "Red" "Sol/Jupiter" {
   Texture "Io.*"
}


I went to Earth and chose the AltSurface Blue.
The Earth changed and looked like Europa.
I went to Mars. It also looked like Europa.
I went to Jupiter. It did not look like Europa. It had its usual belts and red spot.

I then chose the AltSurface Red.
Jupiter changed and looked like Io.
I went to Mars.
It looked like Mars.
I went to Earth.
It looked like Earth, with blue oceans and clouds.

Does this describe what you see, or is something else happening?

As for overflowing graphics memory, yes, that is a deficiency in Celestia. It would be nice if that could be fixed in a future version.
Selden

Topic author
Rich

Alt map bug

Post #4by Rich » 18.06.2004, 13:26

Hi Guys,
I use a Mac 1.25 ghz dual processor, 1024RAM, Geforce Ti 4600 card. My Celestia version is 1.3.1-1.
There are actually 2 things going on here, and I am thinking the first is related to card memory limits, and the second to Celestia.
1. There is a jumbled-texture problem where a planet will display and blink a jumble of multiple textures - this problem seems to only happen in hi-rez mode with 4K maps after displaying a few planets; and
2. In any resolution mode there is the atlmap selection (thru the altmap menu or a CEL script) causing a simultaneously displayed wrong texture on a non-selected planet (the "jumble texture" is usually one of them if I am in hi-rez mode).
I am using different alt textures for each planet, my ssc file is as follows:
AltSurface "EarthLoRB1" "Sol/Earth"
{
Texture "earth_lo_rb1.jpg"
}

AltSurface "MoonLoRB1" "Sol/Earth/Moon"
{
Texture "moonMedLo.jpg"
}

That is, I am USUALLY using different alt textures for each planet - - Seldon, you did clear something up for me - after your post I realized that when I use this command:
setsurface { name "default" }
all my planet maps go back to the default map and not just the one planet I had chosen; "default" is a common name to all planets. (call this problem 2a)

In my script, my goal is to display ONE hi-rez map at a time, while another planet in view is made to have a lo-rez map via setsurface command. I think the common "default" map hurtle (problem 2a) is simply to define all as default first, then to define the to-be-low rez planet after that. It's an 'ordering' thing.

Don, as for posting my help text: I use the mac version of Celestisa. When I select "Help", here is the help text I am presented with:

"Help isn't available for Celestia" :?

To reproduce the error, what you could do is display earth & moon simultaneously, one almost behind the other but both visiblem and make your FOV small, like 4. Now you can see both planets large. Now select an altmap for one and see if the other one changes.
You can try this URL:
cel://Freeflight/2004-05-23T08:29:58.77235?x=8Jrmd0/AB0O2DA&y=1yJHjlmNOAE&z=pEiKJ9duOCMO&ow=0.140012&ox=0.164360&oy=0.976282&oz=0.015991&fov=4.186841&ts=0.001000<d=0&rf=121751&lm=2

Thanks!
-Rich[/url]

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

Post #5by selden » 18.06.2004, 14:09

Rich,

I'm sorry to say that it looks like you've encountered a deficiency in how the AltSurface handling is designed. The same AltSurface name is applied to all objects simultaneously. If that AltSurface name isn't defined for a body, then that body is displayed showing its "Normal" surface. One can hope that the AltSurface implementation can be expanded in a future version of Celestia.

The "obvious" workaround is to define many AltSurfaces for all bodies so that the appropriate surface textures are displayed in combination. Of course, this is a pain, since you'll need to define so meny entries.
For example:

Code: Select all

AltSurface "IoHighOthersLow" "Sol/Jupiter/Io" {
Texture "io-hires.*"
}
AltSurface "IoHighOthersLow" "Sol/Earth/Moon" {
Texture "moon-lores.*"
}
AltSurface "IoHighOthersLow" "Sol/Earth" {
Texture "earth-lores.*"
}
AltSurface "MoonHighOthersLow" "Sol/Jupiter/Io" {
Texture "io-lores.*"
}
AltSurface "MoonHighOthersLow" "Sol/Earth/Moon" {
Texture "moon-hires.*"
}
AltSurface "MoonHighOthersLow" "Sol/Earth" {
Texture "earth-lores.*"
}
AltSurface "EarthHighOthersLow" "Sol/Jupiter/Io" {
Texture "io-lores.*"
}
AltSurface "EarthHighOthersLow" "Sol/Earth/Moon" {
Texture "moon-lores.*"
}
AltSurface "EarthHighOthersLow" "Sol/Earth" {
Texture "earth-hires.*"
}
Selden

Topic author
Rich

Alt map bug

Post #6by Rich » 18.06.2004, 14:50

Sorry to beat a dead horse here....

Seldon,
Yes- I was prepared to define altmaps for all objects required... however, even if I do, I still get the problem - I think it's slightly different than we first thought.... If I script the following in a cel...

select { object "earth"}
setsurface { name "EarthLoRB1" }
select { object "moon"}
setsurface { name "MoonLoRB1" }
select { object "earth"}
setsurface { name "EarthLoRB1" }

... first the lo-res earth surface appears, then it switches to the DEFAULT earth surface upon receiving the moon setsurface command, then earth low and moon default, i.e., they flipflop between defined and default, with one planet going to it's default map when another's is alternately defined. Eventually I'll get the jumbled texmap but I think that's memory limit.
I'm wondering if it's duplicatable on a PC...

I think the workaround in this default-flipping case would be to stay in Med-Res mode so all texmaps are medium res by default, and use Hi-res textures as the alt maps - that way all planets but a single selected "subject planet" is in hi-rez, and when they "flip to default", it'll be OK... the problem is that I'll have to either move or copy the maps to my folder defining alt maps - right...? I assume we can't call an alt texmap from a defined location like "celestiaresources/textures/hires/blahblah.*"

I'll fool around with that idea.

Whew...
-Rich

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

Post #7by selden » 18.06.2004, 15:07

Rich,

What you are describing is exactly what I would expect if your .SSC file does not contain AltSurface entries with the same name for every object that will be viewed.

Note that my posts have been describing what you must have in an SSC file, while you've been describing how you use a script to select among those SSC definitions.

In other words, for your example script fragment to work the way you say you want it to work with Celestia v1.3.1, you must create an SSC file with these entries:

Code: Select all

AltSurface "EarthLoRB1" "Sol/Earth" {
    Texture "earth-lores.*"
}
AltSurface "EarthLoRB1" "Sol/Earth/Moon" {
    Texture "moon-lores.*"
}
AltSurface "MoonLoRB1" "Sol/Earth" {
    Texture "earth-lores.*"
}
AltSurface "MoonLoRB1" "Sol/Earth/Moon" {
    Texture "moon-lores.*"
}


This causes lores textures to be shown on both bodies whether you select
EarthLo or MoonLo.

If at other times you want to be able to select high on one and low on the other while both are in view, then you must add (at least) 4 more entries.

Code: Select all

AltSurface "EarthLoMoonHiRB1" "Sol/Earth" {
    Texture "earth-lores.*"
}
AltSurface "EarthLoMoonHiRB1" "Sol/Earth/Moon" {
    Texture "moon-hires.*"
}
AltSurface "MoonLoEarthHiRB1" "Sol/Earth" {
    Texture "earth-hires.*"
}
AltSurface "MoonLoEarthHiRB1" "Sol/Earth/Moon" {
    Texture "moon-lores.*"
}
Selden

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

Post #8by selden » 18.06.2004, 15:23

Rich,

If you only have the one file with the specified name, it doesn't matter which directory the AltSurface texture is in (hires, lores or medres) Celestia looks for it in all three directories: in medres, lores and hires, in that order.

So you can put all of your hires textures in the hires folder, but make sure they have names that are different from the default planet surface texture names. For example, the one for Earth might be named earth-hires.jpg.
Selden

Topic author
Rich

Alt surface bug

Post #9by Rich » 18.06.2004, 19:08

Seldon -
NOW I get it! I think I get what you're saying now, re one low and one high. Thanks for the postings. I'll fool around with this and post my results.

-Rich

don
Posts: 1709
Joined: 12.07.2003
With us: 21 years 4 months
Location: Colorado, USA (7000 ft)

Post #10by don » 18.06.2004, 21:44

Just catching up on all your messages in here. Thanks for your examples Selden.

Rich, please DO let us know how it works out. This is something I can add to the setsurface command description in the CEL Scripting Guide, so others won't have to go through all this trouble.

Cheers,
-Don G.

My Celestia Scripting Resources page



Avatar: Total Lunar Eclipse from our back yard, Oct 2004. Panasonic FZ1 digital camera (no telescope), 36X digital zoom, 8 second exposure at f6.5.


Return to “Bugs”