Spacescape Manual

About Spacescape

Spacescape is a program used to create seamless space skyboxes. In video games, the parts of the environment that are very far away are usually part of a skybox, and in space that’s usually the stars and nebulas. A skybox is made up of 6 images, one for each side of a cube. Spacescape is a tool for creating stars and nebulas and then exporting the environment to these six images in such a way that there is no visible seam at the edges of the skybox images when seen in-game.

Layers

Like most graphics programs, Spacescape uses a layer system to group similar types of objects in the scene and to indicate the order in which each group of objects is drawn. Each layer can be either a point star layer, a billboard star layer or a noise layer (used for nebulas, gas and masks). Layers appear in the layer list panel and layers on top will appear in front of layers on bottom in the 3d view.
To create a new layer press the ‘New Layer’ button at the bottom of the layer list panel.
Once you have created a layer it will appear in the layer list panel with a default name and the default layer type, which is a point star layer. You can show and hide the layer parameters by clicking the arrow next to the layer name. To change the layer type, first show the layer parameters and then choose the desired layer type from the ‘Layer Type’ drop-down box.
Common Layer Parameters

  • Layer Name – the name the layer in the layer list panel
  • Layer Type – the layer type (points, billboards or noise)
  • Layer Visible – whether the layer should be displayed or hidden in the 3d view

Each layer can be either a point star layer, billboard layer, or a noise layer (used for nebulas, gas and masks).

Point Layers

Point stars are small square solid color sprites. These are perfect for drawing many far away stars without taxing your graphics card. A point star layer with point size set to 1 will give you very crisp stars. A downside to point stars is that they can be too crisp, after all, far away stars should be a little out of focus right?
There is a simple technique to make point stars look less crisp :

  1. Create 3 identical point star layers
  2. Set the top layer to point size 1, the middle to 2 and the bottom to point size 3.
  3. Make the top layer a bright color, the middle a medium color and the bottom a dark color.

Layer Parameters

  • Random Seed – this number is used as the basis for random number generation.
  • Dest Blend Factor – the destination blend factor indicates how the scene behind this layer should be blended with this layer. more …
  • Far Color – the color of point stars that are far away.
  • Mask Enabled – whether to use a noise mask to determine where point stars should appear.
  • Mask Gain – a multiplier that determines how quickly the amplitudes diminish for each successive octave of noise. Defaults to 0.5
  • Mask Lacunarity – a multiplier that determines how quickly the frequency increases for each successive octave of noise. Defaults to 2.0
  • Mask Noise Type – the mask noise type – either smooth FBM or ridged FBM.
  • Mask Octaves – the number of octaves to use in the noise mask.
  • Mask Offset – the ridged FBM noise offset
  • Mask Power – the final noise value is raised to this power, which makes this useful for changing the noise gradient slope.
  • Mask Noise Scale – the multiplier applied to the initial noise octave.
  • Mask Random Seed – the random number used as the basis for the random number generator for the mask.
  • Mask Threshold – a number between 0 and 1 that indicates a cut-off point for the mask. If you think of noise as rolling terrain, this threshold would be the water level.
  • Near Color – the color of point stars that are closer to the viewer.
  • Number of Points – the number of point stars to draw.
  • Point Size – the size in pixels
  • Source Blend Factor – the source blend factor indicates how the point star is blended with the scene behind it. more …

Billboard Layers

Billboard stars are like point stars, but they use 2d textures instead of solid color sprites. These are good for medium to large sized stars that should have halos or flares. You should not use billboards for asteroids, debris, planets or any other objects where it will be obvious that the lighting wrong. Those should be 3d objects in your scene as part of your 3d skybox or part of the scene itself.
The billboard image files should be in the media/materials/textures folder and can be a wide variety of types including PNG, JPG, and DDS. When specifying the texture name you don’t have to include the path, just the filename e.g. mybillboard.png
A number of free billboard images are included with the program

Layer Parameters

  • Random Seed – this number is used as the basis for random number generation.
  • Dest Blend Factor – the destination blend factor indicates how the scene behind this layer should be blended with this layer. more …
  • Far Color – the color of billboards that are far away.
  • Mask Enabled – whether to use a noise mask to determine where billboards should appear.
  • Mask Gain – a multiplier that determines how quickly the amplitudes diminish for each successive octave of noise. Defaults to 0.5
  • Mask Lacunarity – a multiplier that determines how quickly the frequency increases for each successive octave of noise. Defaults to 2.0
  • Mask Noise Type – the mask noise type – either smooth FBM or ridged FBM.
  • Mask Octaves – the number of octaves to use in the noise mask.
  • Mask Offset – the ridged FBM noise offset
  • Mask Power – the final noise value is raised to this power, which makes this useful for changing the noise gradient slope.
  • Mask Noise Scale – the multiplier applied to the initial noise octave.
  • Mask Random Seed – the random number used as the basis for the random number generator for the mask.
  • Mask Threshold – a number between 0 and 1 that indicates a cut-off point for the mask. If you think of noise as rolling terrain, this threshold would be the water level.
  • Max Billboard Size – the maximum billboard size. Defaults to 0.05
  • Min Billboard Size – the minimum billboard size. Defaults to 0.01
  • Near Color – the color of point billboards that are closer to the viewer.
  • Number of Billboards – the number of billboards to draw
  • Source Blend Factor – the source blend factor indicates how the point star is blended with the scene behind it. more …
  • Billboard Texture – the name of the image to use. These images should be in the media/materials/textures folder and can be a wide variety of types including PNG, JPG, and DDS. When specifying the texture name you don’t have to include the path, just the filename e.g. mybillboard.png

Noise Layers

Noise layers are useful for creating nebulas, gas and for hiding parts of the scene (e.g. masking). These layers can be either smooth FBM (Fractal Brownian Motion) noise or ridged FBM noise. Smooth noise appears billowy and gradual like rolling hills, where as ridged noise can appear more cracked and fractured like mountains.
Determining the right settings for good looking noise layers is an art and it really helps to understand how each parameter affects the outcome.
The way the simplest FBM noise works is a single pass (called an octave) over the scene using the random seeded noise generator to get the values for each pixel. Spacescape uses Perlin noise for you curious ones. Now one octave of noise looks boring, so to make things look more random we apply more octaves of noise to the first one and change the noise parameters for each octave so that the end result looks truly random and, well, interesting! The gain parameter controls how each octave of noise is blended with the previous octaves and the lacunarity parameter controls how each successive octave of noise is scaled. You can control how the very first octave is scaled with the Noise Scale parameter.
To make a smooth nebula, which is useful for making the user feel like they are inside a nebula, use smooth noise with a few octaves. To make interesting far away nebulas use ridged noise with 7-8 octaves and use multiple noise layers to add different colors to the inner parts. Also use dark nebulas overlayed on top of light ones to give them more of a 3d feel.

Noise masks

You’ve probably noticed that point and billboard layers can have noise masks to indicate to those layers where the point stars or billboards should go. This is useful for clustering stars around nebulas or just grouping them in general. To make a point or billboard layer only appear inside a nebula, copy the nebula settings to the noise mask settings for that point or billboard layer.
Noise layers can also be used to hide parts of the scene beneath them. This is useful for making nebulas appear more 3d and for hiding ridged nebulas that have long tendril connections. To make a noise mask first use a bright color so you can see where you mask will go, then when you are happy with the mask look, change the color to black and set the ‘Dest Blend Factor’ to ‘one_minus_src_alpha’ and the ‘Source Blend Factor’ to ‘src_alpha’

Layer Parameters

  • Random Seed – this number is used as the basis for random number generation.
  • Dest Blend Factor – the destination blend factor indicates how the scene behind this layer should be blended with this layer. more …
  • Dither Amount – dark color gradients tend to look bad on computer monitors so this dither amount will apply a small amount of dithering to the gradient so the banding isn’t so visible.
  • Gain – a multiplier that determines how quickly the amplitudes diminish for each successive octave of noise. Defaults to 0.5
  • Inner Color – the inner color of the noise.
  • Lacunarity – a multiplier that determines how quickly the frequency increases for each successive octave of noise. Defaults to 2.0
  • Noise Type – either smooth FBM noise or ridged FBM noise. Smooth noise is like looking down on rolling hills and ridged noise is like looking down on mountains.
  • Octaves – the number of octaves to use in the noise mask.
  • Noise Offset – the ridged FBM noise offset
  • Outer Color – the outer color of the noise.
  • Power – the final noise value is raised to this power, which makes this useful for changing the noise gradient slope. The default value of 1.0 will not affect the gradient at all. Smaller values will make the noise slope more gradual and higher values will make the noise slope more sudden.
  • Preview Texture Size – recalculating the noise every frame would make the program very slow so every time you change a parameter the new noise is rendered to a texture and this parameter controls the size of this texture. If the preview texture size is too low you won’t be able to see fine detail in noise layers. Try creating a ridged noise layer with many octaves and adjust the preview texture size from 256 to 512 to 1024 and see how more detail is visible.
  • Noise Scale – the multiplier applied to the initial noise octave.
  • Threshold – a number between 0 and 1 that indicates a cut-off point for the mask. If you think of noise as rolling terrain, this threshold would be the water level.
  • Source Blend Factor – the source blend factor indicates how the point star is blended with the scene behind it. For additive layers (the default) set source blend factor to ‘one’ and destination blend factor to ‘one’. more …

Source & Destination Blend Modes

The source and destination blend factor options have confusing names, I’ll admit.  They are not the same as Photoshop blend modes, rather they come from the OGRE3D blend modes for pixel shaders.  Check out http://www.ogre3d.org/docs/manual/manual_16.html#scene_005fblend for a full description of the blend modes.