Naked Celestia (total conversion mod) question

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
adi11235
Posts: 5
Joined: 09.01.2007
With us: 13 years 10 months

Naked Celestia (total conversion mod) question

Post #1by adi11235 » 04.10.2009, 19:12

What files should be modified in order to create a Celestia universe from scratch? I have in mind using Eve-Online astrometric data.

So far, I managed to modify the stars.dat and starnames.dat with relevant data, but Celestia "cannot read the star database". It may be that my customizations are malformed, or that there are other files involved.

For a start, I used informations from 93 custom stars. The stars.dat format used: http://en.wikibooks.org/wiki/Celestia/Binary_Star_File ; starnames.dat is pretty straightforward.

Attached there is a .csv with my initial information and custom stars.dat and starnames.dat (my attempts, at least).


Other than that, has anyone else done full conversion mods of Celestia?

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

Re: Naked Celestia (total conversion mod) question

Post #2by selden » 04.10.2009, 20:04

I used Emacs to look at the files. Although it's a text editor, it does manage to display binary files in an almost understandable format.

The format of Celestia's stars.dat is described at
http://en.wikibooks.org/wiki/Celestia/Binary_Star_File

I see two major problems with the stars.dat in the zip file.
1. It includes a line-break after each star definition. It shouldn't. All the records must have exactly the same known length, so there should be no record terminator.
2. Because of the line-breaks, I can see that the records are of varying length. They all should contain exactly 20 bytes.

A couple of suggestions:
1. Use small star ID numbers instead of large ones. Start with 119, not with 30000119. Celestia interprets large ID numbers as Tycho catalog numbers, which will look quite different when displayed.
2. Use SSC catalogs instead of the binary file. Although they'll take longer to load, they'll be much easier to debug.
Selden

Avatar
Hungry4info
Posts: 1133
Joined: 11.09.2005
With us: 15 years 2 months
Location: Indiana, United States

Re: Naked Celestia (total conversion mod) question

Post #3by Hungry4info » 04.10.2009, 20:24

adi11235 wrote:So far, I managed to modify the stars.dat and starnames.dat with relevant data, but Celestia "cannot read the star database". It may be that my customizations are malformed, or that there are other files involved.

I've succeeded in doing a total conversion before. To get around that problem, I modified the celestia config file to set it to where Celestia didn't look for stars.dat when loading.
Current Setup:
Windows 7 64 bit. Celestia 1.6.0.
AMD Athlon Processor, 1.6 Ghz, 3 Gb RAM
ATI Radeon HD 3200 Graphics

Topic author
adi11235
Posts: 5
Joined: 09.01.2007
With us: 13 years 10 months

Re: Naked Celestia (total conversion mod) question

Post #4by adi11235 » 10.10.2009, 09:55

I managed to track down some of the problems with my stars.dat.

For one, the X/Y/Z coordinates for stars were in reversed byte order. Secondly, the spectral class was illegal (0x030a); this is also why there were a lot of "carriage returns".

Now I realized the file asterisms.dat needs to be present for Celestia to work.

Having corrected the above problems and using only one star for the catalog, Celestia still won't load.

Attached is a 34 byte stars.dat (14 byte header and 20 byte star description), starnames.dat & asterisms.dat with only one name and my celestia.cfg.

Some background:
My data source is a database export of the eve-online static universe (stars, moons, space stations, stargates). The game "asterisms" would be stargate connections between solar systems. There is enough data to reconstruct a significant portion of this static universe in Celestia if the file formats aren't too obscure.

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

Re: Naked Celestia (total conversion mod) question

Post #5by selden » 10.10.2009, 11:32

Sorry, I can't help more: I've really never tried to replace stars.dat, although I know people have done it.

However, since EVE Online has only 5000 stars, I think it really makes more sense to use STC catalogs to describe them. You (or the users of your Addon) probably will want to use STC catalogs to add details to individual stars anyhow. It seems to me that it would be appropriate to make those details available for editing from the beginning. And they're easier to debug than a binary file.

Alternatively, you might consider using the conversion utility that Celestia uses to convert a text file into the binary stars.dat. Both the conversion utility source code and the input text file are available on SourceForge.

http://celestia.svn.sourceforge.net/vie ... estia/src/
Selden


Return to “Development”

Who is online