Spacescape Tutorial: Your First Spacescape

Download The File: Your-First-Spacescape.xml

What We Want

The goal of this tutorial is to show you have to create a basic spacescape with one of each type of layer, a noise layer, a point star layer, and a billboard star layer. Sounds simple huh? It is! Here’s a screenshot of what we’ll end up with:

Fire up Spacescape.exe and lets get started!

Noise Layers

Noise layers are the most complicated and difficult to understand of all the layers so lets get them out of the way first shall we? Noise layers are used in spacescape to draw nebulas/gas/fog in the spacescape. They’re called noise layers because they’re random patterns that can be very subtle or have a lot of fine detail depending on the effect you are trying to achieve. We’re going to make a subtle blueish nebula to start with.
First create a new layer by clicking the ‘New Layer’ button:

A layer called ‘SpacescapeLayer0’ is added to the layers panel and you see a bunch of grey/white dots in the viewport. Click on the arrow next to the word ‘SpacescapeLayer0’ to expand the layer and view the layer properties.
Change the ‘Layer Type’ drop down from the default ‘points’ to ‘noise’ and the app should look like this:

The default noise is very simple and smooth, and it is grey and white and BORING. Before we dive in, let me describe some of the basic noise controls.
There are two types of noise (see the Noise Type parameter): fbm and ridged. ‘fbm’ noise stands for Fractal Brownian Motion noise and is smooth, where as ‘ridged’ noise is a form of Fractal Brownian Motion noise that has pronounced ridges and looks a lot more like tendrils.
The color of the noise layer is set by the Inner Color and Outer Color parameters with the resulting noise color fading from Outer to Inner. For the default values the noise fades from black to white.
The primary controls for how detailed the noise is comes from the ‘octaves’, ‘gain’ and ‘lacunarity’ parameters. If we just set ‘octaves’ to 1 we will just see a single pass of the noise function, which is boring. If we set ‘octaves’ to 2 we are making two passes of the noise function combined – the first pass is what you see when octaves is set to 1, and the second pass adds the image from the first pass but scales it by the ‘lacunarity’ amount and applies it with the transparency set by ‘gain’.

This makes the noise far more detailed and interesting when you add more octaves (passes). Try bumping ‘octaves’ amount up and note how the noise gets more and more detailed with each ‘octave’. NOTE: at some point the detail in the noise will be too high to see unless you increase the ‘Preview Texture Size’ from the default value of 256. I recommend that you use a ‘Preview Texture Size’ of 1024 for detailed noise layers (or higher).

So for our nebula let’s keep things simple and set the octaves to 6 and the ‘Preview Texture Size’ at 512

Now change the ‘Inner Color’ to a light blue.

The last thing we’re going to do is make the nebula not appear all over the sky. To do that easily change the ‘Threshold’ setting to 0.5 and check out the result.

The ‘Threshold’ setting is a value from 0.0 to 1.0 that affects when to start fading from the ‘Outer Color’ to the ‘Inner Color’. The default of 0 means that the fade starts immediately, where as starting at 0.5 means start the fade when the noise value is 0.5 in the image. Another way to think of this is to imagine a landscape with mountains and valleys. The mountains are high noise values with a max height of 1.0 and the valleys are noise values with a minimum height of 0.0 and the threshold is like the water level which has no affect when set to 0.0, but would hide the entire landscape when set to 1.0
That’s it for the noise level! Check out the noise layer tutorial for more complicated tricks you can do with noise!

Point Star Layers

The next layer type we’re going to work with are point star layers and they are the simplest type of layer. These layers put pixel-shaped solid dots all over the sky. You specify the size, color, amount and how they should be clustered.
First create a new layer by clicking the ‘New Layer’ button:

A layer called ‘SpacescapeLayer1’ is created with the default type of ‘points’. Go ahead and expand the ‘SpacescapeLayer1’ layer so you can see the properties.

The default for point layers are single pixel monochrome stars. For our example this is almost what we want, but to make them fit in with the blue nebula we’ll make the stars blueish too so they’re kind of cold.
Change the ‘Near Color’ to a light blue.

That’s all we’ll do for point stars in this tutorial, but note that in a more realistic spacescape we would probably have at least 2 point star layers, ones that appeared outside the nebulas and were dark, and ones that appeared inside the nebulas and were brighter.

Billboard Star Layers

The last layer we’ll create is a billboard star layer. These layers are just like point stars only they draw billboard/sprites all over the spacescape instead of square solid color pixels. This makes billboards ideal for putting larger stars with flares in the scene.
Create a new layer:

A new layer called ‘SpacescapeLayer2’ is created – go ahead and expand the layer properties and change the ‘Layer Type’ to ‘billboards’

At this point you see a bunch of white glowing stars added to the scene in varying sizes. The image used for each star is designated by the ‘Billboard Texture’ parameter. The value for the texture parameter can be any of the filenames in the media/materials/textures folder, and you can add your own textures there too to use them in the program.
For our example we’ll change the Billboard Texture parameter to flare-blue-purple2.png

The last thing we’ll do is make these billboard stars only appear inside our blue nebula. This is where the mask parameters come in to use. Point and billboard layers can use masks so that they only appear in areas of the spacescape based on noise values.
To make our billboard stars only appear inside our nebula we’ll copy the settings from our noise layer to the mask parameters in our billboard layer. The values we set in our noise layer were ‘Octaves’ and ‘Threshold’, so set the ‘Mask Octaves’ to 6, the ‘Mask Threshold’ to 0.5, the ‘Mask Random Seed’ to 0 and then click the ‘Mask Enabled’ checkbox.

Notice how the blue billboard stars now appear randomly inside the nebula areas. In my opinion there are too many of them so set the ‘Number of Billboards’ parameter to 40. Also, I didn’t like the placement of the stars within the nebula so I changed the ‘Random Seed’ parameter for the billboard stars layer till I got one that put the stars in more pleasing locations. The one I liked was with ‘Random Seed’ set to 2. NOTE: don’t change the ‘Mask Random Seed’ parameter we set earlier – that changes the random seed for the mask!
And we’re done!
 
Download The File: Your-First-Spacescape.xml