1 Tutorials LightWave 3D Quick Terrain for Games 1 Qua Jan 26, 2011 1:54 am
Admin
Admin
by Michael Hulme
One of the first processes when
you create games is design: the act of
putting down on paper the collective ideas of
the producer, writer, and other team members.
Games are often divided into levels,
which are defined segments that the player must
complete before he can move on. A level is often
a section of terrain or a location that the player
must negotiate around and through. The designer
will create a top-down view of the level in forms
ranging from a rough sketch to very elaborate
CAD-type displays. This spells out certain features
to the programmers and artists assigned to that
level. For example the view may show exactly
how large the overall level is, where things
are located, what game-play occurs here, and
maybe even more exacting information like distances
between important points or height values of
the topology.
Once the design of the level
is complete, it is handed off to the 3D artist
assigned to that level. If you were that artist,
would you stare back at the designer like a deer
caught in the headlights, filled with anxiety
at such a daunting task? Or would you fire up
LightWave® and tear into that design like
there's no tomorrow (that's probably when it's
due anyway...)? This article should help you
decide the latter.
Artists will often take the
design and methodically try to recreate it by
eye. They will roughly approximate where certain
landmark items are and just fill in the gaps.
A good deal of time is wasted in double-checking
whether the artist's concept is close to the
designer's intention. This may entail shifting
elements around, scaling some elements, and so
on.
In the end you're only as good
as your visual judgment—which may be very
good—but hey, why work so hard? (You've
got collectible toy Web sites to surf and personal
emails to write!) Moreover, why let imperfections
enter into the process? Let LightWave® and
its plethora of tools take the burden off your
shoulders.
This tutorial will show you
a quick and easy way to get results on the screen
in a very short period of time
Creating the Images
.]
One of the first processes when
you create games is design: the act of
putting down on paper the collective ideas of
the producer, writer, and other team members.
Games are often divided into levels,
which are defined segments that the player must
complete before he can move on. A level is often
a section of terrain or a location that the player
must negotiate around and through. The designer
will create a top-down view of the level in forms
ranging from a rough sketch to very elaborate
CAD-type displays. This spells out certain features
to the programmers and artists assigned to that
level. For example the view may show exactly
how large the overall level is, where things
are located, what game-play occurs here, and
maybe even more exacting information like distances
between important points or height values of
the topology.
Once the design of the level
is complete, it is handed off to the 3D artist
assigned to that level. If you were that artist,
would you stare back at the designer like a deer
caught in the headlights, filled with anxiety
at such a daunting task? Or would you fire up
LightWave® and tear into that design like
there's no tomorrow (that's probably when it's
due anyway...)? This article should help you
decide the latter.
Artists will often take the
design and methodically try to recreate it by
eye. They will roughly approximate where certain
landmark items are and just fill in the gaps.
A good deal of time is wasted in double-checking
whether the artist's concept is close to the
designer's intention. This may entail shifting
elements around, scaling some elements, and so
on.
In the end you're only as good
as your visual judgment—which may be very
good—but hey, why work so hard? (You've
got collectible toy Web sites to surf and personal
emails to write!) Moreover, why let imperfections
enter into the process? Let LightWave® and
its plethora of tools take the burden off your
shoulders.
This tutorial will show you
a quick and easy way to get results on the screen
in a very short period of time
Creating the Images
- First, take the design and run screaming
to the scanner! Let's use the actual design
itself as a tool. It will make your life easier,
and it will also serve as a backup if the designer claims that
your model is not quite what he intended. You
can show him that it was his actual design
that helped create it! Busted!!
Anyway, take a look at the example design (fig.1).
This simple drawing will be the framework for
our process. Once you've scanned your design
into a digital form, it's all on your turf
now baby! - Load the scanned image into your favorite
paint package like Photoshop or Aura. We want
to transform the design into information that
LightWave® can really sink its teeth into.
Figure 1 - We'll start by creating a grayscale image
based on the varying heights of the terrain.
Black will correspond to the lowest depth and
white to the highest height. It may help to
think of a black-to-white gradient ramp (fig.
2) as a height graph for your image. For example,
if black is 0 and white at the top is 40 meters
high, then the value of gray in the middle
would be equivalent to 20 meters high.
Figure 2
Armed with this knowledge, let's start filling
in areas on the map. If your paint program
has a layering system, paint on a separate
layer with the design in the background as
a reference. - The design shows water on this terrain, which
is a perfect candidate for black, the lowest
depth on our map. Fill in that area with black. - The area on top of the cliffs looks flat,
and it's also the highest area of the terrain
so—yep you guessed it—paint it white.
You're catching on! - Now the road is an interesting situation.
Think back to the (gradient ramp) height graph.
This is a great visual aid for selecting how
high on the cliff our road should be. Since
it's a cliff-side road winding along the water's
edge, you can choose a height that's fairly
low, but not prone to flooding (hate when that
happens!). RGB 48, 48, 48 will do nicely. Figure
3 is the result.
Figure 3 - The harsh color transitions in our image
would result in some seriously (i.e., gnarly)
steep cliffs, which would actually be perpendicular.
That may be the desired effect in some cases,
like in a city scape design where squares represented
buildings, but in this case we want a little
slope to the cliffside.
Applying a little blurring will do the trick.
Although you could blur the entire image to
soften the transitions, this might digitally
erode our landscape too much. Use your
lasso selection tool and select the areas where
the different colors meet, with a little extra
for a nice gradient area. Then, blur that selection
to suit your needs (fig. 4). Save the image.
Figure 4 - Now, use either the original scanned drawing
or your new grayscale image as a template to
create a color version of the terrain.
The water should probably be in shades of blue.
The flat ground on top of the cliffs could
be grassy green with brownish rocky cliffs
all along the shore. (Your colors might be
vastly different if your terrain was on Mars.) - If you are using the grayscale image, the
existing gray for the road is probably fine.
However, add some lines to really make it look
like a road. - Don't be afraid to throw some texturing effects
in the image to rough it up and give it a more
natural quality. Have fun with this. It will
give your terrain character! I quickly came
up with Figure 5.
Figure 5 - Save your image
Modeling the Terrain - On to Modeler, and all the fun! Let's start
by creating a simple subdivided plane. Choose
the Box tool (Create > Box)
and open the numeric panel.
I have Modeler's main window minimized a bit, with the Layers panel, the VMAPs panel, and the Numeric panel lined up neatly along the right edge. These are open all of the time for quick access to those tools. |
- Open the numeric panel for the Box tool,
and in the Low XYZ input fields enter
-80 in X, 0 in Y, -80 in Z. In the High XYZ input
fields, enter 80 in X, 0 in Y, 80 in Z. In
the Segments XYZ input fields,
enter 64 in X, 1 in Y, and 64 in Z. Deselect
the Box tool. Hit [Shift + t] to triple the
polygons. You should have the same object as
seen in Figure 6.
Figure 6 - Remember those textures we created? Let's
put them to work for us now. With nothing selected,
press the q key to open the Change Surface
panel. - Type "Terrain" into the Name field
and leave the other fields at their defaults.
Click OK to close the dialog. - At the bottom right of Modeler's main window
you'll see the W, T, and M buttons,
which stand for Weights, Textures, and Morphs
respectively (hey, read the manual!). Click
the T button and choose (new) from
the pop-up menu to the right of the button.
The Create UV Texture Map panel pops up for
you to assign UV values to your terrain's points. - No points are selected, so all points
will be included in the UV map. (You could,
of course, select some points and constrain
the mapping to only those points, but that's
getting a little more involved, and this is
supposed to be a "quick and easy" tutorial!)
Enter "TerrainUV" into the Texture
Name field and make sure the Map Type is
set to Planer, the Axis is Y
and Automatic is active. Click OK.
The UV map is now created. (See Figure 7)
Figure 7
- .
.]