We'll start our nebula in Modeler.
Load up the starfield that you created
in the previous lesson (or whatever starfield
you plan to use this nebula with).
Now click on Layer 2 and put Layer 1 into
the background so you can still see it.
Create a ball with the following settings:
Note that the 5.5Mm radius is designed
to ensure that the ball completely encircles
the starfield object, which has an approximate
radius of 5Mm, as seen here.
You can now go back to Layer 1 and delete
the starfield object.
Cut and paste the ball object from Layer
2 to Layer 1 and save the object as MyNebula.lwo
or something like that.
Time to do a bit of editing on this nebula
object, as background nebulae could never
be spherical... think about it.
Any way, using the selection tools at your
disposal, make the following selection
IN THE FRONT/BACK VIEWPORT.
| -X |
 |
+X |
| selection
made |
Cut these polygons out, press z
to delete the remaining polygons,
then paste the selected polygons
back into the same layer.
 |
| the
remaining polygons |
You should be left with an object that
looks like the image above.
If you switch on your OpenGL preview, you
will see that all the polygons point outwards
from the center of what was the ball.
This is no good to us, as we want to be
able to see the inside of the ball.
Press f to flip all the polygons'
orientation, and now all the polygons
face inwards, towards the center of the
ball.
 |
| polygons
flipped |
Now we are going to define the surface
of the nebula.
Press q to apply a new surface and
call the new surface Nebula.
 |
| Lightwave
[6] surface requester |
Make the surface colour pure black (000,000,000)
and set the diffuse level to 0%, as we
do not want this object to be affected
by the scene lights. If you are using
Lightwave 5.6 set smoothing to On,
but if you are running Lightwave [6],
don't worry, we'll do this later on.
Save your object again now.
We will now apply a temporary image map
to the object in order to place the texture
correctly.
Firstly, we need to work out what the dimensions
of our image must be in order to prevent
the image we eventually paint being stretched
out of shape when we map it onto the object.
WARNING! BASIC
MATHS INVOLVED!
If you created your object using the settings
I specified earlier, (ie: a ball with
a radius of 5.5Mm) and then cut out exactly
the polygons I showed, then you are let
off doing the sums. Your nebula has a
radius of 5.5Mm and is 3.4Mm from top
to bottom, so using basic Pythagorus theorum,
we can work out that the inner circumference
of our nebula is (5.5Mm x Pi) wide and
3.4Mm high.
Doing the sums, this works out as 17.28Mm
x 3.4Mm. Accordingly, that is a picture
aspect ratio of roughly 5:1, so our nebula
image must be five times wider than it
is high.
If you DIDN'T follow the instructions exactly
for any reason, either go back and re
do them, or work out the required aspect
ratio for your nebula image. To do this,
take the radius of your nebula and multiply
it by Pi (3.14159...). This will give
you the inner circumference of your nebula.
Divide this number by the height of your
nebula (use the measure tool under the
Display menu to find this out) and the
resulting number is your aspect ratio,
so if you get something like 6.2 as the
result of your calculation, it means that
your nebula image must be 6.2 times wider
than it is tall.
Okay, so using my settings, I'm going to
create a temporary nebula image.
Open Photoshop, or whatever you use, and
create a new image. My aspect ratio had
to be 5:1 so I am going to create a temporary
image sized 500 x 100 pixels.
Give your image a black background and
just paint some quick stuff in white over
the top of the black. Do try to leave
a clear black border around the edges
of the nebula if you can, but don't spend
any time making this look nice, we'll
be deleting this image later anyway.
Finally, write your name in big black letters
over the top of the nebula image. You'll
see why later on.
Here's what I came up with in about fifteen
seconds:
 |
| mmm!
nice! |
Save this image out as some format that
Lightwave can read (Photoshop .PSD is
good) and quit Photoshop again.
We will be mapping the object cylindrically
in order to minimise distortion in the
mapping process.
 |
Lightwave [6]
|
|
 |
Lightwave 5.6
|
|
|
Quit Modeler, open Layout and
load your MyNebula.lwo
object.
Open the Surface Editor and
select the Nebula texture.
Leave all the surface settings
at their defaults, except
for the the following:
| Surface Colour |
000,000,000 (black) |
| Luminosity |
100% |
| Diffuse |
0%
|
| Smoothing |
ON (angle 89.5%) |
|
|
Click the
next to the colour settings
in order to apply a texture
map to the colour channel.
|
Click the
next to the colour settings
in order to apply a texture
map to the colour channel.
|
| Apply your temporary
nebula image map as a Cylindrical
projection through the Y
axis, set the Width Wrap Amount
to -2.0 and turn OFF Texture
Antialiasing as shown below. |
 |
 |
|
Next, press Automatic Sizing.
You will see that the texture
is assigned a size of X=5.5
Mm, Y=3.992 Mm
and Z=11 Mm.
These settings are based on
the actual object we are working
with, and the actual center
of our object is not 0,0,0.
Therefore, because we want
the texture to be mapped according
to the theoretical circle
that this shape would define
if it were a complete circle
rather than a semi-circle,
we need to double the
value for X given by the Automatic
Sizing.
|
|
In the Scale area, double
the value given for the X-Scale
(I doubled mine from 5.5 to
11 Mm).
Next, click the Position
tab and set the X-Position
to be 0.
|
Click the Texture Size
button and double the X value
(I doubled mine from 5.5 to
11 Mm).
Next, click the Texure Center
button and set the X value
to 0.
|
|
FInally, click the Use Texture
button to confirm your texture
settings, then close the Surface
Editor and save your object.
|
We have now finished the modelling and
texture settings for the nebula object.
Let's set up a quick test render to see
what we've got and to check that everything
is working OK.
Load up the scene that we saved at the
end of the starfield lesson called 'Space_Environment_01.lws'.
This scene, if we look back, should have
three of our starfield objects all parented
to a Null Object called Space Scenery
Parent.
Load your nebula object into the scene
and parent it to the Space Scenery
Parent object.
In the Object Properties window / Objects
Panel, turn off all the shadowing options
for the Nebula object. This is important
because we don't want our nebula to cast
its shadow on objects within the scene,
and we definitely don't want the other
objects in the scene to cast their shadows
onto the nebula.
Change to the camera view by pressing 6
on the numeric keypad, and you should
be able to see the edge of your nebula.
Select the nebula and rotate it around
(don't ever move the nebula or
starfield objects) until you get a view
of the nebula that you like.
 |
| rotating
the nebula into position |
When you get a good view, press F9 and
have a look at the render.
Let's just check that the nebula is mapped
correctly. The first thing to check is
that the lettering of your name is not
backwards, upsidedown, squished or otherwise
messed up. If it is, firstly check to
make sure that you set the Width Wrap
Amount in the texture options to -2.0
and not 2.0... this is the most
common cause.
Next. rotate the nebula around so that
you can see the left-edge of the object
like this:
 |
| left
edge of the nebula |
Don't trust the OpenGL preview here, it
often lies about mapping information when
it comes to cylindrical mapping, especially
in Lightwave 5.6. Do a quick render to
make sure that the nebula image fits the
nebula geometry properly.
If all is well, rotate the nebula so you
can see the right edge and repeat the
render process.
 |
| right
edge of the nebula |
If your nebula image does NOT fit the geometry
properly, it is most likely because your
nebula object is oriented in the wrong
direction. Go back to Modeler and rotate
the object 90 degrees around the Y axis,
then bring it back to Layout and try rendering
again.
When you are content that your nebula is
working properly, save your scene as Space_Environment_02.lws
and save all the objects in the scene
too.
Now, go to frame 0 on the time slider and
rotate your camera so that is looking
at one edge of the nebula. Next, go to
frame 200 and rotate the camera so that
it is looking at the other edge of the
nebula.
Set the camera resolution to 400x200 pixels,
turn on motion blur and particle blur
and render a quick animation to see what
you've got.
|