Anda di halaman 1dari 24

Asteroid Tutorial

Creating Asteroids
Tools Used: 3ds MAX 4.2 (most of this material should apply
to earlier versions of max)
Texporter - for exporting mapping coordinates to an image

A few months ago, I was given a project: design 10-15


asteroids, appropriate for use in a real-time 3d space shooter
game. My requirements were: each asteroid should be 4,000 -
8,000 polygons (to be scaled down in-game), have its own
texture map (up to 512x512), and have minimal texture
stretching and seams. This tutorial explains how I achieved
this.

This tutorial is NOT meant for novice MAX users. It involves


using a fairly large number of tools and plugins, and I simply
cannot explain the workings of each of them. I did, however,
separate the steps in this tutorial into two categories - crucial,
and optional. The optional steps are often more complicated,
but they're the details I couldn't find in any other tutorials,
and they're the reason for this tutorial's existence. They're
colored yellow. So follow all the steps if you can, but if you're
having trouble, start with the basics.

Note: Some of the images have been scaled down, to fit


better on the page. Simply click an image to bring up the full-
resolution version.

Without further adieu, load up Max, and we'll begin!

http://waylon-art.com/tutorial/tutorial_1.html[10/8/2010 5:26:38 AM]


Asteroid Tutorial

Next: Basic Asteroid Shape

www.waylon-art.com
waylonbrinck@gmail.com

http://waylon-art.com/tutorial/tutorial_1.html[10/8/2010 5:26:38 AM]


Asteroid Tutorial

Basic Asteroid Shape

1) Start
with a
geosphere.
Give it a
radius
somewhere
between 80
and 90, and
5 segments.
(The radius
isn't
important,
except that
it works
better with
the example
values I
give
throughout
this tutorial.
I gave it
five
segments
because I
liked the
polygon
count this
resulted in.)

2) Add a
"Noise"
modifier.
This gives
the asteroid
its basic
shape. Type
in a scale of
about 80
and strength
values of
60, 50, and
40 for the
X, Y, and Z

http://waylon-art.com/tutorial/tutorial_2.html[10/8/2010 5:26:59 AM]


Asteroid Tutorial

strengths,
respectively.
Now play
with the
seed value
until you
find a shape
you like.
(Putting in
different
values for
the X, Y,
and Z scales
gives the
asteroid a
somewhat
less uniform
shape. The
numbers I
picked just
happened to
work well
for me, but
play with
them a bit if
you don't
like the
results they
give.)

3) Add a
meshsmooth
modifier.
This will
smooth out
the mesh,
give you
more
polygons to
work with,
and allow
you to
further
shape the
mesh if you
want to. Set
the
"Iterations"
value to 3,
and you're

http://waylon-art.com/tutorial/tutorial_2.html[10/8/2010 5:26:59 AM]


Asteroid Tutorial

on your
way!
(Setting
"Iterations"
higher or
lower will
give you
more or less
polygons to
work with.)

Advanced
If you want
more control
of your
mesh: In
the "Local
Control"
section, click
on the
"vertex"
icon just to
the right of
where it
says
"Subobject
Level". This
will display
a bunch of
control
points
across the
mesh, which
you can
move
around to
warp the

http://waylon-art.com/tutorial/tutorial_2.html[10/8/2010 5:26:59 AM]


Asteroid Tutorial

geometry.
Be sure to
play around
with Soft
Selection a
bit, since it
can really
speed up
your
modeling.

Also, note
that with
the noise
modifier, the
mesh will be
more or less
symmetric
across one
axis. You'll
want to
manually
adjust
control
points to
make this
look better.

4) You're done with the basic shape of your asteroid! Now it's
time to add some details...

Next: Adding Details

www.waylon-art.com
waylonbrinck@gmail.com

http://waylon-art.com/tutorial/tutorial_2.html[10/8/2010 5:26:59 AM]


Asteroid Tutorial

Adding Details

1) First,
we're going
to add some
craters using
Displacement
Maps. For
this
example, I
used a few
different
bitmaps,
including
single craters
and
collections of
multiple
craters. If
you like, you
can use the
displacement
maps I've
provided, or
(obviously)
you can
make your
own.

2) Add a
"Displace"
modifier. Set
the strength
to -100, and
the decay to
20. Under
"Bitmap",
click on the
button
labeled
"None", and
go find the
displacement
map you
want to use.

http://waylon-art.com/tutorial/tutorial_3.html[10/8/2010 5:27:17 AM]


Asteroid Tutorial

In the "Map"
section, type
a value in
"Length" and
"Width". I
typed 200
for this
crater, but
you can
change that
to make
your crater
bigger or
smaller.
(Setting the
"Decay"
value to
something
other than 0
helps make
sure the
crater
doesn't also
end up as a
bulge on the
other side of
the
asteroid.)

3) Now you
get to
position your
crater. An
easy way to
do this is to
rotate the
perspective
view until
you're
looking
"down" at
the asteroid
from the
direction you
want the
crater to be
applied. In
the
"alignment"
section of

http://waylon-art.com/tutorial/tutorial_3.html[10/8/2010 5:27:17 AM]


Asteroid Tutorial

the modifier,
click "View
Align". That'll
point the
crater in the
right
direction, but
you still
need fine-
tune the
position.

4) Go into
sub-object
mode for the
gizmo (Click
on the word
"Displace" in
your
modifier
stack). Set
the
"Reference
Coordinate
System"
dropdown to
"local". Now,
move the
gizmo in the
Z-axis so
that it's just
barely
resting on
the surface
of the
asteroid -
this will give
you control
of how
"deep" the
crater
appears. You
can move
the crater
left and right
by moving
the gizmo in
the x- and
y-axes.

http://waylon-art.com/tutorial/tutorial_3.html[10/8/2010 5:27:17 AM]


Asteroid Tutorial

5) Here, I
added a
displacement
map with a
few craters
in it. The
settings, for
the most
part, are the
same.

6) After
your asteroid
is sufficiently
cratered,
I've found
that it's nice
to add a few
more noise
modifiers, to
give it a little
texture. The
problem with
noise,
though, is
that it's very
uniform - all
the bumps it
creates have
a very even
distribution,
even with
fractal noise
enabled.

7) To get
around this,
add two
noise
modifiers
with different
scale and
strength
values, and
possibly
check
"Fractal" for
one of them.
This will

http://waylon-art.com/tutorial/tutorial_3.html[10/8/2010 5:27:17 AM]


Asteroid Tutorial

make it look
a little more
random. The
values I used
in the
example
worked out
pretty well,
but as
always, play
around with
them until
you find
something
you like.

Next: Mapping Coordinates

www.waylon-art.com
waylonbrinck@gmail.com

http://waylon-art.com/tutorial/tutorial_3.html[10/8/2010 5:27:17 AM]


Asteroid Tutorial

Simple Mapping Coordinates

1) Giving the asteroid really good UVW coordinates is a pain in the


butt. For this project, I needed to minimize both the amount of
stretching and the number of seams that the asteroid has. Among
other things, this makes texture mapping the object a lot easier.
Unfortunately, setting up good mapping coordinates is pretty involved.
If you'd rather just get the damned thing mapped, follow the
instructions in this section. But if you want to do a really good job,
skip ahead to "Advanced Mapping Coordinates."

2) Start by
making a new
material, and
give it a
texture map
that's just a
black and
white
checkerboard...
Make sure it's
an actual
bitmap (don't
just give it a
"checker"
material), and
click the "Show
Map in
Viewport"
button. A
checkerboard
texture is a
really useful
tool for finding
stretched
mapping
coordinates,
and I use it on
nearly every
object I need
to UVW map.

3) Apply that
checkerboard

http://waylon-art.com/tutorial/tutorial_4.html[10/8/2010 5:27:50 AM]


Asteroid Tutorial

material to
your asteroid,
and add a
UVW Mapping
modifier. At
this point, if
you want to
minimize
seams,
"Spherical" is
the best
mapping
method, and if
you want to
minimize
stretching,
you'll want to
use "Box"
mapping.
There. You're
done! But if
you used
spherical
mapping, look
at how the
texture is all
bunched up at
the top, and
how stretched
it gets around
the edges. Or
with box
mapping, look
at how ugly
those seams
are. That's not
good at all!
Cylindrical and
planar
mapping have
similar
problems, so if
you REALLY
need to do a
good job,
here's how:

Advanced Mapping Coordinates

http://waylon-art.com/tutorial/tutorial_4.html[10/8/2010 5:27:50 AM]


Asteroid Tutorial

1) What we want to do is to minimize both seams and stretching. We


can do this by splitting the asteroid in half, and unwrapping each half
separately - creating only one seam, and causing fairly little
stretching. If you followed the instructions in the "Simple Mapping
Coordinates" section, get rid of that UVW modifier, and go into your
material and disable "Show Map in Viewport". We need to do some
more work first, and a poorly mapped checkerboard texture will just
get in the way.

2) First things
first, we need
to divide the
asteroid in
half. Add an
Edit Mesh
modifier, and
go into Polygon
mode. (Hit F4
to turn on
"Edged Faces")
Change the
selection type
from
"Rectangular
Selection
Region" to
"Fence
Selection
Region". Find a
nice seam
halfway
through your
object, and
select half of
your asteroid,
following as
closely as
possible to the
seam.

3) There, now
half of your
object should
be red. If you
look closer, the
selection will

http://waylon-art.com/tutorial/tutorial_4.html[10/8/2010 5:27:50 AM]


Asteroid Tutorial

follow the
seam pretty
nicely in some
areas, but
you'll need to
touch it up a
little. Before
you begin,
check the
"Ignore
Backfacing"
box - that way,
if you deselect
faces on one
side of the
object, you
won't
accidentally
deselect the
ones on the
other side as
well.

4) Now, go
around the
object,
selecting and
deselecting
groups of faces
so that the
selection
boundary
follows your
seam. (Hold
"ctrl" to add to
the selection,
and "alt" to
remove from
it.)

5) Your seam
should look
nice all the
way around.
To make sure
that you got all
the right faces,
you may want
to hit "delete",

http://waylon-art.com/tutorial/tutorial_4.html[10/8/2010 5:27:50 AM]


Asteroid Tutorial

look to make
sure there
aren't any
stray polygons
floating
around, then
hit undo when
you're sure it
looks good.
When you're
done with that,
change the
material ID for
the selected
faces - it'll
make it a lot
easier to keep
track of the
two halves of
the asteroid
later on. With
a GeoSphere,
the default
material ID is
2, so change it
to 1 for the
selected faces.
Now, we're
just about
ready to add
some UVW
mapping.

Advanced
- There are a
number of
things you can
do at this point
to make
mapping your
asteroid easier.
All of them,
however,
involve
messing with
the geometry -
and at some
later point,
you'll need to
be able to

http://waylon-art.com/tutorial/tutorial_4.html[10/8/2010 5:27:50 AM]


Asteroid Tutorial

revert the
asteroid to the
state it's in
right now,
while keeping
the finalized
UVW
coordinates. A
Morph object
will work
nicely, but for
now, all you
need to do is
make a copy of
the asteroid
and hide it for
later.

- Mapping the object can be easier if you go back and delete some of
your displace modifiers, since craters can mess with your mapping
coordinates. If you have really wacky geometry, you might also want
to add another edit mesh modifier to push and pull some vertices if
there are any real problem areas.

- Adding a
"Spherify"
modifier at this
point will also
improve the
outcome of
your mapping,
and it will help
you find
problem areas
in the mesh.
You can fix
these problems
by going back
and forth with
the
aforementioned
edit mesh
modifier, but
that's not

http://waylon-art.com/tutorial/tutorial_4.html[10/8/2010 5:27:50 AM]


Asteroid Tutorial

usually
necessary.

If you skipped the advanced section: In practice, I usually add a


Spherify modifier, and do a couple other things to the mesh to make
the UVW mapping turn out a little nicer. As a result, in the next few
screenshots, my asteroid looks like a sphere, while yours will still look
like an asteroid. Don't worry, everything works out the same no
matter what your asteroid looks like.

6) At this
point, it's
useful to have
a checkerboard
pattern on the
asteroid. If
you're not sure
how to do this,
follow the
directions in
Step 2 of the
"Simple
Mapping
Coordinates"
section.

7) Add a Mesh
Select
modifier, and
go into Polygon
mode. Your
polygons
should still be
selected, but if
they're not,
just type in the
correct
material ID
(probably 1)
and click
"select".

8) Add a "UVW
Mapping"
modifier. We're
going to go
with "Shrink
Wrap" mode

http://waylon-art.com/tutorial/tutorial_4.html[10/8/2010 5:27:50 AM]


Asteroid Tutorial

for this. Click


"Fit", and
chances are,
the selected
half of your
asteroid will
look pretty
good. (You
may be able to
get better
results by
moving the
mapping gizmo
up and down.
To do this,
click on the
words "UVW
Mapping" in
your modifier
stack, and
move the
gizmo in the z-
axis.)

9) Note: After
the last step,
your mapping
may look kind
of wacky,
depending on…
well, a few
different
things. If your
mapping looks
like the
example, click
on "UVW
Mapping" in
your modifier
stack to go
into gizmo
mode, then
click and then
right-click the
"rotate" tool to
bring up the
"Rotate
Transform
Type-In"
panel. Type in

http://waylon-art.com/tutorial/tutorial_4.html[10/8/2010 5:27:50 AM]


Asteroid Tutorial

"180" for the


y-axis under
"Offset: Local".
This will fix the
messed up
mapping
coordinates. If
your mapping
looked correct
to begin with,
don't worry,
you'll have to
do this step
after you've
mapped the
other half of
your asteroid.

10) Add another mesh select modifier, go into polygon mode, type
the material ID of the other half of the polygons (probably 2), and hit
"Select".

11) Add
another UVW
mapping
modifier. Set it
to shrink wrap.
Hit "fit". If you
skipped step
12 before,
you'll likely
need to do it
now.

Advanced
If you played
with the
geometry of
the asteroid
before, you'll
need to morph
it back to the
correct shape
now. Un-hide

http://waylon-art.com/tutorial/tutorial_4.html[10/8/2010 5:27:50 AM]


Asteroid Tutorial

the earlier
version of the
mesh, go to
the "Create"
panel, and
change from
"Standard
Primitives" to
"Compound
Objects". Make
sure the fully
UVW-mapped
asteroid is
selected, and
click on
"Morph". Then,
click "pick
target" and
click on the
correctly-
shaped
asteroid. Your
asteroid should
now have good
mapping
coordinates
and have the
correct
geometry. (You
can delete the
extra asteroid
now, if you
want.)

12) Yay!
You're almost
done. The last
thing we need
to do is to
make sure
none of the
mapping
coordinates
from the two
halves of the
asteroid are
overlapping.
First, add a
"UVW Xform"
modifier, and

http://waylon-art.com/tutorial/tutorial_4.html[10/8/2010 5:27:50 AM]


Asteroid Tutorial

set the "V Tile"


to 0.5. (This
will effectively
change our
texture map
from a square,
say 256x256,
to a rectangle,
128x256. It's
just a better
use of texture
space for this
object, and
minimizes
stretching.)

13) Now add


an "Unwrap
UVW" modifier,
click on "Edit",
and at the
bottom, where
it says "All
IDs", select
only the
material ID of
the top half of
the asteroid
(probably 1).
Select all the
vertices, and
move them up
and out of the
way -
preferably out
of the box.
Now switch to
the other
material ID (2?
), select all
THOSE
vertices, and
move them to

http://waylon-art.com/tutorial/tutorial_4.html[10/8/2010 5:27:50 AM]


Asteroid Tutorial

the bottom of
the box. Switch
back to "All
IDs", and you
can move and
scale both
halves of the
asteroid so
that they fit
inside the box,
making sure
they don't
overlap.

14) You're done! Get texporter to output the uvw coordinates to an


image (or just hit alt-printscreen while in the "unwrap UVW" modifier,
then paste into Photoshop.) Paint your texture, and voila! A beautiful
asteroid.

Next: Finishing Touches

www.waylon-art.com
waylonbrinck@gmail.com

http://waylon-art.com/tutorial/tutorial_4.html[10/8/2010 5:27:50 AM]


Asteroid Tutorial

Finishing Touches

1) When I created my asteroids, after finishing with the UVW


mapping, I applied a plugin called DirtyReyes from Reyes-
Infografica to the mesh. That gives a nice base to work from
when you're making your texture map. I also used a handy
dandy plugin called TLUnwrap, which, among other things,
can unwrap a DirtyReyes texture to the mapping coordinates
you spent so long setting up. If you use this, when you create
your DirtyReyes material, be sure to set the self-illumination
to 100% or it won't look right. You'll know what I'm talking
about if you play with these plugins for a bit.

2) I'm a big fan of layering all kinds of crazy images in


Photoshop to make a good texture. I won't go into details, but
suffice to say, when I was done, there was a pretty noticeable
seam running around my asteroid. There's a plugin called
Deep Paint 3D, from Right Hemisphere, which is a great tool
for removing seams like these… AND it has a free trial
version! I don't feel like writing a tutorial on it though, so go
figure it out for yourself.

3) I used Max's built-in MultiRez modifier to drop the polygon


count of the asteroid down to something more appropriate for
the game. You may need to do this too, depending on where
you plan to use your asteroid.

-----

I hope you learned something from this tutorial. If you have


any questions, or if anything is particularly unclear, please,
write to me. Also, if you know of an easier way of doing any
of this, I'd REALLY like to hear from you!

- Waylon Brinck

Back to the begninning

www.waylon-art.com
waylonbrinck@gmail.com

http://waylon-art.com/tutorial/tutorial_5.html[10/8/2010 5:28:04 AM]

Anda mungkin juga menyukai