home *** CD-ROM | disk | FTP | other *** search
/ TopWare 18: Liquid / Image.iso / liquid / top1088 / dta.doc < prev    next >
Text File  |  1994-01-18  |  20KB  |  572 lines

  1.                    DTA (Dave's .TGA Animation Program)
  2.                           Rel 2.0.7 (09/30/93)
  3.           Copyright (c) 1991, 1992, 1993, 1994 by David K. Mason
  4.  
  5.   DTA is a command-line utility for creating Autodesk Animator .FLI
  6.   and .FLC animation files from:
  7.  
  8.   o .TGA files as created by the POV-Ray and POLYRAY ray-tracers.
  9.   o .IMG files as created by the Vivid ray-tracer.
  10.   o .PCX files.
  11.   o .DIB or .BMP files
  12.   o .GIF files.
  13.   o Other .FLI or .FLC files.
  14.   o VistaPro .VAN animation files
  15.   o Presidio .ANI animation files
  16.  
  17.   DTA can also perform a wide range of post-processing functions
  18.   on image files including:
  19.  
  20.   o Creating a single optimal 256-color palette from a series of
  21.     truecolor pictures, and then creating an Autodesk Animator .FLI
  22.     file out of them.
  23.   o Saving the palette as a .MAP (PICLAB, FRACTINT) or .COL
  24.     (Autodesk Animator) palete file.
  25.   o Convert pictures to .GIF, .TGA, .PCX, .BMP graycale .TIF
  26.     still image files.
  27.   o Reading in a palette file in either .COL or .MAP format
  28.     and animating a bunch of pictures using that palette.
  29.   o Arbitrary rotation.
  30.   o Scaling.
  31.   o Multi-layer compositing.
  32.   o Averaging images together for a variety of effects, including
  33.     simulated motion blur and red/blue 3D.
  34.   o And more.
  35. ----------------------------------------------------------------------
  36. **** IF YOU ARE HAVING MEMORY PROBLEMS WITH DTA, READ THIS ****
  37.  
  38. Real mode vs. Protected mode:
  39.  
  40.   DTA used to come in two varieties: a real mode version and
  41.   a protected mode version.  From now on there's only a
  42.   protected mode version.  There's no more DTAX.EXE.
  43.  
  44.   DTA will let you access up to 16MB of extended memory (either raw
  45.   or configured as XMS with HIMEM.SYS or QEMM386.SYS or whatever).
  46.   It requires at least 1 or 2 MB of RAM to run at all.
  47.  
  48.   Don't delete the files DPMI16BI.OVL, RTM.EXE, and DPMIINST.EXE.
  49.   These make up the protected mode drivers for Borland Pascal 7.0
  50.   (the compiler used to build DTA).  DTA won't run without them.
  51.  
  52. ----------------------------------------------------------------------
  53. The Rules:
  54.  
  55.   Feel free to re-upload this program to other bulletin board
  56.   systems in its *original, unmodified* form.  You may not
  57.   repackage it with other programs.  You may not repackage it with
  58.   your own tutorial.  I feel like an idiot having to make these
  59.   demands, but I've been finding archives on BBSs going by
  60.   names like MORPHPAK.ZIP which are collections of DTA, my other
  61.   program DMorf, sometimes also Richard Godoeken's program
  62.   RMORPH, plus Trilobyte's PLAY.  That's not kosher.  I and those
  63.   other folks distributed our programs the way we did for
  64.   reasons.
  65.     Do not include this program on a disk along with any magazine,
  66.   book, hardware product, or other software product without my
  67.   permission.
  68.     If you place this program on an Internet FTP site, please drop
  69.   me a note (76546.1321@compuserve.com) so I'll know how to answer
  70.   when people ask me "Where can I find DTA on the net?"
  71.  
  72. ----------------------------------------------------------------------
  73. Money matters:
  74.  
  75.   DTA is a shareware program.  If you think this program is worth
  76.   it, send some money or some computer hardware or something to:
  77.  
  78.     David K. Mason
  79.     P.O. Box 181015
  80.     Boston, MA 02118
  81.  
  82.   I think $35 is an appropriate amount, but feel free to send more
  83.   or less.
  84.  
  85. ----------------------------------------------------------------------
  86. Blatant shameless plugs:
  87.  
  88.   For more information on using DTA and related programs,
  89.   see my books:
  90.     "Making Movies on Your PC" (by David K. Mason and Alexander
  91.   Enzmann, Waite Group Press, $34.95 USA, ISBN 1-878739-41-7)
  92.   covers the creation of 3D animation sequences using Polyray
  93.   and DTA.  The DTA reference info is up to date through
  94.   release 1.8g.
  95.     "Morphing on Your PC" (by David K. Mason, Waite Group Press,
  96.   $29.95 USA, ISBN 1-878739-53-0) covers building animated
  97.   morph sequences with DMorf and DTA.  The DTA reference info
  98.   is up to date through release 2.0.
  99.  
  100. ----------------------------------------------------------------------
  101. Syntax:
  102.  
  103.   DTA (filenames) (switches)
  104.  
  105. ----------------------------------------------------------------------
  106. Input Formats:
  107.  
  108.   .TGA        Targa 16-,24-,32-bit compressed/uncompressed,
  109.               or 8-bit grayscale uncompressed.
  110.   .GIF        GIF (87a or 89a, but NO interlacing).
  111.   .PCX        PC Paintbrush 256-color or 24-bit PCX images.
  112.   .DIB/.BMP   Microsoft Windows device-independent bitmap files.
  113.   .IMG        Vivid raytracer 24-bit RLE output.
  114.   .FLI and
  115.   .FLC        Autodesk Animator/Animator Pro animation files.
  116.   .VAN        VRLI VistaPro 256-color animation files.
  117.   .ANI        Presidio PC Animate Plus animation files.
  118.   .RLE        MindImage 2 SIRDS run-length encoded depth
  119.               files.
  120.  
  121.   .LZH        LHArc compressed archive containing files in the above
  122.               picture formats.
  123.   .ZIP        PKZIP compressed archive containing files in the above
  124.               picture formats.
  125.   .ARJ        ARJ compressed archive containing files in the above
  126.               picture formats.
  127.  
  128.   @script     Process all files listed in a text file called
  129.               "script.SCR".
  130. ----------------------------------------------------------------------
  131. Switches:
  132.  
  133. (This list isn't complete... type "DTA" with no parameters for
  134. a more recent list.  That list might be missing a few, too, so
  135. check WHATSNEW.DTA)
  136.  
  137. (Output options)
  138.  
  139.   /O[name]    Specify an output filename.
  140.  
  141.   (default)   Create a .FLI animation file.
  142.  
  143.   /FB         Create .BMP files.
  144.   /FC         Create an Autodesk Animator .COL palette file.
  145.   /FD         Create .DIB files.
  146.   /FG         Create .GIF files.
  147.   /FI         Create grayscale TIFF files.
  148.   /FM         Create a PICLAB .MAP palette file.
  149.   /FP         Create .PCX files.
  150.   /FR         Create MindImage2 .RLE depth files.
  151.   /FT         Create .TGA files.
  152.   /FV         Create .VAN animation file.
  153.  
  154. (Misc Output options)
  155.  
  156.   /B##        Number of bits per pixel in TGA ( 8/16/*24/32 ),
  157.               or FLIC (*8/16/24), BMP/DIB (8/*24), and PCX (*8/24)
  158.               files.
  159.  
  160. (.TGA Output options)
  161.  
  162.   /NC         Do NOT compress .TGA files.
  163.   /BU         Create bottom-up .TGA files, not top-down.
  164.  
  165. (.FLI output options)
  166.  
  167.   /P           Play in ping-pong, or pendulum, oscillation order.
  168.   /Snnn        Specify display speed of animation playback (default=0).
  169.  
  170. (output resolution)
  171.  
  172.   (default)    Base resolution on the size of the first input file.
  173.   /R[#]        Specify resolution:
  174.                  1 = 320x200
  175.                  2 = 320x240
  176.                  3 = 320x400
  177.                  4 = 320x480
  178.                  5 = 360x480
  179.                  6 = 640x480
  180.                  7 = N/A
  181.                  8 = 800X600
  182.                  9 = N/A
  183.                 10 = 1024x768
  184.                 11 = N/A
  185.                 12 = 1280x1024
  186.   /R#,#        Specify exact resolution.
  187.  
  188. (Palette options)
  189.  
  190.   /G           Use 64-level greyscale instead of a palette.
  191.   /G32         Use 32-level greyscale instead of a palette.
  192.   /332         Use 3/3/2 palette.
  193.   /Upalname    Use existing .MAP or .COL file for palette.
  194.   /M#          Set maximum internal colors.
  195.   /MN          Do NOT remap colormapped input.
  196.   /PO          Force single optimal palette generation even when
  197.                creating GIF files.
  198.   /C#          Scan only one frame per # for palette.
  199.  
  200. (Dithering options)
  201.  
  202.   /DF          Dither with Floyd-Steinberg filter.
  203.   /DS          Dither with Sierra-Lite filter.
  204.   /DO[1-6]     Ordered dither  (digit represents dither strength).
  205.   /DR#         Random noise dither (digit represents dither strength).
  206.  
  207. (Other options)
  208.  
  209.   /L           Separates output layers.  Picture files specified
  210.                in later layers get overlayed on top of previous
  211.                layers.  If the overlayed pictures contain transparency
  212.                informations (32-bit TGA files only), then the
  213.                pictures underneath will show through.
  214.   /K#          Use only one frame per # picture files.  Skip the rest.
  215.   /A[#|A]      Average <number> TGAs per output frame (A=All).
  216.   /T[#|A]      Trail   <number> TGAs per output frame (A=All).
  217.   /X[num]      eXpand <number>. Create and insert <number> averaged.
  218.                frames between each pair of regular frames.
  219.   /GA#         Gamma-correct picture.  Try specifying a number
  220.                between 1.0 and 2.0 to brighten, between 0.5 and
  221.                1.0 to darken.
  222.   /SC[#,#]     Rescale pictures to screen resolution.
  223.   /CL[#,#,#,#] Clip the input picture.  The first two numbers
  224.                specify the top-left, and the other two numbers
  225.                control the width and depth.
  226.   /CK#,#,#     Chroma-key, to make all occurrences of a color
  227.                transparent for compositing.  The three numbers
  228.                represent the red,green, and blue components
  229.                of the key color.
  230.   /CT#         Chroma-key tolerance.  Specifies how close to the
  231.                key color a pixel has to be to make it transparent.
  232.  
  233. ----------------------------------------------------------------------
  234. Scripts:
  235.  
  236.   As I mentioned earlier, you tell DTA to process all the files
  237.   listed in a text file by specifying the name of the text file
  238.   preceded by a "@".
  239.     A script file can contain as many file specifications
  240.   as you want.  It can also contain any of the above-mentioned
  241.   switches.  Each must be on a line of its own.
  242.     Here's an example script called test.scr:
  243.  
  244.      back.tga
  245.      /l
  246.      *.tga
  247.      /a2
  248.      /sc640,480
  249.      /l
  250.      signat.gif
  251.      /lr
  252.      /lb
  253.      /fo2
  254.  
  255.     Typing "dta @test" in this case would cause DTA to perform
  256.   exactly the same as if you instead typed:
  257.  
  258.      dta back.gif /l *.tga /a2 /sc640,480 /l signat.gif /lr /lb /fo2
  259.  
  260.     Scripts can come in handy if
  261.  
  262.     (a) your command is just getting too darn long and
  263.   complicated to fit on a DOS command line.  A script can
  264.   be as long as you want.
  265.     (b) you have to use the same command over and over
  266.   again.  Why remember all that stuff or use a crib sheet
  267.   when you can just put it all in a script just once
  268.   and then use it over and over.
  269.  
  270.     You can also use a script in addition to other filenames
  271.   and switches:
  272.  
  273.     Say you had a script file called whirl.scr that looked like
  274.   this:
  275.  
  276.      /l
  277.      logo.gif
  278.      /rot0,0
  279.      /rot360,100
  280.      /ch0,0,0
  281.      /loc400,350
  282.  
  283.     then instead of typing
  284.  
  285.      dta x*.tga /l logo.gif /rot0,0 /rot360,100 /ch0,0,0 /loc400,350
  286.  
  287.     you could just type:
  288.  
  289.      dta x*.tga @whirl
  290.  
  291. ----------------------------------------------------------------------
  292. Revision History:
  293.  
  294.   (see WHATSNEW.DTA)
  295.  
  296. ----------------------------------------------------------------------
  297. Averaging/Trailing/Expansion modes (/A /T /X switches) examples:
  298.  
  299.   Averaging 5 input pictures with "/A2" option:
  300.  
  301.     Average:    To produce:
  302.  
  303.     file 1      frame 1
  304.     file 2
  305.  
  306.     file 3      frame 2
  307.     file 4
  308.  
  309.     file 5      frame 3
  310.     file 1
  311.  
  312.   Trailing 4 input pictures with "/T2" option:
  313.  
  314.     Average:    To produce:
  315.  
  316.     file 1      frame 1
  317.     file 2
  318.  
  319.     file 2      frame 2
  320.     file 3
  321.  
  322.     file 3      frame 3
  323.     file 4
  324.  
  325.     file 4     frame 4
  326.     file 1
  327.  
  328.   Trailing 5 input pictures with "/T3" option:
  329.  
  330.     Average:    To produce:
  331.  
  332.     file 1      frame 1
  333.     file 2
  334.     file 3
  335.  
  336.     file 2      frame 2
  337.     file 3
  338.     file 4
  339.  
  340.     file 3      frame 3
  341.     file 4
  342.     file 1
  343.  
  344.     file 4      frame 4
  345.     file 5
  346.     file 1
  347.  
  348.     file 5      frame 5
  349.     file 1
  350.     file 2
  351.  
  352.   Expanding 2 input pictures with "/X1" option:
  353.  
  354.     frame 1 =  (100% of FILE 1  ) + (  0% of FILE 2  )
  355.     frame 2 =  ( 50% of FILE 1  ) + ( 50% of FILE 2  )
  356.     frame 3 =  (  0% of FILE 1  ) + (100% of FILE 2  )
  357.  
  358.   Expanding 2 input pictures with /X2" option:
  359.  
  360.     frame 1 =  (100% of FILE 1  ) + (  0% of FILE 2  )
  361.     frame 2 =  ( 66% of FILE 1  ) + ( 33% of FILE 2  )
  362.     frame 3 =  ( 33% of FILE 1  ) + ( 66% of FILE 2  )
  363.     frame 4 =  (  0% of FILE 1  ) + (100% of FILE 2  )
  364.  
  365. ----------------------------------------------------------------------
  366. Miscellaneous examples:
  367.  
  368. DTA ROCKET*.TGA /FC /OROCKET
  369.  
  370. Make a palette for all .TGA files starting with "ROCKET".
  371. Output the palette to an Animator palette file called "ROCKET.COL".
  372.  
  373. DTA SKY.GIF /L BEFORE.TGA MORF*.TGA AFTER.TGA
  374.  
  375. Build a multilayer flic.  SKY.GIF gets put in the background, and
  376. the pictures FIRST.TGA, a bunch of TGAs beginning with the string
  377. MORF, and LAST.TGA get superimposed over it.  SKY.GIF shows through
  378. any parts of the other pictures which are transparent.
  379.  
  380. This example assumes that the pictures BEFORE.TGA and AFTER.TGA
  381. had transparency added to them with my other program, DMorf
  382. (Rel. 1.1 or higher), and that the MORF*.TGA files are morphed
  383. pictures built with DMorf.
  384.  
  385. DTA PIC1 PIC2 PIC3 /FM /OXYZ
  386.  
  387. Make a palette for .TGA files "PIC1.TGA", "PIC2.TGA", and "PIC3.TGA"
  388. Output the palette to a PICLAB palette file called "XYZ.MAP".
  389.  
  390. DTA ROCKET* /OROCKET /DF
  391.  
  392. Make input from all .TGA files beginning with "ROCKET".
  393. Output to an animation file called "ROCKET.FLI".
  394. Dither the frames.
  395.  
  396. DTA ROCKET* /G /DO2 /P
  397.  
  398. Make input from all .TGA files beginning with "ROCKET".
  399. Map colors to grayscale.
  400. Dither, using ordered dither strength 2.
  401. Ping-pong it.
  402. Output to an animation with the default name of "ANIM.FLI"
  403.  
  404. DTA ROCKET
  405.  
  406. Make input from ROCKET.TGA.
  407. Output to an animation with the default name of "ANIM.FLI".
  408.  
  409. DTA @WING2.LST /S10 /OWING2.FLI
  410.  
  411. Make input from files listed in a text file called "WING2.LST".
  412. Set playback speed to "10".
  413. Output to an animation with the name of "WING2.FLI".
  414.  
  415. DTA BBB*.TGA AAA*.TGA /UPAL1.COL /UPAL2.MAP /OFRED
  416.  
  417. Make input from all .TGA files whose name begins with "BBB", and "AAA".
  418. NOTE:
  419.     The "BBB" files will appear in the animation before the "AAA" files.
  420.     The "BBB" files will be sorted alphabetically, and so will the
  421.     "AAA" files, but separately.
  422. Read in an Animator palette file called "PAL1.COL", and merge it with
  423.     a Piclab palette file called "PAL2.MAP".
  424.     Use this combined palette for the animation.
  425. Output to an animation with the name of "FRED.FLI".
  426.  
  427. DTA *.TGA /FG
  428.  
  429. Make .GIFs from all .TGAs in the current directory.
  430.  
  431. DTA SOMBRERO /FG /DR2 /G
  432.  
  433. Make a dithered grayscale .GIF from a file called SOMBRERO.TGA.
  434.  
  435. DTA LEFT*.TGA RGHT*.TGA /3D
  436.  
  437. Make a red/blue 3D .FLI file .
  438. Use the .TGA files beginning with "LEFT" as the red component
  439. And the ones beginning with "RGHT" as the blue component.
  440. NOTE: For this to work right, there must be an equal number of
  441.    "LEFT" and "RGHT" .TGAs.
  442. Output to an animation with the default filename of "ANIM.FLI"
  443.  
  444. DTA XXX* /FTYY /AA
  445.  
  446. Make input from .TGAs beginning with "XXX".
  447. Average all files.
  448. Output to a new Targa file called "YY.TGA".
  449. NOTE: averaging will work with up to 10 files, but no more.
  450.  
  451. DTA XXX*.TGA /T3 /DO3 /OZZZ
  452.  
  453. Make input from all .TGA files beginning with "XXX"
  454. Trail 3 frames.
  455. Use ordered dithering, strength 3.
  456. Output an animation called "ZZZ.FLI"
  457.  
  458. DTA XXX*.TGA /X3
  459.  
  460. Make input from all .TGA files beginning with "XXX"
  461. Expand 3.  Assuming 5 .TGA input files, this would create a 15 frame
  462. animation.
  463. Output an animation called "ANIM.FLI"
  464.  
  465. DTA *.GIF
  466.  
  467. Creates a file called ANIM.FLI or ANIM.FLC from all .GIF files in the
  468. current directory.  (The extension depends on the resolution of the
  469. first picture.  If it's 320 by 200, then DTA will create a .FLI
  470. file.  Otherwise, it'll create a .FLC.
  471.  
  472. DTA *.TGA /K2 /C2
  473.  
  474. Assuming 60 .TGA files, create a flic containing only 30 frames.
  475. Generate the palette from only 15 frames.
  476.  
  477. DTA *.GIF /R320,200 /SC
  478.  
  479. Create a flic from a bunch of GIF files, set the screen size
  480. to 320 by 200, and rescale all the images to the screen size.
  481.  
  482. DTA *.TGA /R6 /SC320,240
  483.  
  484. Create a 640x480 FLC file from a bunch of TGA files.  Rescale each
  485. picture so that the width is depth is 240, but leave the width alone.
  486. This one is useful when you want to turn a bunch of 320x200
  487. pictures into a 640x480 flic... because 320x200 screens use a
  488. different aspect ratio than 640x480.  320x200 pictures look a
  489. bit squat when you display them in 640x480 mode, but 320x240 looks
  490. correct.
  491.  
  492. DTA FLIC1.FLI FLIC2.FLI /OFLIC3
  493.  
  494. Create a new flic by appending two existing flics.  Unlike my old
  495. FLAP program, DTA will create a new palette.
  496.  
  497. DTA FLIC.FLI /FG /NM
  498.  
  499. Create GIF files from the frames in FLIC.FLI.  The /NM tells DTA
  500. *not* to generate an optimized palette.  That would be a waste of
  501. time, since a FLIC file usually contains an optimized palette.
  502.  
  503. ----------------------------------------------------------------------
  504. Speed concerns:
  505.  
  506.   DTA is fastest when you use grayscale instead of a palette.
  507.  
  508.   If you let DTA generate its own palette, DTA is still
  509.   relatively speedy.  It gets (lots) slower if you dither.
  510.  
  511.   If you create an animation from .TGA files stored in an
  512.   archive file (.LZH, .ZIP, .ARJ), then DTA is REAL slow, because
  513.   it takes time to shell out to the de-archiving program.
  514.   ZIP files compress the least, but PKUNZIP is the fastest
  515.   dearchiver.  ARJ files compress really well, but the dearchiver
  516.   is the slowest.  LZH files compress well, but not as well as
  517.   ARJ, and LHA's speed is somewhere between ARJ and PKUNZIP.
  518.  
  519.   If you average multiple files or rescale pictures, that is going
  520.   to slow things down.
  521.  
  522. ----------------------------------------------------------------------
  523. Credits:
  524.  
  525.   To create palettes and select colors from palettes, this
  526.   program uses an algorithm that I found in an article called "A
  527.   Simple Method for Color Quantization:  Octree Quantization," by
  528.   Michael Gervautz and Werner Purgathofer, which can be found in
  529.   a book called "Graphics Gems," edited by Andrew S. Glassner.  I
  530.   recommend this book highly.
  531.  
  532.   The .FLI file format was explained in a document called
  533.   FLIDOC.TXT from Jim Kent's FLILIB.  I wasn't able to use this C
  534.   library in DTA, since I do my coding in Pascal, but the
  535.   document contained all the info I needed.  (Jim Kent is also
  536.   the guy who, with Tom Hudson, wrote TGAFLI, and who developed
  537.   Animator and Animator Pro.)
  538.  
  539.   More thanks to Jim Kent for his info about 640x480 .FLIs on
  540.   BIX.
  541.  
  542.   Thanks to Dan Farmer, Alexander Enzmann, Jeff Bowermaster,
  543.   and others for their excellent suggestions.
  544.  
  545.   Thanks to Dan Farmer for sprucing up this documentation
  546.   file.
  547.  
  548.   Thanks to Tim Wegner for talking me into finally adding GIF89a
  549.   input.
  550.  
  551.   Thanks to the Cafe Pamplona in Harvard Square for being such
  552.   a cool place to swill coffee and discuss ray-tracing and animation.
  553.  
  554. ----------------------------------------------------------------------
  555. Disclaimer:
  556.  
  557.   If you use DTA, you do so at your own risk.  I won't be held
  558.   responsible if it screws anything up.
  559.  
  560. ----------------------------------------------------------------------
  561. Support:
  562.  
  563.   If you've got any requests/bug reports/suggestions, send a message
  564.   to:
  565.     "David Mason" on the "You Can Call Me Ray" BBS, (708) 358-5611,
  566.     and on "The Graphics Alternative", (510) 524-2780,
  567.     and on "Channel 1" BBS, (617) 354-8873.
  568.     "76546,1321" on Compuserve.
  569.  
  570.   You'll probably get some kind of a response (maybe sooner, maybe
  571.   later)
  572.