Introduction to Swift 3D - Page 13
August 24, 2001
It is no surprise that Swift 3D is very popular among Flash
developers. It uses a familiar concept of timeline-based
animation with keyframes and tweening, plus a few function-curve-
style options for customizing the characteristics of keyframes.
It offers superslick output for geometric solids and very good
flat-color output for organically shaped models. Another great
feature is the interface: it is designed to get work done. In a
very short time from when I first installed Swift 3D, I felt
comfortable performing every operation. The tools seem to be
designed to require a minimum of interruptions to go to toolbars
or menus. Finally, and not least of all, it is in such a price
range that you might pick it up on an impulse while browsing your
local office supply store on your lunch break. If you want to
move models around, do some simple animation in an easy-to-learn
and use environment, Swift is a good choice.
We are going to look at Swift 3D in the context of a project, the
end result of which you can see in spaceship.swf. We are
going to take the spaceship model we made in Strata and bring it
into Swift 3D to animate it. Take a look at the finished movie to
get an idea of what we are building.
NOTE: Strata has a complete animation toolset built
in — even in the free version. We are importing models into Swift
3D because, at present, there aren't many 3D packages that have
tools for models and animation, plus support plug-ins that will
generate 3D output. The packages that do have these features are
much more expensive than the tools covered in this chapter. You
will know when you need them.
Conversion
The first thing you will have to do in order to animate your
spaceship is to find a common file format between Strata and
Swift 3D. Unfortunately, Swift 3D only supports incoming 3DS
models, and Strata won't write to that format. The first bit of
good news is that Strata can save your models in the DXF
format, which is one of the most common media of exchange in the
3D world. The other good news is that there is no shortage of
applications that will translate between these formats without
losing any information that will matter to us for this type of
project.
Find a conversion utility and use it to translate your DXF
spaceship model (exported from Strata) into a 3DS model. If you
already own any 3D applications, it is entirely likely that they
can perform this chore for you. These are both very common file
formats.
Materials
When you create a new Swift 3D movie from an existing 3DS model
without any material (color) information, you will get the
default gray color for the entire model. I still want to use a
gray to start with, but a gray that better fits my conception of
a Hollywood spaceship. Figure 20-16 shows the cursor dragging a
material from the materials palette directly onto the spaceship.
If you exported your entire spaceship as one DXF and converted it
automatically to a 3DS, you will not be able to ungroup the
pieces of the spaceship to apply different colors to different
parts. Fixing this is easy. You can either export your model from
Strata one piece at a time or use modeling software that supports
every aspect of 3DS.
Transformation, Selection, and Viewing
When I opened my version of the spaceship — possibly because of
the conversion utility I used — the orientation of the model was
off by 90 degrees. If you used my sample files to apply a
material to the space ship, or if the tools you are using for
conversion produce similar results, you may have noticed that
when the viewport says "Top-Active," you are really looking at
the front of the spaceship. This is a good opportunity to get
acquainted with the viewing, selection, and transformation tools
in Swift 3D.
Figure 20.16 The spaceship going
to the body shop
|
First things first: split the active viewport by either selecting
View | Secondary Camera or by clicking on the little tool icon
with two cameras in the main toolbar across the top of the
screen. Some 3D applications make me literally claustrophobic,
and the default view of Swift 3D is one of them. If you have
multiple monitors, the best arrangement seems to be to undock the
property tools palette and put it on another monitor. At this
point, your two viewports should be nice and big. Notice that
when you mouse-over any tool button in Swift 3D, you get a pretty
good tooltip. Most of them say exactly what they do (as opposed
to cryptic, mumbo-jumbo names).
The viewports work a little bit differently in Swift 3D than they
do in Strata. Try clicking on an area in either viewport away
from the model, and drag. The default action of the mouse in a
viewport is to pan. That's a nice feature, and a good indication
that ease of use was probably one of the top considerations when
Swift 3D was designed.
The other built-in view feature works when you drag up and down
with the right mouse button: you zoom in and out. These two
features make changing your view to suit your moment-to-moment
needs practically subconscious.
The basic nature of the viewports in Swift 3D is a little
different from most 3D packages. In Strata, for instance, when
you build an animation, you drop an actual camera into your
scene, complete with all the controls that a real-world camera
has. You can follow what the camera is seeing by opening a
separate window for it and then toggle back to the regular
viewports to move your objects around your scene in a familiar
environment.
In Swift 3D, the viewports are the cameras, and vice versa. There
are two main areas of impact where this is concerned. First, it
is easier to keep track of simple animations, because you know
exactly what you are getting. The second way this affects you is
that you have to be very careful when you animate cameras. This
is because you only get one camera to capture your animation. If
you get creative, you can animate a standard view (top, bottom,
etc.) and use it as a secondary camera, but then you lose your
ability to view and select in that view.
Selecting and moving objects is also very easy. The first time
you click in a viewport, you are activating that viewport. The
next time you click, you are selecting the object you click on,
or panning the viewport, depending on where you click.
Rotation is handled with Swift 3D's 100 percent unique
transformation tools, which they call Crystal Trackball. The next
step in the project is to correct the position of the spaceship,
so that front is front and top is top. Select the spaceship in
the front viewport and go to the rotation trackball. You can
constrain the rotation of objects to a number of increments,
which is especially handy if you are getting started with 3D
concepts, have a small monitor or low resolution, or just have
jittery hands. Click once on the constrain angle button to get
the flyout menu as shown next and click on 90 Degrees.
Next select the arrow that points up and down (above the
constrain angle button). Pull the trackball down until it snaps
90 degrees. You should now have an orientation you can work with.
Finally, scaling follows the same concept as the easy zoom
control: dragging toward the center of the object scales down,
and dragging away from the center scales up. To enter scaling
mode, select Edit | Scaling Mode or just click on the scaling
mode button on the main toolbar. Following the guiding principle
of ease of use and quick workflow that pervades Swift 3D, scaling
mode automatically exits to the default move tool after every
time you scale an object.
Meta Ball - Page 12
Macromedia Flash 5 Developer's Guide
Animation in Swift 3D - Page 14
|