Create a planet of your own

December 15, 2016 - Modding, Models, Tutorial
Create a planet of your own

This tutorial will focus on showing how planets can be modified in Starpoint Gemini Warlords. It will use an existing planet (Data\Models\Planets\Baeldor) as an example.



Image 1

In the Material Editor, load assembly: Data\Models\Planets\Baeldor\Planet_Baeldor.asb. This will open up the models associated with the assembly and show them in the Editor, looking something like Image 1.


Start off with the planet


Image 2

First, we will edit the main planet model: baeldor.mdl. We select it in the ELEMENTS list (in Assembly Properties panel), and then click on the Model Editor button (shown in Image 2).

A new panel will show, named Model Properties. From this panel any change made on the properties it contains will affect only the selected model, in this case baeldor.mdl.screenshot-00004

These are the parameters that affect the appearance of the model. Other parameters are not important for now.

We will now go back to the Assembly Properties panel by clicking on the Assembly Editor button as shown in Image 4.

Image 4

Image 4

A planet, (that is the planet assembly file), has multiple models each with different parameters in the Model Editor panel. But we can categorize those models depending on their usage. For example, models that represent solid objects, like baeldor.mdl and atmosSatellite.mdl have similar parameters and they use the same shader. Models like cyclone.mdl, Clouds1.mdl Clouds2.mdl etc. represent clouds, and have similar parameters and use spg_planete_clouds.fx shader. CloudsWrapperAtmoSphere.mdl is the atmosphere surrounding a planet, and has a shader specifically designed for that effect. Ring.mdl represents a ring of asteroids around a planet, and has different parameters for that.

As mentioned before, baeldor.mdl has multiple material subsets, so for the whole model to change, each of those subsets needs to be modified.

Cloudy wheather

Image 5

Image 5

Now we will edit cloud models. We select one of them (for example cyclone.mdl), and then click on Model Editor button. The parameters we can change for clouds are Diffuse texture, Color and Alpha parameters. Diffuse texture can be edited in image editor program with the capability to save to *.dds files. Diffuse texture for clouds has color in RGB channels, and transparency in the Alpha channel as shown in Image 5.

The texture needs to be saved in *.dds file, with the DXT5 ARGB 8bpp compression, with generated mip maps.

Color parameter affects colorization of Diffuse texture. The values of Color parameter represent Red, Green and Blue color channels. In the next images different values for Color are displayed.


screenshot-cloudscolor-01  screenshot-cloudscolor-02  screenshot-cloudscolor-03

Alpha affects transparency

Alpha variation 1  screenshot-cloudsalpha-02

Models for clouds need to be a bit larger than the baeldor.mdl. This can be accomplished by either creating a bit larger model, or by scaling it in Assembly Properties panel, under Scale. The value for the Scale parameter can be for example: 1.01, 1.01, 1.01, which means the cloud model will be 1% larger than the baeldor.mdl. If it is the same size as the baeldor.mdl it won’t be seen, because it will be occluded by the baeldor.mdl model.


Next we will edit CloudsWrapperAtmosphere.mdl. We select it in Assembly Properties panel, and edit it in Model Properties. CloudsWrapperAtmosphere.mdl represents atmosphere of a planet, and parameters that can be edited for it are Diffuse texture, Color, Alpha and GlossMapOff parameters.

Atmosphere Diffuse texture is just a row with color gradient. It represents the change in color as the atmosphere is exposed to light, meaning that the more the atmosphere is lighted it will have the color in the top of the color gradient of the Diffuse texture, and if the atmosphere is in lower lighting it will have the color from the bottom of the gradient. The Diffuse texture can be changed by clicking on an arrow next to the texture name, and then selecting a new texture in the browser window.

For the Baeldor planet, this is the atmosphere gradient (Image 6, rotated).


The left part is darker as it is used for dusk/dawn, and in the right part of the image is the color of the sky during day. The gradient image is rotated here, the gradient needs to be in upright position (so that the left part is the bottom of the image and the right is the top!). Next images show how the gradient affects the atmosphere:

screenshot-atmospheregradientorange  screenshot-atmospheregradientyellow  screenshot-atmospheregradientblue

GlossMapOff parameter, despite its name, actually controls atmosphere density. Default value is 0.84, but it can be any value between 0.0 and 1.0, where 0.0 means that there is no atmosphere at all for a planet, and 1.0 means that the atmosphere is very dense.

The examples are shown on next images:

screenshot-atmospheredensity0-15  screenshot-atmospheredensity0-66  screenshot-atmospheredensity0-84  screenshot-atmospheredensity0-97

As is with cloud models, the atmosphere model needs to be scaled too, to prevent occlusion from planet model. The usual scale is 1.02, 1.02, 1.02, that is 2% larger than the planet. (The scale of 1.0175, 1.0175, 1.0175 is also good). It can be scaled in Assembly Properties panel, under Scale when the CloudsWrapperAtmosphere.mdl is selected.

Planetary ring

Next is a ring.mdl. Some planets have asteroid rings around them. Rings don’t have much parameters that affect them, just Diffuse texture, Color and Alpha. Example of a ring texture:


The texture has an alpha channel, but since the blend mode for rings is AditiveBlend, it is not used. Dimensions are usually 16 x 512 pix, saved into a *.dds file with ARGB 32 bpp | unsigned format, and with generated mip maps.

Color and Alpha parameters work the same way as with other models presented here.

Leave a Reply

Your email address will not be published. Required fields are marked *