home *** CD-ROM | disk | FTP | other *** search
/ C++ Games Programming / CPPGAMES.ISO / dta / dta.doc < prev    next >
Text File  |  1994-10-12  |  30KB  |  795 lines

  1.                    DTA (Dave's .TGA Animation Program)
  2.                          Rel 2.2 beta (10/12/94)
  3.           Copyright (c) 1991, 1992, 1993, 1994 by David K. Mason
  4.  
  5. ---------------------------------------------------------------------
  6.  Note:  This doc is not completely up-to-date.  For more recent info,
  7.         see WHATSNEW.DTA.
  8.           The software is beta-level.  I've made a lot of
  9.         internal changes since 2.1, and haven't finished testing.
  10.         If you find problems, please notify me by Compuserve
  11.         email to my id "76546,1321".  (From internet, that's
  12.         "76546.1321@compuserve.com".  I do have other ids that
  13.         I use for ftp-ing and newsgroup access, but I prefer to
  14.         receive all my email at Compuserve.)
  15.           Updates will be available in Compuserve's GRAPHDEV
  16.         forum, in the animation library, on the TGA and Channel 1
  17.         bulletin boards, and on the povray.org ftp site.
  18.         They'll probably show up elsewhere, but those are the
  19.         places that I'll make sure of myself.
  20. ---------------------------------------------------------------------
  21.  
  22.   DTA is a command-line utility for creating Autodesk Animator .FLI
  23.   and .FLC animation files from:
  24.  
  25.   o .TGA files as created by the POV-Ray and POLYRAY ray-tracers.
  26.   o .IMG files as created by the Vivid ray-tracer.
  27.   o .PCX files.
  28.   o .DIB or .BMP files
  29.   o .GIF files.
  30.   o Other .FLI or .FLC files.
  31.   o VistaPro .VAN animation files
  32.   o Presidio .ANI animation files
  33.  
  34.   DTA can also perform a wide range of post-processing functions
  35.   on image files including:
  36.  
  37.   o Create a single optimal 256-color palette from a series of
  38.     truecolor pictures, and then creating an Autodesk Animator .FLI
  39.     file out of them.
  40.   o Save the palette as a .MAP (PICLAB, FRACTINT) or .COL
  41.     (Autodesk Animator) palete file.
  42.   o Convert pictures to a bunch of different still image formats.
  43.   o Read in a palette file in either .COL or .MAP format
  44.     and animating a bunch of pictures using that palette.
  45.   o Arbitrary rotation.
  46.   o Scaling.
  47.   o Multi-layer compositing.
  48.   o Averaging images together for a variety of effects, including
  49.     simulated motion blur and red/blue 3D.
  50.   o And more.
  51.  
  52. ======================================================================
  53. **** IF YOU ARE HAVING MEMORY PROBLEMS WITH DTA, READ THIS ****
  54.  
  55. Real mode vs. Protected mode:
  56.  
  57.   DTA used to come in two varieties: a real mode version and
  58.   a protected mode version.  From now on there's only a
  59.   protected mode version.  There's no more DTAX.EXE.
  60.  
  61.   DTA will let you access up to 16MB of extended memory (either raw
  62.   or configured as XMS with HIMEM.SYS or QEMM386.SYS or whatever).
  63.   It requires at least 1 or 2 MB of RAM to run at all.
  64.  
  65.   Don't delete the files DPMI16BI.OVL, RTM.EXE, and DPMIINST.EXE.
  66.   These make up the protected mode drivers for Borland Pascal 7.0
  67.   (the compiler used to build DTA).  DTA won't run without them.
  68.  
  69. ======================================================================
  70. The Rules:
  71.  
  72.   Feel free to re-upload this program to other bulletin board
  73.   systems, FTP sites, etc., in its *original, unmodified* form.
  74.   You may not repackage it with other programs.  You may not
  75.   repackage it with your own tutorial.  I feel like an idiot
  76.   having to make these demands, but I've been finding archives
  77.   on BBSs going by names like MORPHPAK.ZIP which are collections
  78.   of DTA, my other program DMorf, sometimes also Richard Godoeken's
  79.   program RMORPH, plus Trilobyte's PLAY.  That's not kosher.  I and
  80.   those other folks distributed our programs the way we did for
  81.   reasons.
  82.     Do not include this program on a disk along with any magazine,
  83.   book, hardware product, or other software product without my
  84.   permission.
  85.  
  86.     I claim no rights over any animations or pictures that you
  87.   create using DTA.
  88.  
  89. ======================================================================
  90. Money matters:
  91.  
  92.   DTA is a shareware program.  If you think this program is worth
  93.   it, send some money or some computer hardware or something to:
  94.  
  95.     David K. Mason
  96.     P.O. Box 181015
  97.     Boston, MA 02118
  98.  
  99.   I think $35 is an appropriate amount, but feel free to send more
  100.   or less.
  101.  
  102. ======================================================================
  103. Blatant shameless plugs:
  104.  
  105.  Other shareware programs:
  106.  
  107.    o Dave's Morphing program (DMorf), the first shareware morphing
  108.      program for the PC.
  109.  
  110.    o Dave's Flic Viewer (DFV), an animation player that can
  111.      handle DTA's FLH and FLT files in addition to conventional
  112.      FLI and FLC files.  (no shareware registration required
  113.      for registered users of DTA or DMorf)
  114.  
  115.    o Dave's Self-Viewing Flic Builder (BUILDSV), which
  116.      converts flics into executable programs by appending a
  117.      copy of the flic to a special version of DFV.
  118.      (no shareware registration required for registered users
  119.      of DTA or DMorf)
  120.  
  121. ----------------------------------------------------------------------
  122.  
  123.   For more information on using DTA and related programs,
  124.   see my books:
  125.  
  126.     "Making Movies on Your PC" (by David K. Mason and Alexander
  127.   Enzmann, Waite Group Press, $34.95 USA, ISBN 1-878739-41-7)
  128.   covers the creation of 3D animation sequences using Polyray
  129.   and DTA.  The DTA reference info is up to date through
  130.   release 1.8g.
  131.  
  132.     "Morphing on Your PC" (by David K. Mason, Waite Group Press,
  133.   $29.95 USA, ISBN 1-878739-53-0) covers building animated
  134.   morph sequences with DMorf and DTA.  The DTA reference info
  135.   is up to date through release 2.0.
  136.  
  137. ======================================================================
  138. Syntax:
  139.  
  140.  Syntax: DTA (filenames) (options)
  141.  
  142. ======================================================================
  143. Input Formats:
  144.  
  145.   .TGA        Targa 8-,16-,24-,32-bit compressed/uncompressed.
  146.   .GIF        GIF (87a or 89a).
  147.   .PCX        PC Paintbrush 256-color or 24-bit PCX images.
  148.   .DIB/.BMP   Microsoft Windows device-independent bitmap files.
  149.   .IMG        Vivid raytracer 24-bit RLE output.
  150.   .FLI and
  151.   .FLC        Autodesk Animator/Animator Pro animation files.
  152.   .VAN        VRLI VistaPro 256-color animation files.
  153.   .ANI        Presidio PC Animate Plus animation files.
  154.   .RLE        MindImage 2 SIRDS run-length encoded depth
  155.               files.
  156.   .IFF,.LBM,
  157.   .ILB        Amiga IFF/ILBM pictures.
  158.  
  159.   .LZH        LHArc compressed archive containing files in the above
  160.               picture formats.
  161.   .ZIP        PKZIP compressed archive containing files in the above
  162.               picture formats.
  163.  
  164.   @script     Process all files listed in a text file called
  165.               "script.SCR".
  166.  
  167.  To specify a particular picture in an archive:
  168.    "ARCHIVE.ZIP:PICTURE.TGA".
  169.  To specify particular frames in an animation:
  170.    "ANIM.FLI:first[,last]".
  171.  
  172. ======================================================================
  173. Switches:
  174.  
  175.  (Filename options)
  176.  
  177.    /O(name)      Specify output filename
  178.    /FO[#[,#]]    Always save to the original filename
  179.  
  180.  
  181.  (Output format options)
  182.  
  183.    By default, DTA will create a flic (.FLI/.FLC/.FLH/.FLT) animation file,
  184.    Specify a different format with one of these switches:
  185.  
  186.    (default)   Create a .FLI animation file.
  187.  
  188.    /FT (.TGA)    /FB (.BMP)    /FM (.MAP palette)    /FR (MindImage .RLE)
  189.    /FG (.GIF)    /FD (.DIB)    /FC (.COL palette)    /FI (grayscale .TIF)
  190.    /FB (.PCX)                                        /FV (.VAN animation)
  191.  
  192.  (Output resolution options)
  193.  
  194.    By default, DTA will create output files with the same dimensions as
  195.    as the input pictures.  When creating an animation, it will use the
  196.    dimensions of the first input picture.
  197.  
  198.    This is sometimes undesirable, as when you''ve got multiple pictures
  199.    of different sizes, or when you''re compositing pictures.
  200.  
  201.    So, you can override this with one of these switches:
  202.  
  203.    /R#    specify output resolution:
  204.              (1) 320x200   (4) 320x480   (7) 640x400   (10) 1024x768
  205.              (2) 320x240   (5) 360x480   (8) 800x600   (12) 1280x1024
  206.              (3) 320x400   (6) 640x480
  207.  
  208.    /R#,#  specify resolution exactly
  209.  
  210.  (Misc. output options)
  211.  
  212.    /B##   bits per pixel.  Legal values and *defaults*:
  213.             TGA: 1 8 16 *24* 32    flics: *8*/16/24
  214.             PCX: *8* 24            all others: 8
  215.             BMP/DIB: 8 *24*
  216.  
  217.  (Flic output options)
  218.  
  219.     /FLX   build a Tempra .FLX file instead of default .FLH (16-bit
  220.            only)
  221.     /FLC   build .FLC even when the size is 320x200 (8-bit only)
  222.     /P     ping-pong
  223.     /Snnn  specify display speed of animation; default=0
  224.     /TO#   (flic tolerance) causes DTA to ignore pixel differences
  225.            between frames when the distance in color-space is less
  226.            than or equal to a value that you supply.
  227.     /TX#   Include a complete, no-tolerance frame once every
  228.            # frames.  (use only in conjunction with /TO)
  229.            (/TO and /TX work only with FLT and FLH files)
  230.  
  231.  (.GIF output options)
  232.  
  233.     /IG    interlace .GIF files
  234.  
  235.  (.TGA output options)
  236.  
  237.     /NC    don''t compress .TGA files
  238.     /BU    save .TGA files bottom-up instead of top-down
  239.  
  240.  (Palette options for colormapped output)
  241.  
  242.     /G           Use greyscale instead of a palette.
  243.     /G32         Use 32-level greyscale instead of a palette.
  244.                  (there's also a /G128, /G64, /G32, /G16, /G8,
  245.                  and /G4)
  246.                    /G represents a 256-level grayscale except when
  247.                  the output format is a 320x200 .FLI file, when it
  248.                  represents a 64-level grayscale.  That's because
  249.                  .FLI won't support higher than 64 shades.
  250.                  /G128 represents a 128-level grayscale, /G64 a
  251.                  64-level grayscale, etc.
  252.                    Most VGA and SVGA monitors can only display 64
  253.                  shades of gray, so it's wasteful to use more than
  254.                  that if your picture will only be displayed on a
  255.                  monitor.  Some laptop VGA displays can only display
  256.                  32 shades.
  257.                    If you're going to be printing your image or using
  258.                  it as a bump map or height field with a rendering
  259.                  program, then the more shades the better.
  260.     /332         Use 3/3/2 palette.
  261.     /Upalname    Use existing .MAP or .COL file for palette.
  262.     /M#          Set maximum colors.
  263.     /MN          Do NOT remap colormapped input.
  264.     /PO          Force single optimal palette generation even when
  265.                  creating GIF files.
  266.     /C#          Scan only one frame per # for palette.
  267.  
  268.  (Dithering options)
  269.     /DF          dither with Floyd-Steinberg filter
  270.     /DS          dither with Sierra Lite filter
  271.     /DO[#]       Ordered dither; digit represents dither strength
  272.     /DR[#]       Random noise dither
  273.  
  274.  (Frame averaging options)
  275.  
  276.     /A[#|A]  Average <number> TGAs per output frame (A=All).
  277.     /T[#|A]  Trail   <number> TGAs per output frame (A=All).
  278.     /X[num]  eXpand <number>. Create and insert <number> averaged.
  279.              frames between each pair of regular frames.
  280.     /WF      weight of first frame (default=1)
  281.     /WI      weight increment (default=0)
  282.  
  283.  (Composition options)
  284.  
  285.     /L             Separates output layers.  Picture files specified
  286.                    in later layers get overlayed on top of previous
  287.                    layers.  If the overlayed pictures contain
  288.                    transparency information (32-bit TGA files only),
  289.                    then the pictures underneath will show through.
  290.     /CK#,#,#       Chroma-key, to make all occurrences of a color
  291.                    transparent for compositing.  The three numbers
  292.                    represent the red,green, and blue components
  293.                    of the key color.
  294.     /CI#,#,#       inverse chroma-key
  295.     /CT#           Chroma-key tolerance.  Specifies how close to the
  296.                    key color a pixel has to be to make it transparent.
  297.     /CC#,#,#,#     chroma-key color... specify an RGBa value to replace
  298.                    chroma-keyed pixels with (default=0,0,0,0)
  299.     /ALPHA, /RED,  make a grayscale image from a picture''s alpha channel,
  300.     /GREEN, /BLUE  or from one of the color channels.
  301.  
  302.  (Geometrical transformation options)
  303.  
  304.     /CL#,#[,#,#]   Clip the input picture.  The first two numbers
  305.                    specify the top-left, and the other two numbers
  306.                    control the width and depth.
  307.     /CLP#,#[,#,#]  clip from top-left (after scaling)
  308.     /LOC#,#[,#]    specify where to place image (default is 0,0)
  309.                    The final number specifies time
  310.     /LT            Make /LOC base vertical coords from the top edge
  311.                    instead of the center.
  312.     /LB            Make /LOC base vertical coords from the bottom edge.
  313.     /LL            Make /LOC base horizontal coords from the left edge
  314.                    instead of the center
  315.     /LR            Make /LOC base horizontal coords from the right edge
  316.     /ROT#[,#]      rotation... first number represents angle, second
  317.                    is for time
  318.     /SC[#,#]       rescale pictures to screen res. or specified size
  319.     /SCF[#,#]      fast, but dumb, rescale
  320.  
  321.  (Other options that I don''t know how to classify)
  322.  
  323.     /K#            Use only one frame per # picture files.  Skip the
  324.                    rest.
  325.     /I[#]          process a total of # picture files
  326.     /GA#           Gamma-correct picture.  Try specifying a number
  327.                    between 1.0 and 2.0 to brighten, between 0.5 and
  328.                    1.0 to darken.
  329.     /INV[R,G,B,A]  invert colors or individual color channel
  330.  
  331.  
  332. ======================================================================
  333. Scripts:
  334.  
  335.   As I mentioned earlier, you tell DTA to process all the files
  336.   listed in a text file by specifying the name of the text file
  337.   preceded by a "@".
  338.     A script file can contain as many file specifications
  339.   as you want.  It can also contain any of the above-mentioned
  340.   switches.  Each must be on a line of its own.
  341.     Here's an example script called test.scr:
  342.  
  343.      back.tga
  344.      /l
  345.      *.tga
  346.      /a2
  347.      /sc640,480
  348.      /l
  349.      signat.gif
  350.      /lr
  351.      /lb
  352.      /fo2
  353.  
  354.     Typing "dta @test" in this case would cause DTA to perform
  355.   exactly the same as if you instead typed:
  356.  
  357.      dta back.gif /l *.tga /a2 /sc640,480 /l signat.gif /lr /lb /fo2
  358.  
  359.     Scripts can come in handy if
  360.  
  361.     (a) your command is just getting too darn long and
  362.   complicated to fit on a DOS command line.  A script can
  363.   be as long as you want.
  364.     (b) you have to use the same command over and over
  365.   again.  Why remember all that stuff or use a crib sheet
  366.   when you can just put it all in a script just once
  367.   and then use it over and over.
  368.  
  369.     You can also use a script in addition to other filenames
  370.   and switches:
  371.  
  372.     Say you had a script file called whirl.scr that looked like
  373.   this:
  374.  
  375.      /l
  376.      logo.gif
  377.      /rot0,0
  378.      /rot360,100
  379.      /ch0,0,0
  380.      /loc400,350
  381.  
  382.     then instead of typing
  383.  
  384.      dta x*.tga /l logo.gif /rot0,0 /rot360,100 /ch0,0,0 /loc400,350
  385.  
  386.     you could just type:
  387.  
  388.      dta x*.tga @whirl
  389.  
  390. ======================================================================
  391. Revision History:
  392.  
  393.   (see WHATSNEW.DTA)
  394.  
  395. ======================================================================
  396. Averaging/Trailing/Expansion modes (/A /T /X switches) examples:
  397.  
  398.   Averaging 5 input pictures with "/A2" option:
  399.  
  400.     Average:    To produce:
  401.  
  402.     file 1      frame 1
  403.     file 2
  404.  
  405.     file 3      frame 2
  406.     file 4
  407.  
  408.     file 5      frame 3
  409.     file 1
  410.  
  411.   Trailing 4 input pictures with "/T2" option:
  412.  
  413.     Average:    To produce:
  414.  
  415.     file 1      frame 1
  416.     file 2
  417.  
  418.     file 2      frame 2
  419.     file 3
  420.  
  421.     file 3      frame 3
  422.     file 4
  423.  
  424.     file 4     frame 4
  425.     file 1
  426.  
  427.   Trailing 5 input pictures with "/T3" option:
  428.  
  429.     Average:    To produce:
  430.  
  431.     file 1      frame 1
  432.     file 2
  433.     file 3
  434.  
  435.     file 2      frame 2
  436.     file 3
  437.     file 4
  438.  
  439.     file 3      frame 3
  440.     file 4
  441.     file 1
  442.  
  443.     file 4      frame 4
  444.     file 5
  445.     file 1
  446.  
  447.     file 5      frame 5
  448.     file 1
  449.     file 2
  450.  
  451.   Expanding 2 input pictures with "/X1" option:
  452.  
  453.     frame 1 =  (100% of FILE 1  ) + (  0% of FILE 2  )
  454.     frame 2 =  ( 50% of FILE 1  ) + ( 50% of FILE 2  )
  455.     frame 3 =  (  0% of FILE 1  ) + (100% of FILE 2  )
  456.  
  457.   Expanding 2 input pictures with /X2" option:
  458.  
  459.     frame 1 =  (100% of FILE 1  ) + (  0% of FILE 2  )
  460.     frame 2 =  ( 66% of FILE 1  ) + ( 33% of FILE 2  )
  461.     frame 3 =  ( 33% of FILE 1  ) + ( 66% of FILE 2  )
  462.     frame 4 =  (  0% of FILE 1  ) + (100% of FILE 2  )
  463.  
  464. ======================================================================
  465. Miscellaneous examples:
  466.  
  467. (Note: some of these examples, especially the ones near the
  468. very end, are ridiculous... you'd never actually have a use for
  469. exactly those combinations of switches.  They're there to
  470. give you an idea of what weirdness you can achieve by
  471. mixing and matching DTA's assorted abilities.)
  472.  
  473. (Note 2: This section could use some more examples... if
  474. you've got a favorite combination, let me know and I'll add
  475. it to this doc.)
  476.  
  477. ----------------------------------------------------------------------
  478. DTA ROCKET*.TGA
  479.  
  480. Create an 8-bit (256-color) flic file (.FLI or .FLC) from a bunch
  481. of .TGA files.
  482.  
  483. ----------------------------------------------------------------------
  484. DTA ROCKET*.TGA /B16
  485.  
  486. Create an 16-bit flic file (.FLH) from a bunch of .TGA files.
  487.  
  488. ----------------------------------------------------------------------
  489. DTA ROCKET*.TGA /B24
  490.  
  491. Create an 24-bit flic file (.FLT) from a bunch of .TGA files.
  492.  
  493. ----------------------------------------------------------------------
  494. DTA ROCKET*.TGA /FC /OROCKET
  495.  
  496. Make a palette for all .TGA files starting with "ROCKET".
  497. Output the palette to an Animator palette file called "ROCKET.COL".
  498.  
  499. ----------------------------------------------------------------------
  500. DTA SKY.GIF /L BEFORE.TGA MORF*.TGA AFTER.TGA
  501.  
  502. Build a multilayer flic.  SKY.GIF gets put in the background, and
  503. the pictures FIRST.TGA, a bunch of TGAs beginning with the string
  504. MORF, and LAST.TGA get superimposed over it.  SKY.GIF shows through
  505. any parts of the other pictures which are transparent.
  506. (32-bit TGA files can contain a transparency value for each
  507. pixel called an "alpha channel".)
  508.  
  509. This example assumes that the pictures BEFORE.TGA and AFTER.TGA
  510. had transparency added to them with my other program, DMorf
  511. (Rel. 1.1 or higher), and that the MORF*.TGA files are morphed
  512. pictures built with DMorf.
  513.  
  514. ----------------------------------------------------------------------
  515. DTA PIC1 PIC2 PIC3 /FM /OXYZ
  516.  
  517. Make a palette for .TGA files "PIC1.TGA", "PIC2.TGA", and "PIC3.TGA"
  518. Output the palette to a PICLAB palette file called "XYZ.MAP".
  519.  
  520. ----------------------------------------------------------------------
  521. DTA ROCKET* /OROCKET /DF
  522.  
  523. Make input from all .TGA files beginning with "ROCKET".
  524. Output to an animation file called "ROCKET.FLI".
  525. Dither the frames with Floyd-Steinberg error-diffusion.
  526.  
  527. ----------------------------------------------------------------------
  528. DTA ROCKET* /G /DO2 /P
  529.  
  530. Make input from all .TGA files beginning with "ROCKET".
  531. Map colors to grayscale.
  532. Dither, using ordered dither strength 2.
  533. Ping-pong it.
  534. Output to an animation with the default name of "ANIM.FLI"
  535.  
  536. ----------------------------------------------------------------------
  537. DTA ROCKET
  538.  
  539. Make input from ROCKET.TGA.
  540. Output to an animation with the default name of "ANIM.FLI".
  541.  
  542. ----------------------------------------------------------------------
  543. DTA @WING2.LST /S10 /OWING2.FLI
  544.  
  545. Make input from files listed in a text file called "WING2.LST".
  546. Set playback speed to "10".
  547. Output to an animation with the name of "WING2.FLI".
  548.  
  549. ----------------------------------------------------------------------
  550. DTA BBB*.TGA AAA*.TGA /UPAL1.COL /UPAL2.MAP /OFRED
  551.  
  552. Make input from all .TGA files whose name begins with "BBB", and "AAA".
  553. NOTE:
  554.     The "BBB" files will appear in the animation before the "AAA" files.
  555.     The "BBB" files will be sorted alphabetically, and so will the
  556.     "AAA" files, but separately.
  557. Read in an Animator palette file called "PAL1.COL", and merge it with
  558.     a Piclab palette file called "PAL2.MAP".
  559.     Use this combined palette for the animation.
  560. Output to an animation with the name of "FRED.FLI".
  561.  
  562. ----------------------------------------------------------------------
  563. DTA *.TGA /FG
  564.  
  565. Make .GIFs from all .TGAs in the current directory.
  566.  
  567. ----------------------------------------------------------------------
  568. DTA SOMBRERO /FG /DR2 /G
  569.  
  570. Make a dithered grayscale .GIF from a file called SOMBRERO.TGA.
  571.  
  572. ----------------------------------------------------------------------
  573. DTA /CHR LEFT*.TGA /GA0.8 /CHB RIGHT*.TGA
  574.  
  575. Make a red/blue 3D .FLI file.
  576. Use the .TGA files beginning with "LEFT" as the red component
  577. And the ones beginning with "RGHT" as the blue component.
  578. NOTE: For this to work right, there must be an equal number of
  579.    "LEFT" and "RGHT" .TGAs.
  580. (the /ga is to adjust the brightness of the red component
  581. so it doesn't drown out the blues.  Some experimentation
  582. may be necessary to get the balance just right... if
  583. somebody comes up with a better brightness combination,
  584. let me know and I'll put it right here in the doc.)
  585. Output to an animation with the default filename of "ANIM.FLI"
  586.  
  587. ----------------------------------------------------------------------
  588. DTA XXX*.TGA /L YYY*.TGA /CHA ZZZ*.TGA
  589.  
  590. This is a fun one...  Create an animation with three sets
  591. of pictures.  The ones called XXX*.TGA are the background,
  592. and the YYY*.TGA pictures are the foreground.  But,
  593. the ZZZ*.TGA pictures are used for the alpha channel of
  594. the foreground, dictating which parts of the YYY pictures
  595. will be transparent and how much (dark parts of ZZZ will
  596. make YYY very transparent, while bright parts will be less
  597. so.
  598.  
  599. ----------------------------------------------------------------------
  600. DTA XXX* /FTYY /AA
  601.  
  602. Make input from .TGAs beginning with "XXX".
  603. Average all files.
  604. Output to a new Targa file called "YY.TGA".
  605.  
  606. ----------------------------------------------------------------------
  607. DTA XXX*.TGA /T3 /DO3 /OZZZ
  608.  
  609. Make input from all .TGA files beginning with "XXX"
  610. Trail 3 frames.
  611. Use ordered dithering, strength 3.
  612. Output an animation called "ZZZ.FLI"
  613.  
  614. ----------------------------------------------------------------------
  615. DTA XXX*.TGA /X3
  616.  
  617. Make input from all .TGA files beginning with "XXX"
  618. Expand 3.  Assuming 5 .TGA input files, this would create a 15 frame
  619. animation.
  620. Output an animation called "ANIM.FLI"
  621.  
  622. ----------------------------------------------------------------------
  623. DTA *.GIF
  624.  
  625. Creates a file called ANIM.FLI or ANIM.FLC from all .GIF files in the
  626. current directory.  (The extension depends on the resolution of the
  627. first picture.  If it's 320 by 200, then DTA will create a .FLI
  628. file.  Otherwise, it'll create a .FLC.
  629.  
  630. ----------------------------------------------------------------------
  631. DTA *.TGA /K2 /C2
  632.  
  633. Assuming 60 .TGA files, create a flic containing only 30 frames.
  634. Generate the palette from only 15 frames.
  635.  
  636. ----------------------------------------------------------------------
  637. DTA *.GIF /R320,200 /SC
  638.  
  639. Create a flic from a bunch of GIF files, set the screen size
  640. to 320 by 200, and rescale all the images to the screen size.
  641.  
  642. ----------------------------------------------------------------------
  643. DTA *.TGA /R6 /SC320,240
  644.  
  645. Create a 640x480 FLC file from a bunch of TGA files.  Rescale each
  646. picture so that the width is depth is 240, but leave the width alone.
  647. This one is useful when you want to turn a bunch of 320x200
  648. pictures into a 640x480 flic... because 320x200 screens use a
  649. different aspect ratio than 640x480.  320x200 pictures look a
  650. bit squat when you display them in 640x480 mode, but 320x240 looks
  651. correct.
  652.  
  653. ----------------------------------------------------------------------
  654. DTA FLIC1.FLI FLIC2.FLI /OFLIC3
  655.  
  656. Create a new flic by appending two existing flics.  Unlike my old
  657. FLAP program, DTA will create a new palette.
  658.  
  659. ----------------------------------------------------------------------
  660. DTA FLIC.FLI /FG /NM
  661.  
  662. Create GIF files from the frames in FLIC.FLI.  The /NM tells DTA
  663. *not* to generate an optimized palette.  That would be a waste of
  664. time, since a FLIC file usually contains an optimized palette.
  665.  
  666. ----------------------------------------------------------------------
  667. DTA FLIC.FLI /SC120,100 /ROT90 /ONEWFLIC /R1 /NM
  668.  
  669. Read an existing flic, scale each of the frames to a 100x100
  670. square, rotate the result 90 degrees to the right, and
  671. create a new flic.  (The /R1 tells DTA to make a 320x200
  672. .FLI file instead of a 100x120 .FLC file.  The little 100x120
  673. square gets placed in the middle of the screen.
  674.  
  675. ----------------------------------------------------------------------
  676. DTA FLIC.FLI /SC100,100 /ROT0,0 /ROT360,100 /ONEWFLIC /R1
  677.  
  678. This one is much like the last example, but a bit funkier.
  679. The first frame (0%) will be rotated 0 degrees (not at all).
  680. The last frame (100%) will be rotated 360 degrees (a complete
  681. rotation).  The frames in between will be rotated in imcrements
  682. between 0 and 360 degrees. (If you had 362 frames in the
  683. animation, then the second frame would be rotated 1 degree,
  684. the second 2 degrees, etc.)
  685.   Note we did *not* use the /NM switch to turn off palette
  686. optimization.  Scaling and rotation *require* that the palette
  687. be remapped because the processes create new colors.
  688. On the other hand, fast scaling (/SCF) and 90-degree
  689. rotations do not require an optimized palette.
  690.  
  691. ----------------------------------------------------------------------
  692. DTA FLIC.FLI /SC100,100 /ROT0,0 /ROT180,66.666 /ROT360,100 /ONF /R1
  693.  
  694. Not quite the same as the last example.  Instead of rotating
  695. the frames at a constant rate the rotation starts slowly, until
  696. at two-thirds (66.666%) of the way through the images have rotated
  697. 180 degrees.  The rotation speeds up so that by the time it hits
  698. finishes (100%), it's completed a full rotation.
  699.  
  700. ----------------------------------------------------------------------
  701. DTA BACKUP.ZIP:FLIC.FLI:20 /CL110,120,90,80 /FT
  702.  
  703. Read frame 20 of a flic that's stored in a ZIP file.
  704. Clip a 90x80-pixel square from location 100,120 of the image
  705. and save it as a TGA file.
  706.  
  707. ----------------------------------------------------------------------
  708. DTA *.TGA /TO15
  709.  
  710. Create a flic from a bunch of .TGA files.  When comparing
  711. pictures to produce delta frames in a flic, ignore color
  712. differences that are less than 15 units in color-space.
  713. The resulting flic won't look as good, but it will be smaller
  714. and will play more quickly.  This trick works better on
  715. digitized video than it does with computer-generated
  716. images.
  717.  
  718. ----------------------------------------------------------------------
  719. DTA *.TGA /TO15 /TX5
  720.  
  721. This works much like the last example, but every fifth frame
  722. in the resulting flic will use a tolerance of 0.
  723.  
  724.  
  725. ======================================================================
  726. Speed concerns:
  727.  
  728.   DTA is fastest when you use grayscale instead of a palette.
  729.  
  730.   If you let DTA generate its own palette, DTA is still
  731.   relatively speedy, except it has to read all the pictures
  732.   first to gather color statistics.  It gets (lots) slower if
  733.   you dither.
  734.  
  735.   If you create an animation from .TGA files stored in an
  736.   archive file (.LZH or .ZIP), then DTA is somewhat slower,
  737.   it takes time to extract the pictures from the archive.
  738.  
  739.   If you average multiple files or rescale pictures, that is
  740.   going to slow things down.
  741.  
  742. ======================================================================
  743. Credits:
  744.  
  745.   To create palettes and select colors from palettes, this
  746.   program uses an algorithm that I found in an article called "A
  747.   Simple Method for Color Quantization:  Octree Quantization," by
  748.   Michael Gervautz and Werner Purgathofer, which can be found in
  749.   a book called "Graphics Gems," edited by Andrew S. Glassner.  I
  750.   recommend this book highly.
  751.  
  752.   I got my first intro to the .FLI format was a document included
  753.   with Jim Kent's FLILIB.  Autodesk has sincce updated this doc
  754.   to create a file called ANIFILES.DOC which includes .FLC info.
  755.   Even more thanks to Jim Kent for the FLC info he gave me online
  756.   BIX.
  757.  
  758.   Thanks to Borland International and TurboPower Software for
  759.   creating some great programming tools.
  760.  
  761.   Thanks to Dan Farmer, Alexander Enzmann, Jeff Bowermaster,
  762.   Tim Wegner, John Jordan, and many others for their excellent
  763.   suggestions.
  764.  
  765.   Thanks to Dan Farmer for sprucing up this documentation
  766.   file a couple versions back.
  767.  
  768.   Thanks to the Cafe Pamplona in Harvard Square for being such
  769.   a cool place to swill coffee and discuss ray-tracing and animation.
  770.  
  771. ======================================================================
  772. Disclaimer:
  773.  
  774.   If you use DTA, you do so at your own risk.  I won't be held
  775.   responsible if it screws anything up.  I don't think it will,
  776.   but stranger things have happened.  If you don't agree
  777.   to this, then don't use it.
  778.  
  779. ======================================================================
  780. Support:
  781.  
  782.   If you've got any requests/bug reports/suggestions, send a message
  783.   to:
  784.  
  785.     "David Mason" on "The Graphics Alternative", (510) 524-2780,
  786.     and on "Channel 1" BBS, (617) 354-8873.
  787.     "76546,1321" on Compuserve.
  788.  
  789.     (I also sometimes check the "You Can Call Me Ray" BBS,
  790.      (708) 358-5611, but not too often these days because of
  791.      communications problems)
  792.  
  793.   You'll probably get some kind of a response (maybe sooner, maybe
  794.   later)
  795.