Jump to content

Stellarator - A proof-of-concept solar system generator


Thomas P.

Recommended Posts

On 10/31/2016 at 9:58 AM, Thomas P. said:

What is it?
Stellarator is a software that can generate random solar systems for KSP / Kopernicus. It is not a mod for KSP itself, but a standalone application. The reason is, that every planet in KSP exists twice, once as a high res version that is shown at low distance, and a lower res version that is shown at higher distances. (Scaled Space). While the local space uses procedural generation to create the terrain and the colors, the Scaled Space relies on pregenerated maps. Because the generation for those maps is very slow, this is done outside of KSP. What you get is a folder with Kopernicus configs that you can copy into your GameData folder.

How does it work?
Stellarator creates the base solar system using a software called "Accrete", that simulates a dust cloud around a protostar, and formes planets until no dust is left. Accrete is originally written in C, but I ported it to C#/.NET to be used by Stellarator. The orbits and some of the other parameters from Accrete are used as a base to generate the planet. But since Accrete cant take care of everything, Stellarator has a database of prefabs for all the things a planet needs: Atmosphere curves, Names, Rings, Gas Giant textures and so on. This database is loaded at runtime and elements are selected randomly, or using special conditions, like radius of the planet.
The most important part is the PQS (the terrain of the planet): As mentioned above we use a database of prefabs to load parameters. The PQS prefabs are special. The definitions, who are stored in ConfigNodes, are loaded, and their values are evaluated by a library called "Dynamic Expresso", which allows for dynamic configs (you could do deformation = planet.radius * 5 for example). After that, the Configs are loaded by the same parser library that powers Kopernicus, and that got included in Stellarator. Since the parser relies on the PQS, and we obviously dont have the PQS available in a standalone app, I reimplemented most of KSPs PQSMods in a standalone library (libpqsmods.dll). That allows us to generate the ScaledSpace maps we mentioned above outside of KSP, but with the same style.

Current state
The generator code is getting pretty solid and useable, but the database is largely incomplete. There are almost no prefabs for PQS, rings and stars. The texture generator for gas planets, and the name generator are awesome though.
Pictures (might be ugly, because some of them were from earlier development phases): http://imgur.com/a/0T6FG

Why?
Because I wanted to show that it is possible to have randomized solar systems in KSP. And because it is fun.

How to use
Start the included .exe file, enter a seed, a folder name and choose if the names of the planets should be systematic (Sol-a, Sol-b etc.) or not (Mercury, Earth etc.). The system folder will be in a folder called "systems". Move it to gamedata, install Kopernicus and you should be good

! WARNING ! Do not rename the folder. The texture paths would change otherwise.
! WARNING ! Do not use this on existing savegames. Stellarator generates configs that delete the whole system and rebuild it from Scratch, using different names.

Legal Stuff
Because it is a proof of concept, I do not want someone to redistribute systems generated by the software, even if they properly credit the people who make Stellarator.
That means, that the whole program code of Stellarator is licensed under the Terms of the MIT License, except the namespaces ModLoader and Parser who are LGPL, but the database assets (that means configs and textures) are licensed as All Rights Reserved.

Stellarator is based on the following libraries:

Further credit goes to:

Download
https://github.com/Kopernicus/Stellarator/releases/tag/pre-0.1

Like my mods?
Please consider supporting me and my mods on Paypal! I would greatly appreaciate it, since I don't get much money anyways. :)
However note, that this doesn't grant you anything special, but it will help to keep my motivation up. Therefor it's just an extremly nice way to say "thanks". :)

 

Hello, it is I.

I wanna help reboot this and make some database contributions, and revive the mod if you want!

:)

I'm good at textures, not so much coding.

Get back to me if you can! Thanks.

Link to comment
Share on other sites

1 hour ago, Noah the Smol said:

Hello, it is I.

I wanna help reboot this and make some database contributions, and revive the mod if you want!

:)

I'm good at textures, not so much coding.

Get back to me if you can! Thanks.

I am not going to revive this. It was made as a proof-of-concept mod, and while it still has concepts that I am pretty proud of, and that noone has re-used so far, I don't have the time nor the motivation to maintain it. Additionally, noone was ever able or willing to fill the PQS database to a reasonable degree, and I dont expect that to change. The ACCRETE based planet generation has lots of problems as well when integrated into KSP.

If you want to revive and fork this, go for it, but I rather see this as a proof of concept mod that shows what can be done. If you want something that has reasonably active development, go check out To Boldly Go, but I am not sure how many planet-related features it has these days.

Link to comment
Share on other sites

  • 3 years later...
This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...