Page 1 of 1

Alternate Surface problem

Posted: 30.06.2010, 12:14
by romanvida
Hi, :)
what am I to do with Celestia to make it display alternate surface of my extrasolar planet Kvarta near Alfa Centauri A? :? The planet itself with it`s own surface displayes all right, but the right click of mouse on it gives not an item "Alternative surfaces" in the menu window... This is a structure and the content of files of my addon that I placed into the folder "extras" of Celestia:

folder "Babula" - file "Babula.ssc"
______________folder "textures" - folder "medres" - file "Babula.ctx"
_____________________________________________folder "Babula" - file "Babula.jpg"

"Babula.ssc":
AltSurface "Babula" "ALF Cen A/Kvarta"
{
Texture "Babula.jpg"
}

"Babula.ctx":
VirtualTexture
{
ImageDirectory "Babula"
TileType "jpg"
}
Thanks!

Re: Alternate Surface problem

Posted: 30.06.2010, 12:52
by Hungry4info
You toggle alt surfaces with the Keypad [+] (plus) key (by default).

Re: Alternate Surface problem

Posted: 30.06.2010, 14:32
by Chuft-Captain
It looks as though you are getting confused between Alternate Surfaces and Virtual Textures.

Although an Alternate Surface may be a virtual texture made up of multiple levels of detail: http://www.lns.cornell.edu/~seb/celestia/brief_vt.html, it does not look as though that is what you intended here, as you make no mention of "levels" folders, etc..

It looks as though your alternate surface is represented by a single jpg image "Babula.jpg" rather than a VT.
If so, there is no need to deal with .ctx files, and you can just have a simple AltSurface declaration as below. You also need to move the file Babula.jpg into the medres folder.
You only need a CTX if your texture is a VT, so you can get rid of the CTX file.
You don't need the folder "Babula" either.

eg.

Code: Select all

AltSurface "Babula" "ALF Cen A/Kvarta"
{
Texture "Babula.jpg"
}


So, in summary:
    1. Keep Babula.ssc
    2. Move Babula.jpg into the medres folder.
    3. Delete the empty folder Babula
    4. Delete Babula.ctx
You're good to go.

Re: Alternate Surface problem

Posted: 30.06.2010, 18:15
by romanvida
Thank you very much for your patience, but the item Alternate surface in the menu (right click to planet) does not appear yet! If I try this addon for Sol/Earth it works (only change "ALF Cen A/Kvarta" for "Sol/Earth"). :?

Re: Alternate Surface problem

Posted: 30.06.2010, 20:24
by Chuft-Captain
What is the name of the .SSC file which defines the actual Planet Kvarta itself?

If it is named Kvarta.ssc and is in the same folder as Babula.ssc, then it's possible (nay, likely) that the AltSurface is being loaded BEFORE the planet, so it will be ignored as the planet it references has not yet been defined.

Celestia tends to load files and folders in approximate alphabetical order, so your choice is either to place the Altsurface statement in the Planet's SSC (after the planet specification), or devise a naming convention for your SSC's which ensures that the Planet is loaded first.
eg.
    ALF-Cen-Planets.ssc
    ALF-Cen-Surfaces.ssc
might work.

Prob. the reason it works for Earth is that the standard data and standard extras that ship with Celestia are always loaded first, before your own extras.

CC

Re: Alternate Surface problem

Posted: 30.06.2010, 20:27
by selden
"It works fine for me!"

I used a single SSC file to ensure that things are loaded in the correct order.

Code: Select all

"Kvarta" "Alf Cen A" {
    Radius 6000
    Texture "Kvarta.jpg"
    EllipticalOrbit { SemiMajorAxis 1 Period 1 }
}
AltSurface "Babula" "ALF Cen A/Kvarta" { Texture "babula.jpg"}
AltSurface "Babula" "Sol/Earth" { Texture "babula.jpg"}


I put babula.jpg in kvarta/textures/medres/
That's the same directory which contains Kvarta.jpg
I can see the babula alternate surface on both Kvarta and Earth.
(Of course, I'm using my own image files.)

Re: Alternate Surface problem

Posted: 30.06.2010, 20:38
by Chuft-Captain
Everything always works for you Selden. :wink:

Re: Alternate Surface problem

Posted: 30.06.2010, 20:41
by selden
But not always with the first try. Or even the tenth. You don't think I'd show them, do you? ;)

Re: Alternate Surface problem

Posted: 30.06.2010, 21:00
by Chuft-Captain
selden wrote:But not always with the first try. Or even the tenth. You don't think I'd show them, do you? ;)
Aha! That might explain why you're not the first responder on this thread as usual. 8)

EDIT: At this point Selden you should claim timezone differences.... :wink:

Re: Alternate Surface problem

Posted: 03.07.2010, 20:31
by romanvida
Thank you all for your effort and willingness. Selden, your help is allways usefull and it works now too! Thank you! :wink: My planet Kvarta looks like this now, and its development is in progress: