home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Inside Multimedia 1994 October
/
IMM1094.ISO
/
program
/
dta
/
dta.doc
next >
Wrap
Text File
|
1992-08-28
|
12KB
|
361 lines
DTA (Dave's .TGA Animation Program)
Rel 1.7g (04/01/92)
Copyright (c) 1991, 1992 by David K. Mason
DTA is a command-line utility for creating Autodesk Animator .FLI
animation files from:
o .TGA files as created by the POV-Ray and POLYRAY ray-tracers.
o .IMG files as created by the Vivid ray-tracer.
o .PCX files.
o .GIF 87a files.
DTA can also perform a wide range of post-processing functions
on image files including:
o Creating a single optimal 256-color palette from a series of
truecolor pictures, and then creating an Autodesk Animator .FLI
file out of them.
o Saving the palette as a .COL file, readable by either Autodesk
Animator or the TGAFLI animation utility.
o Saving the palette as a .MAP file, readable by the PICLAB and
IMPROCES image processors, and the FRACTINT fractal generator.
o Reading in a palette file in either .COL or .MAP format
and animating a bunch of pictures using that palette.
o Animating a bunch of pictures using grayscale.
o Convert pictures to .GIF files.
o Averaging images together for a variety of effects, including
simulated motion blur.
o And more.
----------------------------------------------------------------------
Syntax:
DTA (filenames) (switches)
----------------------------------------------------------------------
Input Formats:
.TGA Targa 16,24,32 bit compressed/uncompressed.
.GIF GIF (87a format only, NO interlacing).
.PCX PC Paintbrush 256 color PCX images.
.IMG Vivid raytracer 24 bit RLE output.
.LZH LHArc compressed archive containing one of the above.
@afile Process all files listed in a text file "afile".
----------------------------------------------------------------------
Switches:
(Output options)
/FF[name] Create a .FLI animation file. [default]
/FM[name] Create a PICLAB .MAP palette file.
/FC[name] Create an Autodesk Animator .COL palette file.
/FG[name] Create .GIF file[s].
/FT[name] Create new .TGA file[s].
(Targa Output options)
/NC Do NOT compress .TGA file
/B## Number of bits per pixel in TGA ( 16-> 24 <-32 )
(.FLI output options)
/P Play in ping-pong, or pendulum, oscillation order.
/Snnn Specify display speed of animation playback (default=0).
/O+|- Specify forward or backward sort order.
/R[#] Specify resolution:
1 = 320x200 [default]
2 = 320x240
3 = 320x400
4 = 320x480
5 = 360x480
6 = 640x480
7 = N/A
8 = 800X600
9 = N/A
10 = 1024x768
11 = N/A
12 = 1280x1024
/RA Base resolution on the size of the first input
file.
/W Force SVGA-style compression for 320x200 .FLIs.
(Palette options)
/G Use 64-level greyscale instead of a palette.
/G32 Use 32-level greyscale insted of a palette.
/332 Use 3/3/2 palette.
/Upalname Use existing .MAP or .COL file for palette.
/L[R|G|B|A] Set max color resolution (for red,green,blue, or all).
/M# Set maximum internal colors.
/MN Do NOT remap colormapped input.
/PO Force single optimal palette generation even when
creating GIF files.
(Dithering options)
/DF Dither with Floyd-Steinberg filter.
/DS Dither with Sierra-Lite filter.
/DO[1-6] Ordered dither (digit represents dither strength).
/DR# Random noise dither (digit represents dither strength).
(Other options)
/3D Create red/blue 3D picture.
/A[#|A] Average <number> TGAs per output frame (A=All).
/T[#|A] Trail <number> TGAs per output frame (A=All).
/E[#[;#]] First # = weight of first averaged picture.
Second# = amount to increment weight for each
additional picture.
/X[num] eXpand <number>. Create and insert <number> averaged.
frames between each pair of regular frames.
----------------------------------------------------------------------
Revision History:
(see DTA.HST)
----------------------------------------------------------------------
Averaging/Trailing/Expansion modes (/A /T /X switches) examples:
Averaging 5 input pictures with "/A2" option:
Average: To produce:
file 1 frame 1
file 2
file 3 frame 2
file 4
file 5 frame 3
file 1
Trailing 4 input pictures with "/T2" option:
Average: To produce:
file 1 frame 1
file 2
file 2 frame 2
file 3
file 3 frame 3
file 4
file 4 frame 4
file 1
Trailing 5 input pictures with "/T3" option:
Average: To produce:
file 1 frame 1
file 2
file 3
file 2 frame 2
file 3
file 4
file 4 frame 3
file 5
file 1
Expanding 2 input pictures with "/X1" option:
frame 1 = (100% of FILE 1 ) + ( 0% of FILE 2 )
frame 2 = ( 50% of FILE 1 ) + ( 50% of FILE 2 )
frame 3 = ( 0% of FILE 1 ) + (100% of FILE 2 )
Expanding 2 input pictures with /X2" option:
frame 1 = (100% of FILE 1 ) + ( 0% of FILE 2 )
frame 2 = ( 66% of FILE 1 ) + ( 33% of FILE 2 )
frame 3 = ( 33% of FILE 1 ) + ( 66% of FILE 2 )
frame 4 = ( 0% of FILE 1 ) + (100% of FILE 2 )
----------------------------------------------------------------------
Miscellaneous examples:
DTA ROCKET*.TGA /fcROCKET
Make a palette for all .TGA files starting with "ROCKET".
Output the palette to an Animator palette file called "ROCKET.COL".
DTA PIC1 PIC2 PIC3 /fmXYZ
Make a palette for .TGA files "PIC1.TGA", "PIC2.TGA", and "PIC3.TGA"
Output the palette to a PICLAB palette file called "XYZ.MAP".
DTA ROCKET* /ffROCKET /DF
Make input from all .TGA files beginning with "ROCKET".
Output to an animation file called "ROCKET.FLI".
Dither the frames.
DTA ROCKET* /g /do2 /p
Make input from all .TGA files beginning with "ROCKET".
Map colors to grayscale.
Dither, using ordered dither strength 2.
Ping-pong it.
Output to an animation with the default name of "ANIM.FLI"
DTA ROCKET
Make input from ROCKET.TGA.
Output to an animation with the default name of "ANIM.FLI".
DTA @WING2.LST /s10 /ffWING2.FLI
Make input from files listed in a text file called "WING2.LST".
Set playback speed to "10".
Output to an animation with the name of "WING2.FLI".
DTA BBB*.TGA AAA*.TGA /uPAL1.COL /uPAL2.MAP /ffFRED
Make input from all .TGA files whose name begins with "BBB", and "AAA".
NOTE:
The "BBB" files will appear in the animation before the "AAA" files.
The "BBB" files will be sorted alphabetically, and so will the
"AAA" files, but separately.
Read in an Animator palette file called "PAL1.COL", and merge it with
a Piclab palette file called "PAL2.MAP".
Use this combined palette for the animation.
Output to an animation with the name of "FRED.FLI".
DTA /o- XXX*.TGA /o+ ZZZ.LZH /g /s5 /p
Make input from all .TGA files whose name begins with "XXX" ,
sorted in reverse order.
Next, take input from all .TGA files residing in ZZZ.LZH,
sorting the filenames forwards.
Use grayscale palette.
Set playback speed to 5.
Ping-pong the playback order.
Output to an animation with the default filename of "ANIM.FLI"
DTA *.TGA /GIF
Make .GIFs from all .TGAs in the current directory.
DTA SOMBRERO /fg /d /g
Make a dithered grayscale .GIF from a file called SOMBRERO.TGA.
DTA LEFT*.TGA RGHT*.TGA /3d
Make a red/blue 3D .FLI file .
Use the .TGA files beginning with "LEFT" as the red component
And the ones beginning with "RGHT" as the blue component.
NOTE: For this to work right, there must be an equal number of
"LEFT" and "RGHT" .TGAs.
Output to an animation with the default filename of "ANIM.FLI"
DTA XXX* /ftYY /aA
Make input from .TGAs beginning with "XXX".
Average all files.
Output to a new Targa file called "YY.TGA".
NOTE: averaging will work with up to 10 files, but no more.)
DTA XXX*.TGA /t3 /do3 /ffZZZ
Make input from all .TGA files beginning with "XXX"
Trail 3 frames.
Use ordered dithering, strength 3.
Output an animation called "ZZZ.FLI"
DTA XXX*.TGA /x3
Make input from all .TGA files beginning with "XXX"
Expand 3. Assuming 5 .TGA input files, this would create a 15 frame
animation.
Output an animation called "ANIM.FLI"
DTA *.GIF
Creates a file called ANIM.FLI from all .GIF files in the current
directory.
----------------------------------------------------------------------
Speed concerns:
DTA is fastest when you use grayscale instead of a palette.
even if you dither.
If you let DTA generate its own palette, DTA is still
relatively speedy. It gets (lots) slower if you dither.
If you create an animation from .TGA files stored in an .LZH
file, then DTA is REAL slow, because it takes time to shell
out to the LHA program.
If you're creating a 640x480 .FLI, then DTA requires about 614K
of memory just to store the pictures that it's comparing.
Since PCs just don't have that kind of memory lying around,
DTA will put it in EMS (expanded memory) if you have it, or
XMS (extended memory) if you have that, or in virtual memory
(paging to disk) if you don't.
EMS and XMS are LOTS faster than virtual memory.
If you average multiple files, that's going to slow things down.
----------------------------------------------------------------------
Credits:
To create palettes and select colors from palettes, this
program uses an algorithm that I found in an article called "A
Simple Method for Color Quantization: Octree Quantization," by
Michael Gervautz and Werner Purgathofer, which can be found in
a book called "Graphics Gems," edited by Andrew S. Glassner. I
recommend this book highly.
The .FLI file format was explained in a document called
FLIDOC.TXT from Jim Kent's FLILIB. I wasn't able to use this C
library in DTA, since I do my coding in Turbo Pascal, but the
document contained all the info I needed. (Jim Kent is also
the guy who, with Tom Hudson, wrote TGAFLI, and who developed
Animator and Animator Pro.)
More thanks to Jim Kent for his info about 640x480 .FLIs on
BIX.
The ram/ems/virtual memory system in DTA is a modified
version of the large array object (OPLARRAY) from TurboPower
Software's object library for Turbo Pascal, Object Professional.
(OPRO is a MUST for TP programmers, and I hear a C++ version
has been or will soon be released.)
Thanks to Dan Farmer, Alexander Enzmann, Jeff Bowermaster,
and others for their excellent suggestions.
Thanks to Dan Farmer for sprucing up this documentation
file.
Thanks to the Cafe Pamplona in Harvard Square for being such
a cool place to swill arabic coffee and discuss ray-tracing
and animation.
----------------------------------------------------------------------
Disclaimer:
If you use DTA, you do so at your own risk. I won't be held
responsible if it screws anything up.
----------------------------------------------------------------------
Support:
If you've got any requests/bug reports/suggestions, send a message
to:
"David Mason" on the "You Can Call Me Ray" BBS, (708) 358-5611
and on "The Graphics Alternative", (510) 524-2780
and on "Channel 1" BBS, (617) 354-8873
"76546,1321" on Compuserve (sometimes)
You'll probably get some kind of a response.
----------------------------------------------------------------------
Money matters:
If you think this program is worth it, send some money or
some computer hardware or something to:
David K. Mason
P.O. Box 181015
Boston, MA 02118