Also Known As: Textual Three-Dimensional Data Description
|Maximum Image Size||Unlimited|
|Multiple Images Per File||Yes|
|See Also||IFF, TDDD|
Used primarily as a method of editing and interchanging TDDD file format information.
For a complete understanding of TTDDD you need to read about the IFF and TDDD file formats as well.
Vendor specifications are available for this format.
Code fragments are available for this format.
The TTDDD (Textual Three-Dimensional Data Description format) is an ASCII data representation of the TDDD (T3D) file format used by Impulse for its Turbo Silver and Imagine rendering and animation software products. In fact, so much of the information in the TDDD specification is relevant to TTDDD that no official separate TTDDD file format specification has ever been written.
For Further Information
TTDDD was created as part of two, now obsolete, programs, ReadTDDD and WriteTDDD. These programs were capable of reading a TDDD file and writing out a TTDDD file and vice versa. They have now been replaced by the newer T3DLIB shareware library and utilities. (See "For Further Information" later in this article for more details about T3DLIB.)
All TTDDD files are simple ASCII files that may be read with any text editor. Each line contains a 4-letter case-insensitive keyword, followed by an optional parameter name and one or more values. Array subscripts need not be contained within double quotes. Comments may appear in TTDDD files in the form of the standard C comment tokens /* */ surrounding the comment, or the TeX token % appearing at the beginning of the comment. Here are some examples of valid keyword/parameter/value combinations:
NAME "Fred" % Keyword and value NAME Fred % Same, but no double quotes BRSH="Brush 0" % String assigned to array element 0 BRSH 0 =Brush 0 % Same, but no double quotes or brackets OBSV Focal 2.82 % Keyword, parameter, and one value OBSV Rotate Z=2.7 X=4.3 % Keyword, parameter, and two values FADE FadeTo 23 99 254 % Keyword, parameter, and three values OSTR Info ABS_TRA Z_ALIGN % Keyword, parameter, and two flags
TTDDD files do not have a header, other than possibly a few comment lines identifying the file contents, author, and time and date of creation. The actual vector data is organized as a series of chunks, each enclosed by a BEGIN and END keyword pair. The INFO chunk usually appears first in older TTDDD files. Newer TTDDD files do not typically have an INFO chunk because the Imagine product does not use them.
An example of an INFO chunk is shown here:
INFO Begin NAME "Gizmo" BRSH="This is the IFF ILBM filename of Brush 0" BRSH 1 ="Brush 1" % Brackets are optional. STNC "Stencil 0 filename" % etc. TXTR Texture % Quotes not necessary here. OBSV Camera X=5.0 Y=2.7 Z=5.3 % Default: -100 -100 100 OBSV Rotate Z=2.7 X=4.3 % In this case, Y=0.0 OBSV Focal 2.82 OTRK "Object for Camera Tracking" % If parameters are too long, % they are simply truncated. OSTR Path "Path object name" OSTR Translate X=2.8 Y=7.3 Z=2.1 % Defaults to zero. OSTR Rotate Y=90 % Defaults to zero. OSTR Scale 2.5 OSTR Info ABS_TRA Z_ALIGN % Keep all flags on THIS LINE! FADE FadeAt 50.0 FADE FadeBy 500 FADE FadeTo 23 99 254 % "R=23 G=99 B=254" % Defaults to 80 80 80 SKYC Horizon R=12 B=30 % Defaults to zero. SKYC Zenith R=2 B=50 AMBI 5 27 32 % Also RGB GLB0 5 % Edging GLB0 1 2 % Perturb GLB0 255 % Sky_Blend GLB0 2 % Lens GLB0 4 1 % Fade GLB0=9 % Size GLB0 6 =2 % Resolve GLB0 0 % Extra End INFO
The order of data within each Begin/End block pair is completely arbitrary, except for variable-length arrays. These arrays must begin with the Count field, specifying the number of entries in the array, followed by the values for the array starting with the first element.
Following the INFO chunk will always be one OBJ chunk per object hierarchy stored in the TTDDD file. Each OBJ chunk contains one DESC sub-chunk or an EXTR sub-chunk. DESC sub-chunks describe object data stored internally within the TTDDD file. EXTR sub-chunks describe the same type of data stored in an external file. Newer TTDDD files typically do not have EXTR sub-chunks. External information is usually imported directly into the TTDDD file as a DESC sub-chunk.
Following is an example of a DESC and an EXTR sub-chunk:
OBJ Begin /* ** DESC sub-chunk */ DESC Begin NAME "Gizmo" % Object name. Defaults to no name SHAP Shape 2 % This must be supplied! SHAP Lamp 0 % ditto POSI X=5.7 Y=200.9 Z=132.7 % Defaults to zero. AXIS XAxis X=1 % Defaults to 1 0 0 AXIS YAxis Y=1 % Defaults to 0 1 0 AXIS ZAxis Z=1 % Defaults to 0 0 1 SIZE X=1 Y=1 Z=1 % Defaults to 32.0 PNTS PCount 3 PNTS Point 12 27 52 % Brackets and "X=..." optional PNTS Point 1 21 72 25 % ditto PNTS Point 72 25 21 % ditto EDGE ECount 3 EDGE Edge 0 1 % Edge connection between two points EDGE Edge 1 1 2 % Brackets optional EDGE Edge 2 2 0 FACE TCount 1 FACE Connect 0 1 2 % List of 3 edges to make a triangle COLR 87 23 232 % RGB. Defaults to 240 240 240 REFL G=12 R=240 B=97 % RGB. Defaults to zero. TRAN 25 72 53 % RGB. Defaults to zero. CLST Count 1 % Must match TCount above. CLST Color 240 12 57 % RGB. Defaults to 240 240 240 RLST Count 1 % Must match TCount above. RLST Color 120 24 23 % RGB. Defaults to zero. TLST Count 1 % Must match TCount above. TLST Color 255 92 87 % RGB. Defaults to zero. TPAR 42.73 TPAR=72.67 % Defaults to zero. SURF=0 SURF 1 % Defaults to zero. MTTR Type 4 % Defaults to zero. MTTR Index 2.972 % Defaults to 1.0. % (1.00 <= Index <= 3.55) SPEC Specularity 28 % Defaults to zero. SPEC Hardness 16 % Defaults to zero. PRP0 100 % Blending factor. Defaults to 255. PRP0=5 % Roughness factor. Defaults to 0. PRP0 2 =1 % Shading On/Off flag (1/0). % Defaults to 1. PRP0 1 % Phong shading flag. Defaults to 1 PRP0=0 % Glossy flag. Defaults to 0 PRP0 5 1 % Quickdraw flag. Defaults to 1 INTS 200 % Defaults to 300 STRY Path "Path object name" STRY Translate 2.8 7.3 2.1 % Defaults to zero. STRY Rotate Z=90 % Defaults to zero. STRY Scale 3.5 STRY Info ABS_TRA X_ALIGN % Keep all the flags on THIS LINE! End DESC % Possible child (including external) objects go here to % build object hierarchy. /* ** EXTR sub-chunk */ EXTR Begin MTRX Translate 34 72 56 % Defaults to zero. MTRX Scale 1 5 9 % Defaults to 1. MTRX Rotate 1 0 0 0 1 0 0 0 1 % A Matrix MUST be in the proper order! LOAD "External file name" End EXTR TOBJ % Ends current object hierarchy. End OBJ
For further information about TTDDD, see the documentation included on the CD-ROM. TTDDD was created by Glenn M. Lewis for his shareware package T3DLIB. The current revision of T3DLIB contains many useful utilities and a platform-independent library for C programmers to use that allows easy manipulation of TDDD objects algorithmically.
You can obtain the T3DLIB package via FTP from any Aminet site, such as:
The T3DLIB files have R42 in their names.
You can also contact the author for information:
Glenn M. Lewis
8341 Olive Hill Court
Fair Oaks, CA 95628
Copyright © 1996, 1994 O'Reilly & Associates, Inc. All Rights Reserved.