Solar System Generator - 100,000 stars.

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
marc
Posts: 426
Joined: 13.03.2002
With us: 22 years 8 months
Location: Outback Australia

Solar System Generator - 100,000 stars.

Post #1by marc » 11.07.2002, 10:44

I've finished my first version of a solar system generator as was mentioned in this topic.
http://www.celestiaproject.net/forum/viewtopic.php?t=507

It creates random planets and their moons for every star in celestia.
All the orbits are Kepler correct and all the planets have masses assigned to them so the gravity effects work. Textures are also given to each planet, and its habitability determined.
It creates an ssc file for each star. If you make one for every star (there are 100,000) it will take about 3hours to make 10Gig of files.
You can make the nearest 1000 stars for about 80Meg in 1 minute however.

Install these to a celestia 1.2.4 directory then run one of the generate.bat files.

I wrote a big readme which is in the first package please read it as there are more instructions.

mh_system_generator-win32-0.0.1.exe
mostlyharmless-w32-0.0.4.exe
mh_system_generator-textures-0.1.exe

the files are here:
http://sourceforge.net/project/showfile ... p_id=52323

Code: Select all

#      stage3 completed
# HIP 74867# HIP 74867
# K3 V
# seed     75124.0000
# sun mass 0.7180 Msol
# sun lumonisity  0.2
# Distance from sol 180.80 ly
# sun age 5.1011 billion years
# sun life 39402919547.7994 billion years
# sun r_ecosphere 0.4269 AU
# system_name 74867

#   1.0     Rock      0.331  AU      0.056 EM      0.387 ER
#      1.1     Asteroids      0.000  AU      0.000 EM      0.001 ER
#      1.2     Asteroids      0.000  AU      0.000 EM      0.001 ER
#      1.3     Asteroids      0.000  AU      0.000 EM      0.001 ER
#      1.4     Asteroids      0.000  AU      0.000 EM      0.001 ER
#   2.0     Rock      0.466  AU      0.076 EM      0.429 ER
#   3.0     Ice      0.703  AU      0.288 EM      0.668 ER
#   4.0     Ice      0.998  AU      1.395 EM      1.119 ER
#   5.0     Martian      1.810  AU      0.459 EM      1.038 ER
#      5.1     Asteroids      0.000  AU      0.000 EM      0.001 ER
#      5.2     Asteroids      0.000  AU      0.000 EM      0.001 ER
#      5.3     Asteroids      0.001  AU      0.000 EM      0.002 ER
#      5.4     Asteroids      0.001  AU      0.000 EM      0.002 ER
#      5.5     Asteroids      0.001  AU      0.000 EM      0.006 ER
#   6.0     Venusian      2.404  AU      4.535 EM      2.148 ER
#      6.1     Asteroids      0.001  AU      0.000 EM      0.009 ER
#   7.0     Jovian      4.407  AU     74.009 EM      7.081 ER
#      7.1     Asteroids      0.000  AU      0.000 EM      0.002 ER
#      7.2     Asteroids      0.000  AU      0.000 EM      0.002 ER
#      7.3     Asteroids      0.000  AU      0.000 EM      0.004 ER
#      7.4     Asteroids      0.001  AU      0.000 EM      0.005 ER
#      7.5     Asteroids      0.001  AU      0.000 EM      0.013 ER



Code: Select all



"_-_4.0" "HIP 74867"
{
   Texture "mh_ice__05.jpg"   # Planet type : Ice
   Mass  8.339E+024 #Kg
   Radius  7135.2 #Km
   EllipticalOrbit {
      SemiMajorAxis 0.998 # AU
      Period 1.18 #earth years
         # Length of year  429.75  Earth days
         #    695.16 Local days
      Eccentricity 0.08513   #degrees
      Inclination 2.27901   #degrees P
      AscendingNode 50.79134   #degrees
      MeanLongitude 254.17646   #degrees
      LongOfPericenter 134.83932   #degrees
   }
   RotationPeriod 14.84 #  hours
   Obliquity 24.00 # degrees
   Albedo  0.70
   Texture "mh_ice__01.jpg"   # Planet type : Ice
   # Cold, Icy, Arid, Cloudless, Thick atmosphere

   # Distance from primary star : 1.5E+008 KM   0.998 AU
   # 1.395 Earth masses

   # Surface gravity   1092.8 cm/sec^2   1.11 Earth gees
   # Surface pressure    2710 millibars
   # 2.675 Earth atmospheres
   # Surface temperature   -108.7 Celcius
   #    -122.7 C Earth temperature

   # Normal temperature range
   #    Night -110.3 C
   #    Day   -107.2 C
   #    Min  -124.3 C
   #    Max  -94.2 C

   # Density 5.48 grams/cc
   #    0.99 Earth densities
   # Escape Velocity  12.5 Km/sec
   # Molecular weight retained   1.3 and above
   #   H2, He, N, O, CH4, NH3, H2O, Ne...
   # Exospheric Temperature  232.90 K
   #    -1040.10 C Earth temperature
   # 1.18 Earth years

   # Boiling point of water  129.5 Celcius
   # Hydrosphere percentage   0.0
   # Cloud cover percentage  0.1
   # Ice cover percentage 100.0
}

"_-_5.0" "HIP 74867"
{
   Texture "mh_martian__08.jpg"   # Planet type : Martian
   Mass  2.743E+024 #Kg
   Radius  6621.8 #Km
   EllipticalOrbit {
      SemiMajorAxis 1.810 # AU
      Period 2.88 #earth years
         # Length of year  1049.83  Earth days
         #    1072.65 Local days
      Eccentricity 0.05565   #degrees
      Inclination -2.27433   #degrees P
      AscendingNode 212.54799   #degrees
      MeanLongitude 256.56056   #degrees
      LongOfPericenter 244.57411   #degrees
   }
   RotationPeriod 23.49 #  hours
   Obliquity 35.00 # degrees
   Albedo  0.34
   Texture "mh_martian__07.jpg"   # Planet type : Martian
   # Low-G, Cold, Icy, Arid, Cloudless, Thin atmosphere

   # Distance from primary star : 2.7E+008 KM   1.810 AU
   # 0.459 Earth masses

   # Surface gravity   417.3 cm/sec^2   0.43 Earth gees
   # Surface pressure     157 millibars
   # 0.155 Earth atmospheres
   # Surface temperature   -142.4 Celcius
   #    -156.4 C Earth temperature
   #    +9.6 C greenhouse effect

   # Normal temperature range
   #    Night -149.3 C
   #    Day   -135.8 C
   #    Min  -170.4 C
   #    Max  -116.4 C

   # Density 2.25 grams/cc
   #    0.41 Earth densities
   # Escape Velocity   7.4 Km/sec
   # Molecular weight retained   1.2 and above
   #   H2, He, N, O, CH4, NH3, H2O, Ne...
   # Exospheric Temperature   70.79 K
   #    -1202.21 C Earth temperature
   # 2.87 Earth years

   # Boiling point of water  55.0 Celcius
   # Hydrosphere percentage   0.0
   # Cloud cover percentage  0.0
   # Ice cover percentage 33.8
}

"_-_5.1" "HIP 74867/_-_5.0"
{
   Texture "mh_asteriod__01.jpg"   # Planet type : Asteroids
   Mass  2.224E+015 #Kg
   Radius  4.7 #Km
   EllipticalOrbit {
      SemiMajorAxis 18385.965 # Km
      Period 0.42
 # earth days         # Length of year  0.42  Earth days
         #    1.00 Local days
      Eccentricity 0.04816   #degrees
      Inclination -1.77407   #degrees M
      AscendingNode 64.29395   #degrees
      MeanLongitude 5.69109   #degrees
      LongOfPericenter 265.67949   #degrees
   }
   RotationPeriod 10.17 #  hours
   Obliquity 3.00 # degrees
   Albedo  0.07
   Texture "mh_asteriod__02.jpg"   # Planet type : Asteroids
   # Tidally Locked 1 Face
   # Low-G, Cold, Airless, 1-Face

   # Distance from primary star : 1.8E+004 KM   0.000 AU
   # 0.000 Earth masses

   # Surface gravity    0.7 cm/sec^2   0.00 Earth gees
   # Surface pressure       0 millibars
   # 0.000 Earth atmospheres
   # Surface temperature   -140.2 Celcius
   #    -154.2 C Earth temperature

   # Normal temperature range
   #    Night -146.6 C
   #    Day   -133.8 C
   #    Min  -171.4 C
   #    Max  -110.9 C

   # Density 5.25 grams/cc
   #    0.95 Earth densities
   # Escape Velocity   0.0 Km/sec
   # Molecular weight retained  998335.9 and above
   #   
   # Exospheric Temperature   70.79 K
   #    -1202.21 C Earth temperature

   # Boiling point of water  -273.1 Celcius
   # Hydrosphere percentage   0.0
   # Cloud cover percentage  0.0
   # Ice cover percentage  0.0
}





I've used some other peoples textures,

Credits To

Redwick.
Rassilon.
Manuel David


Franz-Xaver Schweiger
Gas giant Planet generator

Lance Gharat, Mark Santesson
PlanetGen - Fractal Planetary Map Generator

thanks.

and thank Chris for making celestia open source.

Enjoy!

mostlyharmless.sourceforge.net

brunetto_64
Posts: 112
Joined: 12.05.2002
With us: 22 years 6 months
Location: Toronto

Post #2by brunetto_64 » 11.07.2002, 17:09

:D :D :D
Veeerrrry big!!! Wonderful!!!
I'm downloading the texture.exe (16 Meg!!!),
and I have already downloaded the other two....
Thanks a lot!!!
Bruno

Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 9 months
Location: Altair

Post #3by Rassilon » 11.07.2002, 18:58

Marc, now make one for stars lol...I need a hack that will generate a globular cluster of around 10000 stars or more for my galactic center Im adding hopefully this coming release...but Im gonna give this a whirl... :mrgreen:

Also can this do only one system at a time? If it can it will save me TONS of time coding in the systems...
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!

abiogenesis
Posts: 104
Joined: 07.06.2002
With us: 22 years 5 months
Location: Redmond, WA

Post #4by abiogenesis » 11.07.2002, 19:04

Wow! Very cool! The galaxy is so crowded! And it's just one little corner! It did take a few hours to generate all the systems, but there's so much to see. I can't wait until the gameplay mechanics are added.

Congratulations on a job well done!

- a b i o g e n e s i s -

Astrojockel
Posts: 28
Joined: 19.06.2002
With us: 22 years 5 months
Location: Germany

Post #5by Astrojockel » 11.07.2002, 19:51

Hi Marc,

congratulation ! Some of the planets are looking great.
Nice work :!: :!: :!:
I have spend a lot of hours before i know all of them.
heaven can´t wait ... :D

http://www.bergh.de

Topic author
marc
Posts: 426
Joined: 13.03.2002
With us: 22 years 8 months
Location: Outback Australia

Post #6by marc » 11.07.2002, 20:31

Rassilon wrote:Also can this do only one system at a time?

With my first try at this I had stargen only generating one system at a time with another application driving it. This resulted in the OS making a heap of threads and caused a memory leak so I had to make stargen do the automation.
Ill have to go back and change it so it will do singles stars easily again.
Please note that I have butchered stargen and that some of the original functions have been disabled, Ill see if I can ressurect these.

For the time being have a look at starlist.txt and at the generate.bat files Shorten starlist to one or two stars,
the parameters are :

HIP number
descriptive name
Luminosity
Mass
Class
Distance from Sol

Marc, now make one for stars lol...
Yeah, we could really fill our hard drives. There is the option of adding stars with stc files, but I think modifying stars.dat would be more efficient. Hasnt somone already been working on this sort of random star generation?

I can't wait until the gameplay mechanics are added.

Im going to focus on refining the environment first as I still have a lot to learn about celestia's inner workings. There are a lot of improvements to be made to this generator.

I have spend a lot of hours before i know all of them.

See if you can find a terrestrial moon suitable for humans. :D

Thanks for all the feedback everyone :)

Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 9 months
Location: Altair

Post #7by Rassilon » 11.07.2002, 22:36

I would write it myself but I just cant get used to the int810 arch...Its like some crackhead wrote it...64k allocation units bah...

And I hate using memory pointers in windows...Its like cleaning a loaded gun lol...but maybe I'll write one someday...Windows GUI and all...then let Fridger convert it to Linux...
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!

RedWick
Posts: 4
Joined: 11.06.2002
With us: 22 years 5 months

Post #8by RedWick » 11.07.2002, 23:21

I actually got credit for something creative I did?

Woot!

Does this mean I'll have to come up with more textures?

:wink:

Guest

Post #9by Guest » 12.07.2002, 04:23

:D Sweet!
That was completed faster then I though. Keep up the good work

-Matt-

Stargazer_2098
Posts: 64
Joined: 02.05.2002
With us: 22 years 6 months
Location: Starship Thor Heyerdahl, continuing voyage

Post #10by Stargazer_2098 » 12.07.2002, 11:05

8O 10 GB! 8O

Thanks.
But I think I'll wait for another 5 years, when we all have 10+ Terra-Byte harddisks in our computers...
:roll:


Stargazer.
"We have lingered long enough on the shores of the cosmic ocean.
We are ready to set sail towards the stars
" --- Carl Sagan, Cosmos.
----
Member of the Noctis IV and Orbiter communities;
Visit Noctis
Visit Orbiter

Topic author
marc
Posts: 426
Joined: 13.03.2002
With us: 22 years 8 months
Location: Outback Australia

Post #11by marc » 13.07.2002, 02:44

There is the option to generate less systems. 1000 systems will only create 80meg of files and it generates from the closest to sol then out.

Axel

Solar System Generator - 100,000 stars.

Post #12by Axel » 14.07.2002, 08:47

marc wrote:I've finished my first version of a solar system generator.

Great stuff, Marc! Keep on with this great work :)

Axel

Paul
Posts: 152
Joined: 13.02.2002
With us: 22 years 9 months
Location: Melbourne, Australia

Post #13by Paul » 16.07.2002, 03:01

Marc,

You've changed the code for Celestia before... why not modify Celestia so that it only generates systems as it needs them, while the program is running?
I would expect that most of the time spent generating all this data is writing out to the files as text. If it generates the systems completely within Celestia, then it never needs to create SSC files, and can do ALL of the stars. Surely it's worth a try!
Cheers,
Paul

Guest

Post #14by Guest » 16.07.2002, 09:04

Paul,

Currently the generation process has two steps (one program per step)
Ive got some more steps to add in the future. one includes creating random names which I do not have the source for.
Integrating could be done im sure. but im not sure if its worth the risk of having an extra pause as a system is generated.

The waste of space is a problem, but im looking at compressing the ssc files as they are created and then decompressing as needed by celestia.
There is alot of repeated text in the files, im guessing they will compress to 15%.
Im pretty sure decompressing will be quicker than generating, especially as I want to add more steps to the generating phase.

Also its much easier to work on if i keep them separate.

Topic author
marc
Posts: 426
Joined: 13.03.2002
With us: 22 years 8 months
Location: Outback Australia

Post #15by marc » 25.09.2002, 11:15

A new version of my system generator is out.

Solar System Generator 0.0.2
Data files reduced from 10 to 2 gig by gzipping all the data files and having celestia unzip them as needed.
Cloud textures assigned to planets according to atmospheric data. Terresterial textures assigned as per hydrosphere coverage.
Nicer textures too thought he texture pack is a little big... a low res version will be coming soon,

MKruer
Posts: 501
Joined: 18.09.2002
With us: 22 years 2 months

Post #16by MKruer » 26.09.2002, 05:17

:D Cool I’m glad to see that you are still working on the Generator. After you released the first version and there was no word I though the project died. I also wanted to know if you are working on a texture generator that will work within Celestia on the fly. Glad to see some progress. Keep up the good work.

-Matt-

Topic author
marc
Posts: 426
Joined: 13.03.2002
With us: 22 years 8 months
Location: Outback Australia

Post #17by marc » 26.09.2002, 08:48

Matt,
Yeah work on this has slowed down, i've been concentrating on my final semester of uni.
Ive been negotiating with a lecturer to get a whole class of students working on MH in the future. free labour!, its still just talk at the moment though.

As for an 'on the fly' texture generator, im going to stick to having premade textures for now. I want to save the extra cpu cycles for the gameplay, and i dont think it would work that well anyway (too slow).
Also I dont think i have the skills to do it.

In the future, I'm going to refine the system generator a bit more then set to work on the game mechanics.

cheers, Marc

Topic author
marc
Posts: 426
Joined: 13.03.2002
With us: 22 years 8 months
Location: Outback Australia

Post #18by marc » 30.09.2002, 07:49

I know it lame to reply to my own post but this is for those who have been playing with the MH system generator.

Im yet to do a full install of it with the larger star database of 2 million stars , http://perso.wanadoo.fr/celestia.stars/
Dont waste your time trying this yet. (a full MH install that is, the big star DB on its own is cool)

At this stage it probably wont work as im only catering for 4 directories of 30,000 star each. It will get as far as the closest 120,000 stars to sol.
To go further Ill either need to have 70 odd directories, or put all the data into a single file (mabey I should have taken this approach from the start).

If I get round to this the MH installation will be 25gig and will take a few days to generate...wow... if the game gets finished no-one will ever be able to explore it all. :D

Ive notice that the download stats for the texture pack is huge compared to that for the generator. (900 compared to 20) What is everyone doing with those textures? (Or by downloads does it really mean connections). There is not much use for them on thier own they are supposed to go with the generator.

To make it clear these are the files needed to get the latest version of the system generator going. Sorry that the install process is a bit ambigous eventually ill put it all into one big download. The separate parts keeps the development simple. The readme in the first file is pretty detailed so please read them.

http://prdownloads.sourceforge.net/most ... e?download

http://prdownloads.sourceforge.net/most ... e?download

http://prdownloads.sourceforge.net/most ... e?download

Finally, i know its an ass-about way to develop a game, the mechanics usually come before the environment, but its fun this way.
:)

abiogenesis
Posts: 104
Joined: 07.06.2002
With us: 22 years 5 months
Location: Redmond, WA

Post #19by abiogenesis » 03.10.2002, 15:37

Hey, marc-

I'm replying to your post in the other thread.

Unfortunately, I'm in the process of deleting the files. I have been for about three days. :!: It appears that my hard drive may have been fragmented a bit before the installation and after, well, I won't go there.

I looked, but Part 71 is already gone, so I can't give you a file. Stage 2, the texture insertion, did go through however, so I guess I had all the systems.

I don't know how many files NTFS can hold in a directory, but it might be wise to limit the number of files in the first place. Perhaps combine them into 1GB files. A few large files are easier to manage than hundreds of thousands ( does it generate 2Mil?) of tiny files. Just selecting the directory takes a couple of seconds.

As for my system specs:
Windows XP Pro
AMD Athlon XP 2100+
Soyo SY-KT333 Dragon Ultra Motherboard
1GB PC2700 333Mhz SDRAM
120GB Hard Drive

By the way, if you decide to consolidate the files, 1GB is probably about as big as you'd want to go. I've tried making a 4+GB file (I wanted an Earth32k.dds), but it won't happen. Perhaps 4GB is the upper limit for Windows.

- a b i o g e n e s i s -

Topic author
marc
Posts: 426
Joined: 13.03.2002
With us: 22 years 8 months
Location: Outback Australia

Post #20by marc » 05.10.2002, 18:03

thanks for that, bummer about having trouble deleting the files, I hope my program hasn't stuffed anything.

I think I might just give up on generating systems for every star. Would be irrellavant for the game anyway. The system gen is set up to do the closests systems to sol first so I could use the big star DB in the game with only the closest 100,000 stars with planets. The player just wont have the range to go any farther.
Or solve the whole problem with generation on the fly (problem with that is that the generation code im using is ancient and I do not understand most of it, alot of work)
Its good to hear that it got through the second stage, I had some memory leak problems when i first created it, youve proved that its solved.


Return to “Development”