home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d5xx
/
d524
/
tapdemo.lha
/
TAPDemo
/
TAP.DOC
< prev
next >
Wrap
Text File
|
1991-08-05
|
13KB
|
250 lines
TAP - Tumble Axis Processor
Another Sculpt utility by Martin Koistinen - July 1991
***************************************************************************
DEMO USERS:
The DEMO version of TAP has been crippled in that it will not function
on paths with more than 15 nodes. Other than that it should be fully
functional.
***************************************************************************
This program has several functions. One of them is to automatically
align a path's tumble axes so that an object following that path will
always face the direction of travel. On paths that are not confined to a
plane, the object will bank accordingly; if your path does a loop, so will
your object. Spinning objects are incredibly simple to make with TAP.
Another function is to help one create a path for the LOCATION so that
it remains stationary relative to the object following the input path;
TUMBLE AXES considered. (See example below for a more descriptive
explanation of this function.)
Finally, TAP can also be used to produce an easy to read data list
containing the location of each node and the orientation of each of its
tumble axes. This is very handy if you must verify an objects path with
"real-world" data.
EXAMPLE:
Suppose you would like to animate a moving car from its driver's point
of view. Before TAP your options were to either make the LOCAL ORIGIN of
your vehicle in the place where your driver's eye would normally be, which
is very awkward when trying to navigate around corners and such in a way
that looks natural for a car, or try to construct another path for the
LOCATION that travels along side the car passing through the driver's eye.
If you have ever tried the later, you would have noticed that your
resulting animation looked as though your driver's head were bouncing all
over the cab. This is because it is very difficult to make sure that each
node on the LOCATION's path is absolutely still relative to the
corresponding node on the car's path especially if your car needs to make
complex maneuvers. I wrote TAP specifically for this purpose.
TAP does almost everything for you by aligning your car's path's
tumble axes so that your car always faces the direction of travel. TAP
also creates a mathematically perfect curve that, when made into a path, is
exactly where the camera should be relative to your moving vehicle. If you
want the camera to always look in a fixed direction relative to the vehicle
(as in straight over the hood) you may create another curve (path) with TAP
for the TARGET by indicating a position a little bit ahead (relative to the
car's orientation) of the LOCATION path's first node.
If you need your car to "spin out" or "fish tail", one can make a
SPLINE PATH that twists and turns about. After aligning the axes with TAP,
merely straighten your SPLINE PATH out and your TUMBLE AXES will remain as
though they were on the twisted version. This technique can produce some
very complex but natural looking motion. If you then run TAP again on the
straightened SPLINE PATH to make the LOCATION curve, make sure you DO NOT
RE-ALIGN THE PATH, and your camera will remain in a perfect position for
each node.
By using the "Free" option (WB usage) or the default alignment (CLI
usage), TAP can do all of the above for any type of vehicle, especially if
your object needs to bank or lean with the path. The "Flat" option is
useful if you want to animate something that doesn't necessarily "bank" or
"lean" into its turns. It accomplishes this by making sure that the
vertical tumble axis remains just that, vertical.
The "Tangent" alignment algorithm seems to make smoother, less jumpy
motion paths. The default alignment algorithm merely directs the forward
tumble axis toward the next node.
STEP BY STEP INSTRUCTIONS:
1) Create your path Construct your path in Sculpt. This is generally
done by making a curve out of points and edges and using the "DO MAKE PATH"
menu item while your cursor is indicating the beginning of your path-to-be.
If you construct a circular curve, Sculpt will need to know which direction
you prefer your path to start in, this is done by indicating the beginning
of the path with the cursor and having only the next vertex selected
(highlighted). It is important to pay attention to your orientation in the
TRI-VIEW when initially building your path. If you have built your path
and aligned your tumble axes in the wrong TRI-VIEW window, you can rotate
your path to correct its placement but the tumble axes will remain in there
previous orientation.
2) Save Your path Save your path with the "SAVE OBJECT" menu item. If
you intend for TAP to produce a curve script, you must place the cursor at
the appropriate position for your curve to start (relative to the beginning
of your path), before you save. It is a good idea to put a vertex here as
a point of reference. Make sure that you save only your path. TAP will
not make a curve script if the cursor coincides with the beginning of your
path when it was saved. Figure 1 shows the cursor offset before saving the
path.
3) Run TAP Go to the Workbench and double-click TAP's icon. In the
"Input Path" box, put your path's filename. I like to do all of my work
with RAM: but you may have a different preference. If you need your
object to remain vertical throughout your animation, select "Flat" under
"Alignment" otherwise select "Free". If you do not need alignment at all,
select "None". Indicate with the center gadget if you desire your forward
tumble axis to be tangential to the path or to point directly to the next
node.
If you desire a file containing your path's information or a curve
script, indicate so with the "Path Data" or "Curve Script" gadgets and make
sure you that you provide a valid path and filename.
Hit "Perform" when you have selected the appropriate gadgets and
provided valid filename(s). TAP will churn through the math and modify
your path file and/or create the appropriate text file. When finished,
close TAP in the usual manner to conserve valuable ram for Sculpt. If
needed later, TAP will pick up where you left off. (Provided you haven't
deleted your ENV:TAP variable (file)).
4) Re-load your new path Return to Sculpt. I usually erase the old
path by selecting only its vertices and by selecting "ERASE SELECTED
VERTICES" from Sculpts menus. With your cursor in the same location as it
was when you saved your path, load the now modified one by using "LOAD
OBJECT".
If you have created a curve script, load it now (with the cursor still
in its original location) using "LOAD SCRIPT". Sculpt will then take a
moment to construct your new curve. To make this curve a path, indicate
the beginning and use "DO MAKE PATH".
Figures 3 and 4 show the differences between the "Tangent" and
"Direct" algorithms. Notice that they affect both the tumble axes and the
curve constructed by TAP's script.
WORKBENCH USAGE:
Simply double click TAP's icon. Except for the "About", "Perform",
and string gadgets, each gadget, when selected, will give a description of
itself in the "Messages" box. When you have selected the desired options
and provided the correct filenames, click on "Perform". TAP will tell you
when its completed its operation and will await further instruction. When
finished with TAP merely hit the standard Window Close gadget. If you
re-invoke TAP before you reboot, TAP will appear in the same place, with
the same settings you had when you closed it. I implemented this so that
TAP can be closed down to save RAM while remaining as convenient as
possible. This is done via an ENVIRONMENT variable. (See your AmigaDOS
1.3 Manual for more information)
CLI USAGE:
TAP YourPath.scene YourText.file [-a -t -f -d -e]
"YourPath.scene" is the filename of the path saved as an object from
Sculpt. "YourText.file" is the filename you chose for your path data file
or curve script file. The items in brackets are optional.
-a (Align)
This is a flag which tells TAP that you need it to align the tumble
axes. The default algorithm produces paths that make objects always face
the direction of travel. Paths that curve in all 3 dimensions are handled
pretty well making nice flight paths.
-f (Flat)
This tells TAP to restrict the vertical tumble axis so that your
object is ALWAYS perfectly vertical. Very useful for animating people and
things that merely turn to face its path but does not bank or lean into
them.
-t (Tangential)
This is a flag which instructs TAP to use the tangent mode algorithm
when aligning your path's tumble axes. This will point the tumble axes so
that the forward axes point tangentially to the path at each node.
-e (Extrude)
This tells TAP to make a script that makes a curve that when turned
into a path, makes objects following it stationary relative to the path
input to TAP. It does this by "extruding" a single point along your path
while considering the tumble axes. When using this, make sure that your
cursor indicates the proper displacement from the first node of your path
that is appropriate for the curve you desire. It is recommended that you
make a vertex in this location (so you can find it later) but make sure you
save only the actual vertices that make up your path.
-d (Display)
This is a flag which instructs TAP to produce your path's tumble
information. Beware if both -d and -e are set, your output text file will
contain both an extrude script and this information which will cause an
error (and possibly a system crash) if Sculpt tries to interpret it as a
script.
FUTURE PLANS:
I hope to in the future provide other functions and alignment
algorithms. You can practically guarantee this by sending in your
shareware fee. I don't think my wife and child will allow me to spend any
more time on this unless it's bringing in revenue. Some of the features I
hope to add include; processing of path subsets. (ie, align only nodes 10
- 20, etc.), automatic linear and accelerated rotations on any axis, and
spline-like alignment algorithms.
REGISTRATION:
The registered version can be obtained by sending either: $30.00 or
$25.00, a 3.5" diskette and a SASE (with enough postage for the disk and 3
or 4 pages of printed manual with diagrams) to:
Martin Koistinen
1920 Richmond #3
Houston, TX 77098
(713) 522-5227
(Checks and Money Orders must be drawn on a US bank in US monies)
I can also be reached for comments, suggestions, or complaints at:
GEnie - M.KOISTINEN InfoLine BBS (713) 977-0432
OTHER UTILITIES:
I have a few other Sculpt 4D utilities. Here's a list of them with a
short description:
Wrap This program takes an existing Sculpt object and wraps it about a
sphere or cylinder. Has many options including the ability to retain any
relief in the original object on the final one. Great for making planetary
objects with mountains. I use it regularly as an additional "tool" (like
the regular Sculpt plethora of tools.) I have used this to make a very
impressive model of Earth from a map. Version 1.3 Shareware $10.00.
CopyExp This program simply copies the palette and exposure values
from one take to another. Indispensable if you like to break up larger
animations into smaller more-manageable ones. Free upon request with any
other Shareware registration fee.
MakeFakes This program creates "fake" Sculpt image files easily for
use in tricking Sculpt into thinking that frame is already rendered. It
will optionally copy another file to each of the ones it creates. I have
used it very successfully to save MANY HOURS of rendering an animation that
has many frames that are identical. Free upon request with any other
Shareware registration fee.
RenderFrames This is a program designed to help you split up an
animation among 2 or more Amigas for rendering. Make the most of your
rendering time! Free upon request with any other Shareware registration
fee.
OTHER STUFF:
Disclaimer Use of this program is "at your own risk." I cannot be held
liable for any damages, direct or consequential, arising out of the use or
inability to use this product. User assumes all risk and liability
whatsoever in connection therein.
Acknowledgments I would like to thank Tracy Evans, for help with these
documents and general support, Brian McCullough of Byte by Byte, for
technical support, Legal Media Center and Pennbaker Design for use of their
facilities.
Sculpt Animate 4-D (and any abbreviations I've used) is a registered
trademark of Byte by Byte Corporation.