loading order in Celestia extras

Have a question about using Celestia? Check here first for FAQs and helpful advice.
Forum rules
Please help to make this forum more useful by checking the FAQs before posting! Keep it clean, keep it civil, keep it truthful, stay on topic, be responsible, share your knowledge.
Avatar
Topic author
gironde M
Posts: 371
Joined: 16.12.2016
Age: 66
With us: 2 years 7 months
Location: Montigny-Les-Metz, Grand Est, Lorraine, Moselle, France

loading order in Celestia extras

Post #1by gironde » 02.09.2018, 08:29

Celestia loading of .ssc files into the 'extras' folder:

Celestia proceeds in alphabetical order (in each level).
first the folders, then inside the folders, the subfolders, and then inside the subfolders, the files
The name given to folders and files is important

example:

folder A
    subfolder AA '
      AA'a file
      AA'b file
      AA'c file
    subfolder AB '
      AB'a file
      AB'b file
      AB'c file
    subfolder AC '
      AC'a file
      AC'b file
      AC'c file
folder B
    subfolder BA '
      BA'a file
      BA'b file
      BA'c file
    subfolder BB '
      BB'a file
      BB'b file
      BB'c file
    subfolder BC '
      BC'a file
      BC'b file
      BC'c file
folder C
    subfolder CA '
      CA'a file
      CA'b file
      CA'c file
    subfolder CB '
      CB'a file
      CB'b file
      CB'c file
    subfolder CC '
      CC'a file
      CC'b file
      CC'c file


imagine that Earth.ssc is in CB'b and that moon.ssc is in AA'c.
Celestia will scan the dosiers in alphabetical order, so it will start with the AA 'folder to end with CC'
Celestia will load moon.ssc before Earth.ssc but as "Sol / Earth" is not known at this time of loading, it will detect an error and not keep loading moon.ssc in memory.
Result: you will not find Moon in Celestia.

The solution is to number the folders, and similarly number the subfolders and finally number the files, in the order they should be loaded.

Example:

extras /
1-solar-system
    1-Star
    2-Planets and moons
      1-Mercury
      2-Venus
      3-Earth
        1-Earth x.ssc
        2-Moon.ssc
      4-Mars
        1-Deimos.ssc
        2-Phobos.ssc
      5-Jupiter
      6-Saturn
      7-Uranus
      8-Neptune
    3-Dwarfplanets
    4-Asteroids
    5-comets
    6-others
2-extrasolar-systems
3-spacecrafts

When loading spacecrafts, all planets, moons, dwarfplanets, all asteroids, all comets, ... will already be loaded thus avoiding errors.

Janus
Posts: 392
Joined: 13.08.2016
With us: 2 years 11 months

Post #2by Janus » 04.09.2018, 23:49

@gironde

My personal fork does this, to the best of my knowledge this has not been incorporated into the main branch.
The main branch simply loads in whatever order the filesystem happens to return things in.
It is essentially random, with the exception of loading from cd/dvd, and that is SLOW!!!
I did the sorted loading thing for selden and offered the code here, but I have not seen it used.

Rearranging addons like above is one of the things I will get to in time.
What I have now is thus.
0 which is the SOL system.
0/1 is Mercury
0/2 is Venus
0/3 is Earth
0/3/1 is the Moon/Luna
0/3A are man made satellites, though I am considering 0/3/A instead.
0/4 is Mars.
0/4/1, well you get the idea.

With '1' being HIP1, or maybe 'HIP1' leaving open 'GAIA1' for parallel sets.
This is part of my work on making dynamic subsets that are (un)loadable on command.


Janus.

Avatar
Topic author
gironde M
Posts: 371
Joined: 16.12.2016
Age: 66
With us: 2 years 7 months
Location: Montigny-Les-Metz, Grand Est, Lorraine, Moselle, France

Post #3by gironde » 05.09.2018, 09:01

Scheduling is done at each folder level.


Celestia reads the 1st folder (level 1) then scans the subfolders (level 2) then the sub-subfolders (level 3) and so on until the files (last level). Then he moves to the next folder which is again at level 1.
Each level can be ordered simply according to the prefixes "1-", "2-", …

Since I did this, I no longer have a loading error saying that the parent object was not found.
I still have to look at the 'spacecrafts' side because some orbit around others according to the Timeline. For example, ATV, HTV, Cygnus, ... orbit around the Earth but at some point they are docked to ISS. ISS is loaded after ATV, HTV and Cygnus. For these devices, if the ssc defines the parent as "Sol / Earth / ISS", something will not go to loading files by Celestia.

:hi:

Avatar
Topic author
gironde M
Posts: 371
Joined: 16.12.2016
Age: 66
With us: 2 years 7 months
Location: Montigny-Les-Metz, Grand Est, Lorraine, Moselle, France

Post #4by gironde » 06.09.2018, 17:26

another mistake sometimes arriving:
In the 'extras' folder the textures, models and data folders must be at the same level as the .ssc file.
If they are not there, Celestia looks in the common pot: Celestia /models, Celestia /textures and Celestia /data. If they are not there either, Celestia triggers an error and does not load the ssc file into memory


recommended structure in 'extras':

extras / name_of_your_subfolder
data / definition.xyz (or xyz)
models / definition.cmod (or 3ds)
textures / medres / definition.jpg (or png or ...) (or lores or hire)
definition.ssc


:hi:


Return to “Help Central”

Who is online

Users browsing this forum: 2 guests