home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / Extras / IFF / IFF_Forms / TDDD.doc < prev    next >
Encoding:
Text File  |  1993-03-01  |  28.4 KB  |  684 lines

  1. 3-D rendering data, Turbo Silver (Impulse)
  2.  
  3.                       FORM TDDD
  4.                       ---------
  5.  
  6.     FORM TDDD is used by Impulse's Turbo Silver 3.0 for 3D rendering
  7.     data.  TDDD stands for "3D data description".  The files contain
  8.     object and (optionally) observer data.
  9.  
  10.     Turbo Silver's successor, "Imagine", uses an upgraded FORM TDDD
  11.     when it reads/writes object data.
  12.  
  13.     Currently, in "standard IFF" terms, a FORM TDDD has only two chunk
  14.     types:  an INFO chunk describing observer data;  and an OBJ chunk
  15.     describing an object heirarchy.  The INFO chunk appears only in
  16.     Turbo Silver's "cell" files, and the OBJ chunk appears in both
  17.     "cell" files and "object" files.
  18.  
  19.     The FORM has an (optional) INFO chunk followed by some number of
  20.     OBJ chunks.  (Note:  OBJ is followed by a space -- ckID = "OBJ ")
  21.  
  22.     The INFO and OBJ chunks, in turn, are made up of smaller chunks with
  23.     the standard IFF structure:  <ID> <data-size> <data>.
  24.  
  25.     The INFO "sub-chunks" are relatively straightforward to interpret.
  26.  
  27.     The OBJ "sub-chunks" support object heirarchies, and are slightly
  28.     more difficult to interpret.  Currently, there are 3 types of OBJ
  29.     sub-chunks:  an EXTR chunk, describing an "external" object in a
  30.     seperate file; a DESC chunk, describing one node of a heirarchy;
  31.     and a TOBJ chunk marking the end of a heirarchy chain.  For each
  32.     DESC chunk, there must be a corresponding TOBJ chunk.  And an
  33.     EXTR chunk is equivalent to a DESC/TOBJ pair.
  34.  
  35.     In Turbo Silver and Imagine, the structure of the object heirarchy
  36.     is as follows.  There is a head object, and its (sexist) brothers.
  37.     Each brother may have child objects.  The children may have
  38.     grandchildren, and so on. The brother nodes are kept in a doubly
  39.     linked list, and each node has a (possibly NULL) pointer to a
  40.     doubly linked "child" list. The children point to the "grandchildren"
  41.     lists, and so on.  (In addition, each node has a "back" pointer to
  42.     its parent).
  43.  
  44.     Each of the "head" brothers is written in a seperate OBJ chunk,
  45.     along with all its descendants.  The descendant heirarchy is
  46.     supported as follows:
  47.  
  48.         for each node of a doubly linked list,
  49.  
  50.         1)  A DESC chunk is written, describing its object.
  51.         2)  If it has children, steps 1) to 3) are performed
  52.                 for each child.
  53.         3)  A TOBJ chunk is written, marking the end of the children.
  54.  
  55.     For "external" objects, steps 1) to 3) are not performed, but
  56.     an EXTR chunk is written instead.  (This means that an external
  57.     object cannot have children unless they are stored in the same
  58.     "external" file).
  59.  
  60.     The TOBJ sub-chunks have zero size -- and no data.  The DESC
  61.     and EXTR sub-chunks are made up of "sub-sub-chunks", again,
  62.     with the standard IFF structure:  <ID> <data-size> <data>.
  63.  
  64.     ( "External" objects were used by Turbo Silver to allow a its
  65.     "cell" data files to refer to an "object" data file that is
  66.     "external" to the cell file.  Imagine abandons the idea of
  67.     individual cell files, and deals only in TDDD "object" files.
  68.     Currently, Imagine does not support EXTR chunks in TDD files.)
  69.  
  70.     Reader software WILL FOLLOW the standard IFF procedure of
  71.     skipping over any un-recognized chunks -- and "sub-chunks"
  72.     or "sub-sub-chunks". The <data-size> field indicates how many
  73.     bytes to skip.  In addition it WILL OBSERVE the IFF rule that
  74.     an odd <data-size> may appear, in which case the corredponding
  75.     <data> field will be padded at the end with one extra byte to
  76.     give it an even size.
  77.  
  78.  
  79.     Now, on with the details.
  80.  
  81.     First, there are several numerical fields appearing in the data,
  82.     describing object positions, rotation angles, scaling factors, etc.
  83.     They are stored as "32-bit fractional" numbers, such that the true
  84.     number is the 32-bit number divided by 65536.  So as an example,
  85.     the number 3.14159 is stored as (hexadecimal) $0003243F.  This
  86.     allows the data to be independant of any particular floating point
  87.     format. And it (actually) is the internal format used in the
  88.     "integer" version of Turbo Silver.  Numbers stored in this format
  89.     are called as "FRACT"s below.
  90.  
  91.     Second, there are several color (or RGB) fields in the data.
  92.     They are always stored as three UBYTEs representing the red,
  93.     green and blue components of the color.  Red is always first,
  94.     followed by green, and then blue.  For some of the data chunks,
  95.     Turbo Silver reads the color field into the 24 LSB's of a
  96.     LONGword.  In such cases, the 3 RGB bytes are preceded by a
  97.     zero byte in the file.
  98.  
  99.  
  100.     The following "typedef"s are used below:
  101.  
  102.     typedef LONG    FRACT;                /* 4 bytes */
  103.     typedef UBYTE   COLOR[3];             /* 3 bytes */
  104.  
  105.     typedef struct vectors {
  106.         FRACT X;          /* 4 bytes */
  107.         FRACT Y;          /* 4 bytes */
  108.         FRACT Z;          /* 4 bytes */
  109.     } VECTOR;             /* 12 bytes total */
  110.  
  111.     typedef struct matrices {
  112.         VECTOR I;         /* 12 bytes */
  113.         VECTOR J;         /* 12 bytes */
  114.         VECTOR K;         /* 12 bytes */
  115.     } MATRIX;             /* 36 bytes total */
  116.  
  117.     typedef struct _tform {
  118.         VECTOR r;         /* 12 bytes - position */
  119.         VECTOR a;         /* 12 bytes - x axis */
  120.         VECTOR b;         /* 12 bytes - y axis */
  121.         VECTOR c;         /* 12 bytes - z axis */
  122.         VECTOR s;         /* 12 bytes - size */
  123.     } TFORM;              /*  60 bytes total */
  124.  
  125.     The following structure is used in generating animated cells
  126.     from a single cell.  It can be attached to an object or to the
  127.     camera.  It is also used for Turbo Silver's "extrude along a
  128.     path" feature.  (It is ignored & forgotten by Imagine)
  129.  
  130.     typedef struct story {
  131.         UBYTE  Path[18];  /* 18 bytes */
  132.         VECTOR Translate; /* 12 bytes */
  133.         VECTOR Rotate;    /* 12 bytes */
  134.         VECTOR Scale;     /* 12 bytes */
  135.         UWORD  info;      /*  2 bytes */
  136.     } STORY;              /* 56 bytes total */
  137.  
  138.     The Path[] name refers to a named object in the cell data.
  139.     The path object should be a sequence of points connected
  140.     with edges.  The object moves from the first point of the
  141.     first edge, to the last point of the last edge.  The edge
  142.     ordering is important.  The path is interpolated so that
  143.     the object always moves an equal distance in each frame of
  144.     the animation.  If there is no path the Path[] field should
  145.     be set to zeros.
  146.     The Translate vector is not currently used.
  147.     The Rotate "vector" specifies rotation angles about the
  148.     X, Y, and Z axes.
  149.     The Scale vector specfies X,Y, and Z scale factors.
  150.     The "info" word is a bunch of bit flags:
  151.  
  152.         ABS_TRA    0x0001    - translate in world coorinates (not used)
  153.         ABS_ROT    0x0002    - rotation in world coorinates
  154.         ABS_SCL    0x0004    - scaling in world coorinates
  155.         LOC_TRA    0x0010    - translate in local coorinates (not used)
  156.         LOC_ROT    0x0020    - rotation in local coorinates
  157.         LOC_SCL    0x0040    - scaling in local coorinates
  158.         X_ALIGN    0x0100    - (not used)
  159.         Y_ALIGN    0x0200    - align Y axis to path's direction
  160.         Z_ALIGN    0x0400    - (not used)
  161.         FOLLOW_ME  0x1000    - children follow parent on path
  162.  
  163.     DESC sub-sub-chunks
  164.     -------------------
  165.  
  166.     NAME - size 18
  167.  
  168.         BYTE    Name[18];       ; a name for the object.
  169.  
  170.         Used for camera tracking, specifying story paths, etc.
  171.  
  172.     SHAP - size 4
  173.  
  174.         WORD    Shape;          ; number indicating object type
  175.         WORD    Lamp;           ; number indicating lamp type
  176.  
  177.         Lamp numbers are composed of several bit fields:
  178.  
  179.         Bits 0-1:
  180.             0 - not a lamp
  181.             1 - like sunlight
  182.             2 - like a lamp - intensity falls off with distance.
  183.             3 - unused/reserved
  184.  
  185.         Bits 2:
  186.             0 - non-shadow-casting light
  187.             4 - shadow-casting light
  188.  
  189.         Bits 3-4:
  190.             0  - Spherical light source
  191.             8  - Cylindrical light source.
  192.             16 - Conical light source.
  193.             24 - unused/reserved
  194.  
  195.         Shape numbers are:
  196.  
  197.             0 - Sphere
  198.             1 - Stencil         ; not supported by Imagine
  199.             2 - Axis            ; custom objects with points/triangles
  200.             3 - Facets          ; illegal - for internal use only
  201.             4 - Surface         ; not supported by Imagine
  202.             5 - Ground
  203.  
  204.         Spheres have thier radius set by the X size parameter.
  205.         Stencils and surfaces are plane-parallelograms, with one
  206.         point at the object's position vector; one side lying along
  207.         the object's X axis with a length set by the X size; and
  208.         another side starting from the position vector and going
  209.         "Y size" units in the Y direction and "Z size" units in
  210.         the X direction.  A ground object is an infinte plane
  211.         perpendicular to the world Z axis.  Its Z coordinate sets
  212.         its height, and the X and Y coordinates are only relevant
  213.         to the position of the "hot point" used in selecting the
  214.         object in the editor.  Custom objects have points, edges
  215.         and triangles associated with them.  The size fields are
  216.         relevant only for drawing the object axes in the editor.
  217.         Shape number 3 is used internally for triangles of custom
  218.         objects, and should never appear in a data file.
  219.  
  220.     POSI - size 12
  221.  
  222.         VECTOR  Position;       ; the object's position.
  223.  
  224.         Legal coordinates are in the range -32768 to 32767 and 65535/65536.
  225.         Currently, the ray-tracer only sees objects in the -1024 to 1024
  226.         range.  Light sources, and the camera may be placed outside that
  227.         range, however.
  228.  
  229.     AXIS - size 36
  230.  
  231.         VECTOR  XAxis;
  232.         VECTOR  YAxis;
  233.         VECTOR  ZAxis;
  234.  
  235.         These are direction vectors for the object coordinate system.
  236.         They must be "orthogonal unit vectors" - i.e. the sum of the
  237.         squares of the vevtor components must equal one (or close to it),
  238.         and the vectors must be perpendicular.
  239.  
  240.     SIZE - size 12
  241.  
  242.         VECTOR  Size;
  243.  
  244.         See SHAP chunk above.  The sizes are used in a variety of ways
  245.         depending on the object shape.  For custom objects, they are
  246.         the lengths of the coordinate axes drawn in the editor.  If the
  247.         object has its "Quickdraw" flag set, the axes lengths are also
  248.         used to set the size of a rectangular solid that is drawn rather
  249.         than drawing all the points and edges.
  250.  
  251.     PNTS - size 2 + 12 * point count
  252.  
  253.         UWORD   PCount;         ; point count
  254.         VECTOR  Points[];       ; points
  255.  
  256.         This chunk has all the points for custom objects.  The are
  257.         refered to by thier position in the array.
  258.  
  259.     EDGE - size 4 + 4 * edge cout
  260.  
  261.         UWORD   ECount;         ; edge count
  262.         UWORD   Edges[][2];     ; edges
  263.  
  264.         This chunk contins the edge list for custom objects.
  265.         The Edges[][2] array is pairs of point numbers that
  266.         are connected by the edges.  Edges are refered to by thier
  267.         position in the Edges[] array.
  268.  
  269.     FACE - size 2 + 6 * face count
  270.  
  271.         UWORD   TCount;         ; face count
  272.         UWORD   Connects[][3];  ; faces
  273.  
  274.         This chunk contains the triangle (face) list for custom objects.
  275.         The Connects[][3] array is triples of edge numbers that are
  276.         connected by triangles.
  277.  
  278.     PTHD - size 2 + 6 * axis count - Imagine only
  279.  
  280.         UWORD   ACount;         ; axis count
  281.         TFORM   PData[][3];     ; axis data
  282.  
  283.         This chunk contains the axis data for Imagine "path" objects.
  284.         The PData array contains a TFORM structure for each point along
  285.         the path.  The "Y size" item for the last point on the path tells
  286.         whether the path is closed or not.  Zero means closed, non-zero
  287.         means open.  Otherwise the Y size field is the distance along
  288.         the path to the next path point/axis.
  289.  
  290.     COLR - size 4
  291.     REFL - size 4
  292.     TRAN - size 4
  293.     SPC1 - size 4 - Imagine only
  294.  
  295.         BYTE    pad;            ; pad byte - must be zero
  296.         COLOR   col;            ; RGB color
  297.  
  298.         These are the main object RGB color, and reflection, transmission
  299.         and specularity coefficients.
  300.  
  301.     CLST - size 2 + 3 * count
  302.     RLST - size 2 + 3 * count
  303.     TLST - size 2 + 3 * count
  304.  
  305.         UWORD   count;          ; count of colors
  306.         COLOR   colors[];       ; colors
  307.  
  308.         These are the color, reflection and transmission coefficients
  309.         for each face in custom objects. The count should match the
  310.         face count in the FACE chunk. The ordering corresponds to the
  311.         face order.
  312.  
  313.     TPAR - size 64 - not written by Imagine - see TXT1 below
  314.  
  315.         FRACT   Params[16];     ; texture parameters
  316.  
  317.         This is the list of parameters for texture modules when
  318.         texture mapping is used.
  319.  
  320.     TXT1 - variable size - Imagine only
  321.  
  322.         This chunk contains texture data when texture mapping is used.
  323.  
  324.         UWORD   Flags;          ; texture flags:
  325.                                 ;    1 - TXTR_CHILDREN - apply to child objs
  326.         TFORM   TForm;          ; local coordinates of texture axes.
  327.         FRACT   Params[16];     ; texture parameters
  328.         UBYTE   PFlags[16];     ; parameter flags (currently unused)
  329.         UBYTE   Length;         ; length of texture file name
  330.         UBYTE   Name[Length];   ; texture file name (not NULL terminated)
  331.         UBYTE   pad;            ; (if necessary to make an even length)
  332.  
  333.     BRS1 - variable size - Imagine only (version 1.0)
  334.     BRS2 - variable size - Imagine only (version 1.1)
  335.  
  336.         UWORD   Flags;          ; brush type:
  337.                                 ;    0 - Color
  338.                                 ;    1 - Reflection
  339.                                 ;    2 - Filter
  340.                                 ;    3 - Altitude
  341.         UWORD   WFlags;         ; brush wrapping flags:
  342.                                 ;    1   WRAP_X        - wrap type
  343.                                 ;    2   WRAP_Z        - wrap type
  344.                                 ;    4   WRAP_CHILDREN - apply to children
  345.                                 ;    8   WRAP_REPEAT   - repeating brush
  346.                                 ;    16  WRAP_FLIP     - flip with repeats
  347.         TFORM   TForm;          ; local coordinates of brush axes.
  348.         (UWORD   FullScale;)    ; full scale value
  349.         (UWORD   MaxSeq;)       ; highest number for sequenced brushes
  350.         UBYTE   Length;         ; length of brush file name
  351.         UBYTE   Name[Length];   ; brush file name (not NULL terminated)
  352.         UBYTE   pad;            ; (if necessary to make an even length)
  353.  
  354.         The FullScale and MaxSeq items are in BRS2 chunks only.
  355.  
  356.     SURF - size 5 - not written by Imagine
  357.  
  358.         BYTE    SProps[5];      ; object properties
  359.  
  360.         This chunk contains object (surface) properties used
  361.         by Turbo Silver.
  362.  
  363.         SProps[0] - PRP_SURFACE ; surface type
  364.                                 ;   0 - normal
  365.                                 ;   4 - genlock
  366.                                 ;   5 - IFF brush
  367.         SProps[1] - PRP_BRUSH   ; brush number (if IFF mapped)
  368.         SProps[2] - PRP_WRAP    ; IFF brush wrapping type
  369.                                 ;   0 - no wrapping
  370.                                 ;   1 - wrap X
  371.                                 ;   2 - wrap Z
  372.                                 ;   3 - wrap X and Z
  373.         SProps[3] - PRP_STENCIL ; stencil number for stencil objects
  374.         SProps[4] - PRP_TEXTURE ; texture number if texture mapped
  375.  
  376.     MTTR - size 2 - not written by Imagine - see PRP1 chunk.
  377.  
  378.         UBYTE   Type;           ; refraction type (0-4)
  379.         UBYTE   Index;          ; custom index of refraction
  380.  
  381.         This chunk contains refraction data for transparent or
  382.         glossy objects.  If the refraction type is 4, the object
  383.         has a "custom" refractive index stored in the Index field.
  384.         The Index field is 100 * (true index of refraction - 1.00)
  385.         -- so it must be in the range of 1.00 to 3.55.  The
  386.         refraction types is 0-3 specify 0) Air - 1.00, 1) Water - 1.33,
  387.         2) Glass - 1.67 or 3) Crystal 2.00.
  388.  
  389.     SPEC - size 2 - not written by Imagine - see SPC1 above.
  390.  
  391.         UBYTE   Specularity;    ; range of 0-255
  392.         UBYTE   Hardness;       ; specular exponent (0-31)
  393.  
  394.         This chunk contains specular information.  The Specularity
  395.         field is the amount of specular reflection -- 0 is none,
  396.         255 is fully specular.  The "specular exponent" controls
  397.         the "tightness" of the specular spots.  A value of zero
  398.         gives broad specular spots and a value of 31 gives smaller
  399.         spots.
  400.  
  401.     PRP0 - size 6 - not written by Imagine
  402.  
  403.         UBYTE   Props[6];       ; more object properties
  404.  
  405.         This chunk contains object properties that programs other
  406.         than Turbo Silver might support.
  407.  
  408.         Props[0] - PRP_BLEND    ; blending factor (0-255)
  409.         Props[1] - PRP_SMOOTH   ; roughness factor
  410.         Props[2] - PRP_SHADE    ; shading on/off flag
  411.         Props[3] - PRP_PHONG    ; phong shading on/off flag
  412.         Props[4] - PRP_GLOSSY   ; glossy on/off flag
  413.         Props[5] - PRP_QUICK    ; Quickdraw on/off flag
  414.  
  415.         The blending factor controls the amount of dithering used
  416.         on the object - 255 is fully dithered.  
  417.         The roughness factor controls how rough the object should
  418.         appear - 0 is smooth, 255 is max roughness.
  419.         The shading flag is interpreted differently depending on
  420.         whether the object is a light source or not.  For light
  421.         sources, it sets the light to cast shadows or not.  For
  422.         normal objects, if the flag is set, the object is always
  423.         considered as fully lit - i.e. it's color is read directly
  424.         from the object (or IFF brush), and is not affected by light
  425.         sources.
  426.         The phong shading is on by default - a non-zero value turns
  427.         it off.
  428.         The glossy flag sets the object to be glossy or not.  If
  429.         the object is glossy, the "transmit" colors and the index
  430.         of refraction control the amount of "sheen".  The glossy
  431.         feature is meant to simulate something like a wax coating
  432.         on the object with the specified index of refraction. The
  433.         trasmission coefficients control how much light from the
  434.         object makes it through the wax coating.
  435.         The Quickdraw flag, if set, tells the editor not to draw
  436.         all the points and edges for the object, but to draw a
  437.         rectanglular solid centered at the object position, and
  438.         with sizes detemined by the axis lengths.
  439.  
  440.     PRP1 - size 8 - Imagine only
  441.  
  442.         UBYTE   IProps[8];       ; more object properties
  443.  
  444.         This chunk contains object properties that programs other
  445.         than Imagine might support.
  446.  
  447.         IProps[0] - IPRP_DITHER   ; blending factor (0-255)
  448.         IProps[1] - IPRP_HARD     ; hardness factor (0-255)
  449.         IProps[2] - IPRP_ROUGH    ; roughness factor (0-255)
  450.         IProps[3] - IPRP_SHINY    ; shinyness factor (0-255)
  451.         IProps[4] - IPRP_INDEX    ; index of refraction
  452.         IProps[5] - IPRP_QUICK    ; flag - Quickdraw on/off
  453.         IProps[6] - IPRP_PHONG    ; flag - Phong shading on/off
  454.         IProps[7] - IPRP_GENLOCK  ; flag - Genlock on/off
  455.  
  456.         The blending factor controls the amount of dithering used
  457.         on the object - 255 is fully dithered.  
  458.         The hardness factor controls how tight the specular spot
  459.         should be - 0 is a big soft spot, 255 is a tight hot spot
  460.         The roughness factor controls how rough the object should
  461.         appear - 0 is smooth, 255 is max roughness.
  462.         The shiny factor in interaction with the object's filter
  463.         values controls how shiny the object appears.  Setting it
  464.         to anything but zero forces the object to be non-transparent
  465.         since then the filter values are used in the shiny (reflection)
  466.         calculations.  A value of 255 means maximum shinyness.
  467.  
  468.     INTS - size 4 - not written by Imagine
  469.  
  470.         FRACT   Intensity;      ; light intensity
  471.  
  472.         This is the intensity field for light source objects.
  473.         an intensity of 255 for a sun-like light fully lights
  474.         object surfaces which are perpendicular to the direction
  475.         to the light source.  For lamp-like light sources, the
  476.         necessary intensity will depend on the distance to the light.
  477.  
  478.     INT1 - size 12 - Imagine only
  479.  
  480.         VECTOR  Intensity;      ; light intensity
  481.  
  482.         This is like INTS above, but has seperate R, G & B intensities.
  483.  
  484.     STRY - size 56 - not written by Imagine
  485.  
  486.         STORY   story;          ; a story structure for the object.
  487.  
  488.         The story structure is described above.
  489.  
  490.     ANID - size 64 - Imagine only
  491.  
  492.         LONG    Cellno;         ; cell number
  493.         TFORM   TForm;          ; object position/axes/size in that cell.
  494.  
  495.         For Imagine's "Cycle" objects, within EACH DESC chunk in the
  496.         file - that is, for each object of the group, there will be
  497.         a series of ANID chunks.  The cell number sequences of each
  498.         part of the must agree with the sequence for the head object,
  499.         and the first cell number must be zero.
  500.  
  501.     FORD - size 56 + 12 * PC - Imagine only
  502.  
  503.         WORD    NumC;           ; number of cross section points
  504.         WORD    NumF;           ; number of slices
  505.         WORD    Flags;          ; orientation flag
  506.         WORD    pad;            ; reserved
  507.         MATRIX  TForm;          ; object rotation/scaling transformation
  508.         VECTOR  Shift;          ; object translation
  509.         VECTOR  Points[PC];     ; "Forms" editor points
  510.  
  511.         For Imagine's "Forms" objects, the "PNTS" chunk above is not
  512.         written out, but this structure is written instead.  The point
  513.         count is PC = NumC + 4 * NumF.  The object's real points are
  514.         then calculated from these using a proprietary algorithm.
  515.         The tranformation parameters above allow the axes of the
  516.         real object be moved around relative to the "Forms" points.
  517.  
  518.  
  519.     DESC notes
  520.     ----------
  521.  
  522.     Again, most of these fields are optional, and defaults are supplied.
  523.     However, if there is a FACE chunk, there must also be a CLST chunk,
  524.     an RLST chunk and a TLST chunk -- all with matching "count" fields.
  525.     The SHAP chunk is not optional. 
  526.  
  527.     Defaults are:  Colors set to (240,240,240); reflection and
  528.     transmission coefficients set to zero; illegal shape; no story or
  529.     special surface types; position at (0,0,0); axes aligned to the
  530.     world axes; size fields all 32.0; intensity at 300; no name;
  531.     no points/edges or faces; texture parameters set to zero; refraction
  532.     type 0 with index 1.00; specular, hardness and roughness set to zero;
  533.     blending at 255; glossy off; phong shading on; not a light source;
  534.     not brightly lit;
  535.  
  536.     In Imagine, defaults are the same, but with colors (255,255,255).
  537.  
  538.  
  539.     INFO sub-chunks
  540.     ---------------
  541.  
  542.     BRSH - size 82
  543.  
  544.         WORD    Number;        ; Brush number (between 0 and 7)
  545.         CHAR    Filename[80];  ; IFF ILBM filename
  546.  
  547.         There may be more than one of these.
  548.  
  549.     STNC - size 82
  550.  
  551.         Same format as BRSH chunk.
  552.  
  553.     TXTR - size 82
  554.  
  555.         Same format as BRSH chunk.  The Filename field is the name of
  556.         a code module that can be loaded with LoadSeg().
  557.  
  558.     OBSV - size 28
  559.  
  560.         VECTOR  Camera;         ; Camera position
  561.         VECTOR  Rotate;         ; Camera rotation angles
  562.         FRACT   Focal;          ; Camera focal length
  563.  
  564.         This tells where the camera is, how it is aimed, and its
  565.         focal length.  The rotation angles are in degrees, and specify
  566.         rotations around the X, Y, and Z axes.  The camera looks down
  567.         its own Y axis, with the top of the picture in the direction of
  568.         the Z axis.  If the rotation angles are all zero, its axes
  569.         are aligned with the world coordinate axes.  The rotations are
  570.         performed in the order ZXY about the camera axes.  A positive
  571.         angle rotates Y toward Z, Z toward X, and X toward Y for
  572.         rotations about the X, Y, and Z axes respectively.  To
  573.         understand the focal length, imagine a 320 x 200 pixel
  574.         rectangle perpendicular to, and centered on the camera's
  575.         Y axis.  Any objects in the infinite rectangular cone defined
  576.         by the camera position and the 4 corners of the rectangle will
  577.         appear in the picture.
  578.  
  579.     OTRK - size 18
  580.  
  581.         BYTE    Trackname[18];
  582.  
  583.         This chunk specifies the name of an object that the camera
  584.         is "tracked" to.  If the name is NULL, the camera doesn't
  585.         track.  Otherwise, if the object is moved inside Turbo Silver,
  586.         the camera will follow it.
  587.  
  588.     OSTR - size 56
  589.  
  590.         STORY   CStory;         ; a STORY structure for the camera
  591.  
  592.         The story structure is defined above.
  593.  
  594.     FADE - size 12
  595.  
  596.         FRACT   FadeAt;         ; distance to start fade
  597.         FRACT   FadeBy;         ; distance of total fade
  598.         BYTE    pad;            ; pad byte - must be zero
  599.         COLOR   FadeTo;         ; RGB color to fade to
  600.  
  601.     SKYC - size 8
  602.  
  603.         BYTE    pad;            ; pad byte - must be zero
  604.         COLOR   Horizon;        ; horizon color
  605.         BYTE    pad;            ; pad byte - must be zero
  606.         COLOR   Zenith;         ; zenith color
  607.  
  608.     AMBI - size 4
  609.  
  610.         BYTE    pad;            ; pad byte - must be zero
  611.         COLOR   Ambient;        ; abmient light color
  612.  
  613.     GLB0 - size 8
  614.  
  615.         BYTE    Props[8];       ; an array of 8 "global properties" used
  616.                                 ; by Turbo Silver.
  617.  
  618.         Props[0] - GLB_EDGING       ; edge level (globals requester)
  619.         Props[1] - GLB_PERTURB      ; perturbance (globals requester)
  620.         Props[2] - GLB_SKY_BLEND    ; sky blending factor (0-255)
  621.         Props[3] - GLB_LENS         ; lens type (see below)
  622.         Props[4] - GLB_FADE         ; flag - Sharp/Fuzzy focus (globals)
  623.         Props[5] - GLB_SIZE         ; "apparant size" (see below)
  624.         Props[6] - GLB_RESOLVE      ; resolve depth (globals requester)
  625.         Props[7] - GLB_EXTRA        ; flag - genlock sky on/off
  626.  
  627.         The edging and perturbance values control the heuristics in
  628.         ray tracing.  The sky blending factor is zero for no blending,
  629.         and 255 for full blending.  The lens type is a number from 0
  630.         4, corresponding to the boxes in the "camera" requester, and
  631.         correspond to 0) Manual, 1) Wide angle, 2) Normal, 3) Telephoto,
  632.         and 4) Custom.  It is used in setting the camera's focal length
  633.         if the camera is tracked to an object.  The Sharp/Fuzzy flag
  634.         turns the "fade" feature on and off - non-zero means on.
  635.         The "apparant size" parameter is 100 times the "custom size"
  636.         parameter in the camera requester.  And is used to set the
  637.         focal length for a custom lens.  The "resolve depth" controls
  638.         the number of rays the ray tracer will shoot for a single pixel.
  639.         Each reflective/refractive ray increments the depth counter, and
  640.         the count is never allowed to reach the "resolve depth".  If both
  641.         a reflective and a refractive ray are traced, each ray gets its
  642.         own version of the count - so theoretically, a resolve depth of
  643.         4 could allow much more than 4 rays to be traced.  The "genlock
  644.         sky" flag controls whether the sky will be colored, or set to
  645.         the genlock color (color 0 - black) in the final picture.
  646.  
  647.  
  648.     All of the INFO sub-chunks are optional, as is the INFO chunk.
  649.     Default values are supplied if the chunks are not present.  The
  650.     defaults are:  no brushes, stencils, or textures defined; no story
  651.     for the camera; horizon and zenith and ambient light colors set
  652.     to black; fade color set to (80,80,80);  un-rotated, un-tracked
  653.     camera at (-100, -100, 100); and global properties array set to
  654.     [30, 0, 0, 0, 0, 100, 8, 0].
  655.  
  656.  
  657.     EXTR sub-sub-chunks
  658.     -------------------
  659.  
  660.     MTRX - size 60
  661.  
  662.         VECTOR  Translate;      ; translation vector
  663.         VECTOR  Scale;          ; X,Y and Z scaling factors
  664.         MATRIX  Rotate;         ; rotation matrix
  665.  
  666.         The translation vector is i world coordinates.
  667.         The scaling factors are with respect to local axes.
  668.         The rotation matrix is with respect to the world axes,
  669.         and it should be a "unit matrix".
  670.         The rotation is such that a rotated axis's X,Y, and Z
  671.         components are the dot products of the MATRIX's I,J,
  672.         and K vectors with the un-rotated axis vector.
  673.  
  674.     LOAD - size 80
  675.  
  676.         BYTE    Filename[80];   ; the name of the external file
  677.  
  678.         This chunk contains the name of an external object file.
  679.         The external file should be a FORM TDDD file.  It may contain
  680.         an any number of objects possibly grouped into heirarchy(ies).
  681.  
  682.     Both of these chunks are required.
  683.  
  684.