Build a Better Starfield (Modeler)

Share this

BetterSpace

The first, and arguably the most obvious visual cue to the viewer that they are looking at an image showing outer space is the presence of a vast, sprawling starfield against the inky blackness of space.

A starfield is one of the easiest things to create for CG space, but it is also one of the easiest things to mess up, and if your stars don't look right, your whole scene is ruined. The first thing that a lot of people do when they are creating space scenes in Lightwave is to load up a copy of the ACTUALSTARS.LWO object and leave it at that. Hey! Come off it, the ACTUALSTARS.LWO object only has 1572 stars in it! Not very realistic at all.

There is no 'right way' to create a starfield, but the method described here works pretty well, I think you'll agree.

1) Previous Step | Next Step

 

Open Modeler [6] and create a ball with the following settings:

Lightwave [6] Ball Requester

(Please note, that is Mm [megameters] not mm[millimeters].)

Kill the polygons in the ball object by pressing k.

Convert the points left behind from the ball to single-point-polygons by running the plugin called 'Points2Polys' from the Additional menu.

Copy these single-point polygons (SPPs) and paste them into a new layer.

Rotate the ball of points in the second layer by one degree about the Y axis so that the points do not occupy the same positions as those in the first layer.

Finally, cut the SPPs out of this layer and paste them back into the first layer.

If you check the Statistics panel, you should find that you now have a ball of 18,004 SPPs.

(Please note, that is Mm [megameters] not mm [millimeters].)

Kill the polygons in the ball object by pressing k.

Convert the points left behind from the ball to single-point-polygons by running the plugin called 'Points2Polys' from the Tools \ Custom menu.

Copy these single-point polygons (SPPs) and paste them into a new layer. Continue doing this until you have seven layers, each with its own copy of the ball's points.

Rotate the ball of points in the second layer by one degree about the Y axis so that the points do not occupy the same positions as those in the first layer. Now rotate the points in the third layer by two degrees, the points in layer four by three degrees etc. until you have rotated the points in all seven layers.

Finally, cut the SPPs out of layer 2 and paste them back into layer 1 with the original points. Do this for all the other layers too, until you have all 7 copies back in layer 1.

If you check the Statistics panel, you should find that you have a ball of 17,934 SPPs.


2) Previous Step | Next Step

 

We now have the basis for our starfield object: a bucket load of single-point-polygons.

A ball of several thousand SPPs

What we will do now is define several surfaces within this ball, so that later we can give the stars different colours and intensities. This is by far the least scientific of the steps described in these tutorials...

Press a so that the whole of your object is in view, make sure you are in the polygons selection mode, and then hold down the right mouse button and scrawl a kind of checkerboard-pattern all over your object in the face/front viewport as shown:

selection scrawl in face/front view

When you let go of the pointer, some SPPs will be have been selected and some will not. The original object was around 18,000 polygons, and hopefully you will have selected around half of them (9,000).

half the points selected

Cut these SPPs out of the current later and Paste them into Layer 2.

contents of Layer 2

3) Previous Step | Next Step

Now go back to Layer 1 and repeat the scrawl procedure so that you pick up half or the remaining polygons (about 4,500). For a little variation, draw your selection-scrawl in the top view this time. Cut these out and paste them into Layer 3.

Go back to Layer 2 and cut away half of the polygons here using the same techniques, and paste these polygons into Layer 4...

You should now have four layers, each containing about 4,500 SPPs.

What we are going to do now is cut away half of the SPPs from Layer 1 and paste them into Layer 5, then cut away half of the SPPs from Layer 2 and paste them into Layer 6... can you see where this is going? Essentially, you need to keep cutting away half of the polygons from one layer and pasting them back into a new layer. Each time you draw your scrawl, draw it in a different view port (top, side or front) and try to alter the angle of your scrawl strokes each time too. All of this will help randomise the selections you make.

Continue until you have eight layers, each with around 2,250 SPPs (don't worry if your numbers are a bit off, it will all add authentic randomness to the final starfield.)


4) Previous Step | Next Step

If you have Lightwave [6], you can use Lightwave [6]'s infinite layers (access this by selecting Display \ Layers )and continue dividing the SPP layers until you have 16 layers, each containing around 1,125 SPPs. I recommend that you do this, as it will enable you to have more surfaces defined, which can only benefit the eventual look of the star field.

If, however, you are running Lightwave 5.6, or you can't be bothered to create sixteen layers, then we will proceed to only fill the available layers.

Check through your layers and find the two layers that have the most SPPs in them, then divide these two layers as we have been doing before and paste the SPPs you cut out into Layers 9 and 10.


5) Previous Step | Next Step

We will now define the surfaces for our stars.

Click on Layer 1 and press q to apply a surface.

defining the first surface

Call the surface 'Stars 01' and define a colours of your choice, as shown above.


6) Previous Step | Next Step

Click on Layer 2, press q and call this surface 'Stars 02'. Give these stars a different colour.

Continue through all your layers repeating this step, giving each layer's SPPs a new surface name each time (Stars 03, Stars 04, Stars xx...)

Each time you define a new surface, specify a new colour too. It doesn't really matter what colour you choose at this point, just as long as you can tell each surface apart from all the others. We will come back to these colours later.


7) Previous Step | Next Step

Once you have finished defining all the surfaces, we have to get all the SPPs back into a single layer.

This is easily accomplished by clicking on Layer 1, then shift-clicking on each of the other layers in turn until all the layers are selected. (NB: If you are in Modeler [6] and using more than 10 layers, you will need to use the Layers control [ Display \ Layers ] to select the layers after Layer 10).

If all the layers are selected, press x to cut away all of the SPPs from their respective layers. Now click on Layer 1 alone, and press v to paste back the SPPs.

OpenGL view: 18,000 SPPs and lots of colours

Hopefully, you will now have a single layer with around 18,000 SPPs and ten or more different colours spread between them.


8) Previous Step | Next Step

Looking at the OpenGL view above, it is clear that two major obstacles prevent our ball of SPPs from looking like stars. Firstly, the points are all positioned too regularly, and secondly, the colours we defined are all in patches, clumped together. This is no good at all.

Luckily, there are several tools available to us that can easily rectify the situation.

Tool number one in our arsenal is the Twist tool ( Modify \ Flex \ Twist ). Select this tool and then twist the SPPs around the Y axis about 700 degrees. (Do this by clicking on the 0,0 point in the top view and dragging the mouse to the left). Next, twist by an equally large number around the X axis, and then around the Z axis.

SPPs twisted in 3 directions

As you can see, this quickly destroys any sense of order that might once have existed in the position of the SPPs in this object.


9) Previous Step | Next Step

The twist was good, but not enough to completely eliminate the appearance of colour groupings... we need a more drastic tool now. Jitter fits the role very well.

Select the Jitter tool ( Tools \ Points \ Jitter ) and enter the following settings:

Lightwave [6] Jitter requester

Press OK and watch the results. As you can see, the points have jiggled about from their original positions and become slightly more random in their placement.

They haven't moved about enough yet, so apply Jitter again with the same settings about 10-15 times until you have a nice 'furry' edge to your ball.

"10-15 times?!?!" I hear you say... "Why not just apply it once with the Radii settings increased by a factor of 10-15?"

The answer to this is that by doing a whole lot of small jitters, the overall shape of the object is not changed; it's still a hollow ball of points. If you do a single jitter with a very large setting, the shape is not retained nearly as well, and you lose control of the shape that you started with. Lots of small jitters are always better when the target object is to be roughly the same shape as the pre-jitter object.

SPPs after multiple jitters

After 10-15 Jitter operations, your starfield should be looking rather like the images above.


10) Previous Step | Next Step

As a final touch, and to get some nice groupings into our starfield, we will incorporate the ACTUALSTARS.LWO object that comes with Lightwave into our own object.

Lightwave [6]

Press L to load a new object and browse to \Objects\Space\ACTUALSTARS.LWO to load up the ActualStars object.

This will automatically open a new set of layers and place the ActualStars object into Layer 1.

Copy this object and paste is into Layer 2.

Rotate the object in Layer 2 by 90 degrees around the Y axis.

Copy the object from Layer 2 and paste it into Layer 3.

Rotate the object in Layer 3 by 90 degrees around the Y axis.

Select all three layers and Cut them away.

Close the current object ( Objects \ File \ Close Object ).

Return to the starfield object we were originally working on.


11) Previous Step | Next Step

Select Layer 2 of the our starfield object and put Layer 1 in the background so that it shows through as a black outline.

Paste the contents of the clipboard into Layer 2 (the clipboard should contain the three copies of the ActualStars object that we just made).

Scale the contents of Layer 2 with the following settings:

scale settings

This should scale up the ActualStars object so that it is at the same scale as our own starfield.

3 copies of ACTUALSTARS.LWO in the foreground layer

Finally, cut the contents of Layer 2 away and paste them into Layer 1 along with our own starfield.


12) Previous Step | Next Step

Looking at our object now, we see that now we have loads and loads of stars, which is good. At this point, your object should have around 23,000 points.

our object with 3 ActualStars objects added

There is still a slight problem with our starfield, in that the density of stars all over the globe is fairly regular. Let's fix this now, so that we can have a band of more dense clustering within our globe.


13) Previous Step | Next Step

In the face view, use the right-button to draw a rough selection area as shown below.

selecting a strip of stars

Copy these selected stars and paste them back into Layer 2.

Rotate the stars in Layer 2 using these settings:

rotation settings

14) Previous Step | Next Step

The previous stepshould leave you with a strip of stars that do not occupy the same space as any stars in Layer 1. To be absolutely sure that they do not, run Jitter on these stars a few times (2 or 3) using the following settings.

Lightwave [6] Jitter requester

This will leave you with something like this:

strip of stars jittered

15) Previous Step | Next Step

As a little refinement, use the Twist tool to twist your strip of stars around the Y axis by 45 degrees, leaving you with something like this:

face view: twisted strip

This will help to prevent the more dense strip of stars looking too 'intended'.

Finish off your object by rotating the strip by 20 degrees around the Z axis.

face view: twisted strip rotated

You can now Cut the star strip away and paste it back into Layer 1 with the rest of the stars.


16) Previous Step | Next Step

If you want an even more dense band of stars, in a sort of Milky-Way arrangement, you could repeat the steps from 13) but this time use a narrower selection band.

That concludes our fun with Modeler for now. Save your object, quit Modeler and proceed to the next lesson when we get busy in Layout to set up surfaces and rendering options for our starfield.


© 2000 Kier Darby and Alternate Perspective 3D Ltd.