Tutorial:Making Planets

From Kerbal Space Program Wiki
Revision as of 17:05, 24 November 2015 by KspGuy415 (talk | contribs) (i wrote my page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Creating Your Own Planets

This tutorial is made for people who are getting bored with landing and collecting science on the stock planets, but if you could land on your own planets, that could be very interesting!

Specifications

  • Length: 15-20 minutes
  • Difficulty: Easy - Somewhat Intermediate
  • For Version: 1.0.4+

Requirements

  • Ksp (Duh)
  • Kopernicus 0.3.3
  • KittopiaTech 0.2
  • A text editor (Notepad, Notepad++, etc.)
  • A place to get textures (This can be SpaceEngine)
  • A photo editor (Photoshop, GIMP, Paint.net, etc.)
  • An online normal map creator, like the one here (optional)

Rocky Planets

Steps

1. Getting Textures

(I will use SpaceEngine in this example) In order to get textures, open up SpaceEngine, find the planet you want to use, and click on export planet in the editor menu.

This is how to export a planet from Space Engine

Make sure you uncheck the clouds and surface settings, and check the color map. All you need is color map, normal map, and height map. If you don't have SpaceEngine and you have a color and height map, use the online normal map. Just drag and drop the color and height map, and it will create your normal map. Save the files from SpaceEngine as .dds files, but if you have a .png file, open it up in your texture editor, and save another copy as .dds. Make sure you save all files as YourPlanetName. You should now have three files - YourPlanetName _Color.dds, YourPlanetName _Normal.dds, and YourPlanetName _Height.dds.


2. Creating The Config Files

Open up your text editor and copy this code into it.

CODE:

@Kopernicus 
{
    Body
    {
        name =  //This will be the name of your planet.
        flightGlobalsIndex = 500 //You can make this any number, just not too big.
        Template
        {
            name =  //This is the template for your planet. Put Tylo for rocky planets, Laythe for ocean planets, and Jool for gas giants.
        }
        Properties
        {
            radius =  //This is the height of your planet in meters from the surface to the core.
            geeASL =  //This is the gravity for your planet. Kerbin is 1.
            mass =  //This is the mass of your planet. It is not very important.
            tidallyLocked =  //Set True if you want your planet to rotate.
            rotationPeriod =  //If the setting above is true, make this the length of a day on your planet in seconds. 
            description =  //This will be the description of your planet that shows up in the tracking station.
            ScienceValues //These are the data values for taking crew and EVA reports around your planet.
            {
                landedDataValue = 
                splashedDataValue = 
                flyingLowDataValue = 
                flyingHighDataValue = 
                inSpaceLowDataValue = 
                inSpaceHighDataValue = 
                recoveryValue = 
            }
        }
        Orbit
        {
            referenceBody =  //This is the body your planet will be orbiting around. Do NOT write Kerbol, in the game it is the Sun.
            inclination =  //I hope this is self explanatory.
            eccentricity =  //I hope this is self explanatory.
            semiMajorAxis =  //This is the distance in meters your planet is away from the reference body.
            longitudeOfAscendingNode = 0 //Not sure what this is, so leave it at zero.
            argumentOfPeriapsis = 0 //Same as above.
            meanAnomalyAtEpoch = 0 //Same as above.
            epoch = 0 /Same as above.
            color =  //This is the RGBA color code of your planet's orbit in the tracking station. Divide each value by 255, and put a 1 for the fourth value if you want it to be visable. 
        }
        ScaledVersion
        {
            Material
            {    
                texture =  //This will be Kopernicus/Config/YourPlanetName/YourPlanetName_Color. Do NOT put .dds.
                normals =  //This will be Kopernicus/Config/YourPlanetName/YourPlanetName_Normal. Do NOT put .dds.
         }
      }
   }
}

When you have filled this out, save it as YourPlanetName.cfg. Go inside your Kopernicus folder, go into the Config folder, and you should see a config file that says System. Do not open that file under any circumstances. Inside the Config folder, make a new folder that says YourPlanetName. Move YourPlanetName.cfg, and your three texture files inside.

3. Setting Up KittopiaTech

(This is only if you have a rocky or ocean planet.)Go inside your KittopiaTech Folder, and then into the SaveLoad folder, and make a new file in your text editor. Copy this code into it. CODE:

PlanetYourPlanetName  //In YourPlanetName, put the name of your planet.
{
    AdditionalData  //Leave all of this false
    {
        Stock = False
        AddAtmoFx = False
        AddOceanFx = False
        OceanLoadTextures = False
        UnlitOcean = False
        ModScaledAtmoShader = False
        AddRings = False
        AddParticles = False
        DisableOrbitRenderer = False
    }
    PQS
    {
        PQSMod_HeightColorMap  //Leave this false
        {
            modEnabled = False
        }
        PQSCity  //Leave this false
        {
            modEnabled = False
        }
        PQSMod_VertexHeightMap
        {
            heightMap = GameData/Kopernicus/Config/  //Make this the location of your height map. Make sure you put GameData at the beginning, and to leave .dds on there.
            heightMapDeformity = 2500  //Basically determines the height of your mountains
            heightMapOffset = 0  //If your planet has oceans, set this to a negative number
            scaleDeformityByRadius = False
        }
        PQSMod_VertexColorMap
        {
            modEnabled = true
            vertexColorMap = GameData/Kopernicus/Config/  //Same as above, but make this the location of your color map.
        }
        PQSMod_VertexSimplexHeight  //Dont change any of this, except for the deformity
        {
            seed = 95374         
            deformity = 300 
            octaves = 8         
            persistence = 0.5  
            frequency = 12
        }
        PQSMod_VertexSimplexHeightAbsolute  //Same as above
        { 
            seed = 637926             
            deformity = 100  
            octaves = 3               
            persistence = 0.5
            frequency = 0.8
        }
        PQSMod_VertexSimplexHeightMap  //Leave this false
        {
            modEnabled = False
        }
        PQSMod_VertexHeightNoiseVertHeight  //Leave this false
        {
            modEnabled = False
        }
    }
}

Save this config file as YourPlanetName.cfg in your SaveLoad folder. Now, put the Kopernicus and KittopiaTech folders inside GameData in your KSP directory.

Final Note

The only reason you need this last config file is so your planet can have a custom height. If you didnt have this, your planet would almost look like Tylo on a different scale. If you get a glitch where only one side of the planet is lit up, change the opacity of your normal map to 50%.

Ocean Planets

Steps

1. Get your textures.

2. DO THE SAME THING THAT YOU DID ABOVE!!!

3. Under the template section of your Kopernicus config, change it from Tylo to Laythe.

4. In the KittopiaTech config, under the PQS_VertexHeightMap section, change the heightMapOffset from 0 to a negative number, such as -1000.

5. In your height map, paint all of the areas where you want your water to be pitch black, so the RGB amount reads 0,0,0

Final Note

You still need both config files for an ocean planet. Be careful with the heightMapOffset, if you make it too low, like -5000, it will flood your planet.

Gas Giants

Steps

1. Get Your Textures

This will be the same as above, except you only need a color texture.

2. Make Your Planet Folder

Do the same thing as above where you make the folder that will hold your planet.

3. Set up config

Make a new text file and copy this into it. CODE:

@Kopernicus 
{
    Body
    {
        name = 
        flightGlobalsIndex = //Change this to any number, just not too big.    
        Template
        {
            name = Jool   //Jool is the main template for a gas giant.               
        }
        Properties
        {
            radius =  //Distance in meters from the surface to the core.                                  
            geeASL =      //Amount of gravity your planet has. Kerbin is 1.                                 
            mass =  //The mass is not important.                       
            description =  //The description of your planet.
            ScienceValues //The amount of science you will get around your planet.                                    
            {
                landedDataValue = 100
                splashedDataValue = 0
                flyingLowDataValue = 0
                flyingHighDataValue = 0
                inSpaceLowDataValue = 40
                inSpaceHighDataValue = 30
                recoveryValue = 5
            }
        }
        Orbit
        { 
            referenceBody = Sun   //Body where your planet will orbit. Do NOT change to Kerbol, it is the Sun in game.  
            inclination =   //Self-explanatory           
            eccentricity =  //Self-explanatory          
            semiMajorAxis =  //Distance from the parent body in meters.
            longitudeOfAscendingNode = 0 //Leave the next four as zero.
            argumentOfPeriapsis = 0
            meanAnomalyAtEpoch = 0
            epoch = 0
            color = RGB value of your orbit. Divide each number by 255, and put a fourth 1 so you can see it. Ex: 0, 0, 0, 1 is black.
        }
        ScaledVersion
        {
            Material
            {    
                texture = Kopernicus/Config/  //Make this the location of your YourPlanetName_Color. Do NOT include .dds.
            }
        }
    }
}

Save this file as YourPlanetName.cfg, and move it into your planet's folder, along with the texture. Move the Kopernicus folder into your GameData and you are done!

Final Note

Making a gas giant is the one of the easiest planets you can make. You only need one texture file, and you do not need a separate KittopiaTech config.

Finishing Word

With this tutorial, anyone should be able to create their own planets, to land on and collect science from. With a little more expirience, it is possible to actually make your planets into a mod.

Important Note

If anyone could tell me if it is possible to make other stars with Kopernicus, that would be greatly appreciated.