home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Hack-Phreak Scene Programs
/
cleanhpvac.zip
/
cleanhpvac
/
ISTG.ZIP
/
ISTG.DOC
< prev
Wrap
Text File
|
1997-08-23
|
39KB
|
875 lines
name: ISTG.DOC
FORM ISTG
---------
Unofficial Imagine Staging File Format
Rev 1.1 20-08-97 G. Scibilia
This is the Unofficial Staging File Format document for the
Imagine raytracer (Copyright Impulse Inc., Mpls, MN 55444).
This document is sent every so often to answer general questions
that users of the 3D rendering software, Imagine by Impulse
Inc. may have. It is aimed toward all users, especially coders
of third party add-ons or for users who have created their own
real time renderer.
If you find any errors or have answers to other frequently asked
questions that you would like to have included in this document,
please send e-mail to:
minix@arsenio.disi.unige.it (The Gant at ArtNouveaU)
or, via Fidonet, to:
2:332/211.24 (Gabriele Scibilia)
- Gabriele Scibilia
<G>SZ ~ ArtNouveaU
Imagine Mailing List, IML FAQer
========================================================================
First Version : March 6, 1995
Last Update : August 20, 1997
Revision Number : 1.1
CONTENTS:
========
SECTION 1 - Scope of this document
SECTION 2 - General informations
SECTION 3 - Data types
SECTION 4 - ISTG sub-chunks
SECTION 5 - SOBJ sub-sub-chunks
SECTION 6 - PC (80x86 CPU) notes
SECTION 7 - IFF file format notes
CLOSING - Closing statements and Disclaimer
========================================================================
SECTION 1 - Scope of this document
========================================================================
This text will describe Imagine's staging file format. It is beyond the
scope of this text to describe any of the file formats used for basic object,
spline objects, deform tool, or any other object types not mentioned below.
However, some of the data described below may apply to some of these
undocumented object formats. It is also not the intent of this document to
explain the implementation of the information contained in the ISTG files
(ie. what equations Impulse programmers use to represent Imagine's paths -
lighting models - forms geometry - tweening algorithms, etc.).
========================================================================
SECTION 2 - General informations
========================================================================
FORM ISTG is used by Impulse's Imagine for keyframe animation system data.
ISTG stands for "Imagine staging". The files contain keyframe actors
definitions, and can be extended to describe different types of actor
information.
The ISTG file is stored in Amiga (680x0) format, and conforms to the "IFF"
file format on that computer. On IBM (80x86) based machines, much of the
data refered to below will have to be byte reversed before it makes sense.
The IFF (interchange file format) format stores data in packets called
"chunks." Each chunk begins with a long word identifier <ID> in ascii
format. This identifier is immediately followed by a long word data-size.
The data-size is measured in bytes and descrbes how much data, following
the data-size long word, is part of the chunk identified by the <ID>.
Imagine's IFF structure supports nesting of these chunks. For more info on
the IFF standard, see the "Amiga ROM Kernal Reference Manual: Devices (3rd
Edition)."
Currently, in "standard IFF" terms, a FORM ISTG has only three supported
chunk types: a MAXF chunk, a LOOP chunk and a SOBJ chunk describing a
staging object data.
The FORM has one (obligatory) MAXF chunk followed by one (obligatory) LOOP
chunk followed by some number of SOBJ chunks.
The SOBJ chunk, in turn, is made up of smaller chunks with the standard IFF
structure: <ID> <data-size> <data>.
The MAXF and LOOP "sub-chunks" are relatively straightforward to interpret.
The SOBJ "sub-chunks" support staging objects and are slightly more
difficult to interpret. Currently, there are many types of supported SOBJ
sub-chunks.
In Imagine, the structure of the staging object is written in a SOBJ chunk
as follows:
1) A NAME chunk is written, naming the object.
2) A STGF chunk and a LYR0 is written, marking the start of the
object description.
3) Each LYR0 chunk is followed by one or more (or no one) CAMR (camera
actor) or GLB? (globals) or FIL? (object actor) or LIT? (light
source actor) or AXIS (track axis actor) chunks, describing the
object type.
4) Follow these chunks some number of position chunks, alignment,
size, association and special effects ones (depending on the choice
made when the Specify Type requester was called).
Reader software WILL FOLLOW the standard IFF procedure of skipping over any
un-recognized chunks -- and "sub-chunks" or "sub-sub-chunks". The
<data-size> field indicates how many bytes to skip. In addition it WILL
OBSERVE the IFF rule that an odd <data-size> may appear, in which case the
corredponding <data> field will be padded at the end with one extra byte to
give it an even size.
========================================================================
SECTION 3 - Data types
========================================================================
Now, on with the details (from an official Impulse text that describe
FORM TDDD, used by Impulse's Turbo Silver for 3D rendering data and by
Imagine for basic object file format).
First, there are several numerical fields appearing in the data, describing
actor positions, rotation angles, scaling factors, etc. They are stored as
"32-bit fractional" numbers, such that the true number is the 32-bit number
divided by 65536. So as an example, the number 3.14159 is stored as
(hexadecimal) 0x0003243F (ie. 0x0003243F / 65536 = 3.14159). This allows
the data to be independant of any particular floating point format. Numbers
stored in this format are typedef'ed as "FRACT"s below.
Second, there are several color (or RGB) fields in the data. They are
always stored as three UBYTEs representing the red, green and blue
components of the color. Red is always first, followed by green, and then
blue.
The three basic data types that will be refered to herein are:
BYTE : a single byte of data (char)
WORD : a two byte data field (short)
LONG : a four byte data field (long)
A "U" (ie. UBYTE) means unsigned.
The following "typedef"s are used below:
typedef LONG FRACT; /* 4 bytes */
typedef UBYTE COLOR[3]; /* 3 bytes */
typedef struct vectors {
FRACT X; /* 4 bytes */
FRACT Y; /* 4 bytes */
FRACT Z; /* 4 bytes */
} VECTOR; /* 12 bytes total */
========================================================================
SECTION 4 - ISTG sub-chunks
========================================================================
MAXF - size 2
UWORD MaxFrame; ; total frames in animation
Highest frame number as it appears in the Action editor.
LOOP - size 2
UWORD Looping; ; loop flags
; Bit 0 - loop animation
; Bits 1 thru 15 - reserved
========================================================================
SECTION 5 - SOBJ sub-sub-chunks
========================================================================
NAME - size 18
UBYTE Name[18]; ; a name for the staging actor (NULL terminated)
Object's name as it appears in the Name & Layer requester (objects are
also called actors as they move about on the stage). Used for tracking,
etc. There is a NAME chunk for each (named) actor. Each NAME chunk is
followed by one STGF chunk.
STGF - size 2
UWORD Flags; ; "stage only" object flags
; Bit 0 - bounding box
; Bit 1 - quick edges
; Bits 2 thru 5 - reserved
; Bit 6 - axis
; Bit 7 - light source
; Bits 8 thru 15 - reserved
There is a STGF chunk for each (named) actor. Each STGF chunk is
followed by one LYR0 (layer number, IM30+) chunk (see below).
LYR0 - size 2, IM30+
UWORD Layer; ; number indicating actor layer
Actor's layer as it appears in the Name & Layer requester. Each LYR0
chunk is followed by one or more (or no one) CAMR (camera actor) or GLB?
(globals) or FIL? (object actor) or LIT? (light source actor) or AXIS
(axis actor) chunks (see CAMR, GLB?, FIL?, LIT? and AXIS chunks).
GLB2 - variale size, IM20+
UWORD Flags; ; globals flags
; Bit 0 - genlock sky
; Bits 1 thru 15 - reserved
UWORD StartFrame; ; starting frame
UWORD EndFrame; ; ending frame
UWORD Flags; ; reserved
UWORD Blending; ; sky blending factor
FRACT Density; ; star field density
UWORD Flags; ; reserved
UWORD Transition; ; transition frame count
VECTOR Ambient; ; ambient color
VECTOR Horizon; ; horizon color
VECTOR PlusZenith; ; +zenith color
VECTOR MinusZenith; ; -zenith color
VECTOR Fog; ; fog color
FRACT FogBottom; ; fog bottom
FRACT FogTop; ; fog top
FRACT FogLength; ; fog length
UWORD Flags; ; reserved
UWORD Seq0; ; global brush max seq.
UWORD Flags; ; reserved
UWORD Seq1; ; backdrop picture max seq.
UBYTE Backdrop[256]; ; backdrop picture file name
UBYTE Length; ; length of global brush file name
UBYTE Global[Length]; ; global brush file name (not NULL terminated)
UBYTE OptionalPad ; if name has even length (see FILE description)
Please note that the above color values are stored as FRACT's and are
not limited to the 0 to 255 range of the usual UBYTE color values.
The "genlock sky" flag controls whether the sky will be colored, or set
to the genlock color (color 0 - black) in the final picture.
GLB3 - variale size, IM30+
UWORD Flags; ; reserved
UWORD StartFrame; ; starting frame
UWORD EndFrame; ; ending frame
UWORD Flags; ; reserved
UWORD Seq0; ; global brush max seq.
FRACT Density; ; star field density
UWORD Flags; ; reserved
UWORD Transition; ; transition frame count
VECTOR Ambient; ; ambient color
VECTOR Horizon; ; horizon color
VECTOR PlusZenith; ; +zenith color
VECTOR MinusZenith; ; -zenith color
VECTOR Fog; ; fog color
FRACT FogBottom; ; fog bottom
FRACT FogTop; ; fog top
FRACT FogLength; ; fog length
UWORD Flags; ; reserved
UWORD Seq1; ; backdrop picture max seq.
UBYTE Backdrop[256]; ; backdrop picture file name
UBYTE Length; ; length of global brush file name
UBYTE Global[Length]; ; global brush file name (not NULL terminated)
UBYTE OptionalPad ; if name has even length (see FILE description)
Same as above GLB2 chunk.
CAMR - size 22, IM30+
UWORD Flags; ; camera flags
; Bit 0 - Y size is focus distance
; Bit 1 - Y size is screen distance
; Bit 2 - ap. size is DOF width mult.
; Bit 3 - ap. size is actual size
; Bit 4 - eye sep. is screen width
; Bit 5 - eye sep. is actual size
; Bits 6 thru 15 - reserved
UWORD StartFrame; ; starting frame
UWORD EndFrame; ; ending frame
FRACT Multiplier; ; distance multiplier
FRACT Aperture; ; aperture size DOF
FRACT Separation; ; eye separation 3DS
UWORD Flags; ; reserved
UWORD Transition; ; transition frame count
This chunk contains the camera informations as them appear in the Camera
requester. The camera looks down its own Y axis, with the top of the
picture in the direction of the Z axis. The rotations are performed in
the order ZXY about the camera axes. A positive angle rotates Y toward
Z, Z toward X, and X toward Y for rotations about the X, Y, and Z axes
respectively. In Imagine, the lens focal length is altered changing the
length of the Y axis. To understand the focal length, imagine a 320 x
200 pixel rectangle perpendicular to, and centered on the camera's Y
axis. Any objects in the infinite rectangular cone defined by the
camera position and the 4 corners of the rectangle will appear in the
picture.
FILE - variable size
UWORD Flags; ; actor flags
; Bit 0 - reverse cycle motion
; Bits 1 thru 15 - reserved
UWORD StartFrame; ; starting frame
UWORD EndFrame; ; ending frame
UWORD Transition; ; transition frame count
UBYTE Length; ; length of object file name
UBYTE Name[Length]; ; object file name (not NULL terminated)
UBYTE OptionalPad; ; appears only if the name string has an even
; length -- so the total length of the name
; "block" (length + name + pad?) comes out even
Specifies the actor (normal object) informations.
FIL3 - variable size, IM30+
UWORD Flags; ; actor flags
; Bit 0 - reverse cycle motion
; Bit 1 - spline interpolation
; Bit 2 - discontinuous knot
; Bits 3 thru 15 - reserved
UWORD StartFrame; ; starting frame
UWORD EndFrame; ; ending frame
FRACT Cyc0; ; number of cycles to perform
FRACT Cyc1; ; initial cycle phase
FRACT Vel0; ; velocity scaling #0
FRACT Vel1; ; velocity scaling #1
UBYTE Length; ; length of object file name
UBYTE Name[Length]; ; object file name (not NULL terminated)
UBYTE State[18] ; state name (NULL terminated)
UBYTE OptionalPad ; if name has even length (see FILE description)
Note that velocity scaling sets Imagine to adjust the velocity of
objects at the beginning and the end of key frame positions, entering
different values from 0 to 2 will make objects ease in and ease out.
LITE - size 22
UWORD Flags; ; light source flags
; Bit 0 - spherical
; Bit 1 - cylindrical
; Bit 2 - conical
; Bit 3 - cast shadows
; Bit 4 - diminish intensity
; Bits 5 thru 15 - reserved
UWORD StartFrame; ; starting frame
UWORD EndFrame; ; ending frame
VECTOR Intensity; ; light intensity
UWORD Flags; ; reserved
UWORD Transition; ; transition frame count
This has seperate R, G & B intensities for the light actors. Note
that these color values are stored as FRACT's and are not limited to
the 0 to 255 range of the usual UBYTE color values so lights can be
brighter than 255 255 255.
LIT2 - size 22, IM30+
UWORD Flags; ; light source flags
; Bit 0 - point source
; Bit 1 - parallel rays
; Bit 2 - round shape
; Bit 3 - rectangular
; Bit 4 - cast shadows
; Bit 5 - diminish intensity
; Bit 6 - controlled falloff
; Bit 7 - no lens flare
; Bits 8 thru 15 - reserved
UWORD StartFrame; ; starting frame
UWORD EndFrame; ; ending frame
VECTOR Intensity; ; light intensity
UWORD Flags; ; reserved
UWORD Transition; ; transition frame count
See above LITE chunk.
AXIS - size 6
UWORD Flags; ; reserved
UWORD StartFrame; ; starting frame
UWORD EndFrame; ; ending frame
Defines start and end where the track object will appear. The Axis
actor can be used as an invisible tracked object.
POSN - size 12
VECTOR Position; ; the actor's position
This is the end frame position (in world-space coordinates) of the
actor's axes as it appears in the Tween Position requester. Legal
coordinates are in the range -32768 to 32767 and 65535/65536.
Currently, the ray-tracer only sees objects in the -1024 to 1024 range.
Light sources, and the camera may be placed outside that range, however.
POS2 - size 26, IM30+
UWORD Flags; ; position flags
; Bit 0 - spline interpolation
; Bit 1 - discontinuous knot
; Bits 2 thru 15 - reserved
UWORD StartFrame; ; starting frame
UWORD EndFrame; ; ending frame
VECTOR Position; ; the actor's position
FRACT Vel0; ; velocity scaling #0
FRACT Vel1; ; velocity scaling #1
See POSN description, this chunk replaces old POSN ones.
PTH2 - variable size, IM20+
UWORD Flags; ; reserved
UWORD StartFrame; ; starting frame
UWORD EndFrame; ; ending frame
UWORD Flags; ; reserved
UWORD AccFrames ; (de)acceleration frames
FRACT StartSpeed ; starting speed (units / frames)
UWORD Flags; ; reserved
UWORD DecFrames ; (ac)deceleration frames
FRACT EndSpeed ; ending speed (units / frames)
UBYTE Length; ; length of path name
UBYTE Name[Length]; ; path name (not NULL terminated)
UBYTE OptionalPad ; if name has even length (see FILE description)
This chunk contains the path name as it appears in the Follow Path
requester.
ALGN - size 18
UWORD Flags; ; reserved
UWORD StartFrame; ; starting frame
UWORD EndFrame; ; ending frame
VECTOR Alignment; ; the actor's alignment angles
The rotation angles are in degrees, and specify rotations around the
X, Y, and Z axes. If they are all zero, the actor's axes are aligned
with the world coordinate axes.
ALN2 - size 26, IM30+
UWORD Flags; ; alignment flags
; Bit 0 - spline interpolation
; Bit 1 - discontinuous knot
; Bits 2 thru 15 - reserved
UWORD StartFrame; ; starting frame
UWORD EndFrame; ; ending frame
VECTOR Alignment; ; the actor's alignment
FRACT Vel0; ; velocity scaling #0
FRACT Vel1; ; velocity scaling #1
Replaces old ALGN chunks, sets object's rotation over time.
PALN - size 6
UWORD Flags; ; alignment flags
; Bit 0 - keep Y horizontal
; Bit 1 - conform group to path
; Bit 2 - conform object to path
; Bits 3 thru 15 - reserved
UWORD StartFrame; ; starting frame
UWORD EndFrame; ; ending frame
The object is made to follow a pre-defined path as it moves, rotates
and scales from one key frame to the next.
TALN - variable size
UWORD Flags; ; reserved
UWORD StartFrame; ; starting frame
UWORD EndFrame; ; ending frame
FRACT StartRot; ; initial Y rotation
FRACT EndRot; ; final Y rotation
UBYTE Length; ; length of track name
UBYTE Name[Length]; ; track name (not NULL terminated)
UBYTE OptionalPad ; if name has even length (see FILE description)
This chunk specifies the name of an object that the actor is "tracked"
to as it moves, rotates or scales as it appears in the Track Object
requester. If the name is NULL, the actor doesn't track.
OSIZ - size 18
UWORD Flags; ; reserved
UWORD StartFrame; ; starting frame
UWORD EndFrame; ; ending frame
VECTOR Size; ; actor size info
The sizes are used in a variety of ways depending on the actor type.
For custom objects, they are the lengths of the coordinate axes drawn
in the editor.
OSZ2 - size 26
UWORD Flags; ; size flags
; Bit 0 - spline interpolation
; Bit 1 - discontinuous knot
; Bits 2 thru 15 - reserved
UWORD StartFrame; ; starting frame
UWORD EndFrame; ; ending frame
VECTOR Size; ; actor size info
FRACT Vel0; ; velocity scaling #0
FRACT Vel1; ; velocity scaling #1
See above OSIZ chunk.
HING - variable size
UWORD Flags; ; reserved
UWORD StartFrame; ; starting frame
UWORD EndFrame; ; ending frame
UBYTE Length; ; length of hinge name
UBYTE Name[Length]; ; hinge name (not NULL terminated)
UBYTE OptionalPad ; if name has even length (see FILE description)
This is Imagine's hinge data as it appears in the Hinge requester.
ASSC - variable size, IM30+
UWORD Flags; ; reserved
UWORD StartFrame; ; starting frame
UWORD EndFrame; ; ending frame
UBYTE Length; ; length of associate name
UBYTE Name[Length]; ; associate name (not NULL terminated)
UBYTE OptionalPad ; if name has even length (see FILE description)
Causes object to tack onto the associated object and keep its relative
distance, rotation and so on. This replaces old HING chunks.
SPFX - variable size
UWORD Flags; ; see below
UWORD StartFrame; ; starting frame
UWORD EndFrame; ; ending frame
UBYTE Length; ; length of effect name
UBYTE Name[Length]; ; effect name (not NULL terminated)
UBYTE OptionalPad ; if name has even length (see FILE description)
UBYTE FxData[size]; ; effect data - variable size
This is the effect 1 data chunk. The Name string describes what kind of
information is actually stored within the FxData[] array. This one and
the Flags are interpreted as follows depending upon the effect type:
animbrsh - animated brush effect
; animbrsh flags
; Bits 0 thru 15 - reserved
UWORD Flags; ; reserved
UWORD FirstFrame; ; first frame
UWORD Flags; ; reserved
UWORD LastFrame; ; last frame
UBYTE Brush[256]; ; brush name
(264 bytes total)
baloon - ballon effect
; baloon flags
; Bit 0 - inside within object
; Bit 1 - circumscribe about object
; Bit 2 - use average radius
; Bit 3 - set radius to
; Bit 4 - use average radius
; Bit 5 - reverse baloon timing
; Bit 6 - return to original shape
; Bits 7 thru 15 - reserved
FRACT Radius; ; ballon radius
(4 bytes total)
boing2 - boing effect
; boing flags
; Bit 0 - squash to +(XY or Z)
; Bit 1 - squash to center
; Bit 2 - squash to -(XY or Z)
; Bit 3 - X axis
; Bit 4 - Y axis
; Bit 5 - Z axis
; Bits 6 thru 15 - reserved
FRACT Shrink; ; shrink factor
LONG Count; ; number of times
(8 bytes total)
explode - explode effect
; explode flags
; Bit 0 - spherical
; Bit 1 - radial
; Bit 2 - linear
; Bit 3 - X axis
; Bit 4 - Y axis
; Bit 5 - Z axis
; Bit 6 - return to original positions
; Bit 7 - reverse explosion timing
; Bits 8 thru 15 - reserved
FRACT Distance; ; explosion distance
FRACT Angle; ; explosion angle
FRACT Scaling; ; triangle scaling
FRACT MinRotations; ; minimum number of triangle rotations
FRACT MaxRotations; ; maximum number of triangle rotations
LONG Seed; ; random number seed
(24 bytes total)
firewrks - fireworks effect
; explode flags
; Bit 0 - spherical
; Bit 1 - radial
; Bit 2 - linear
; Bit 3 - X axis
; Bit 4 - Y axis
; Bit 5 - Z axis
; Bit 6 - make faces sparkle
; Bits 7 thru 15 - reserved
FRACT Distance; ; explosion distance
FRACT Angle; ; expansion angle
FRACT Scaling; ; triangle scaling
FRACT MinRotations; ; minimum number of triangle rotations
FRACT MaxRotations; ; maximum number of triangle rotations
FRACT Count; ; frame count for expansion
FRACT Fall; ; distance to fall by end
LONG Seed; ; random number seed
(32 bytes total)
flash - flash effect
; flash flags
; Bit 0 - start on
; Bit 1 - start off
; Bits 2 thru 15 - reserved
UWORD Flags; ; reserved
UWORD OnFrames; ; on frames
UWORD Flags; ; reserved
UWORD OffFrames; ; off frames
(8 bytes total)
grow - grow effect
; grow flags
; Bit 0 - align Y topath direction
; Bit 1 - keep X in path's XY plane
; Bit 2 - mirror ends
; Bit 3 - time reversed
; Bit 4 - sharp extrusion
; Bits 5 thru 15 - reserved
FRACT YRotation; ; Y rotation
FRACT XScaling; ; X scaling
FRACT ZScaling; ; Z scaling
FRACT XTranslate; ; X translate
FRACT ZTranslate; ; Z translate
(20 bytes total)
particle - particle effect
; particle flags
; Bit 0 - delayed
; Bit 1 - rain
; Bit 2 - bounce
; Bit 3 - taper
; Bit 4 - emission
; Bit 5 - reverse timing
; Bit 6 - return to original positions
; Bits 7 thru 15 - reserved
FRACT Distance; ; travel distance
FRACT Scaling; ; triangle scaling
FRACT Delay; ; scaling delay
FRACT MinRotations; ; minimum number of rotations
FRACT MaxRotations; ; maximum number of rotations
FRACT HVelocity; ; time to terminal horizontal velocity
FRACT Gravity; ; gravitational constant
LONG Seed; ; random number seed
FRACT Elasticity; ; elasticity
FRACT ZVelocity; ; time to terminal Z velocity
FRACT Ground; ; ground Z coordinate
FRACT Speed; ; speed factor
FRACT MinAngleZ; ; minimum angle from Z
FRACT MaxAngleZ; ; maximum angle from Z
FRACT MinAngleX; ; minimum angle from X
FRACT MaxAngleX; ; maximum angle from X
FRACT WindSpeed; ; wind speed
FRACT WindAngle; ; wind angle
FRACT WindStart; ; wind start
FRACT WindStop; ; wind stop
FRACT Emission; ; emission amount
UBYTE Subgroup[18]; ; subgroup name (NULL terminated)
UWORD Flags; ; reserved
(108 bytes total)
ripple - ripple effect
; ripple flags
; Bit 0 - radial around Z
; Bit 1 - linear along X
; Bits 2 thru 15 - reserved
FRACT Length; ; wave length
FRACT Amplitude; ; Z amplitude
FRACT Distance; ; travel distance
LONG Ripples; ; ripple count
(16 bytes total)
rotate2 - rotate effect
; rotate2 flags
; Bit 0 - X axis
; Bit 1 - Y axis
; Bit 2 - Z axis
; Bits 3 thru 15 - reserved
FRACT Degrees; ; rotation degrees
(4 bytes total)
shredder - shredder effect
; shredder flags
; Bit 0 - whole object as parts
; Bit 1 - use def. subgroups as parts
; Bit 2 - la machine
; Bit 3 - bounce particle
; Bit 4 - flip on bounce
; Bit 5 - use maximal bounding sphere
; Bit 6 - use minimal bounding sphere
; Bit 7 - use average bounding sphere
; Bits 8 thru 15 - reserved
LONG MaxTriangles; ; maximum number of triangles in group
UBYTE Subgroup[18]; ; subgroup name (NULL terminated)
UWORD Flags; ; reserved
FRACT StartTime; ; start time
FRACT EndTime; ; end time
FRACT ExplosionDelay; ; explosion timing delay
LONG HoldAt; ; hold at
FRACT Ground; ; ground Z position
FRACT MinElasticity; ; minimum elasticity
FRACT MaxElasticity; ; maximum elasticity
FRACT MinVelocity; ; minimum initial velocity range
FRACT MaxVelocity; ; maximum initial velocity range
FRACT MinRotations; ; minimum triangle rotations
FRACT MaxRotations; ; maximum triangle rotations
FRACT MinTrajectory; ; minimum particle trajectory
FRACT MaxTrajectory; ; maximum particle trajectory
FRACT MinScaling; ; minimum final scaling factor range
FRACT MaxScaling; ; maximum final scaling factor range
FRACT Acceleration; ; gravitational acceleration
FRACT UnitsPerMeter; ; Imagine units per meter
LONG Seed; ; random number seed
(96 bytes total)
spike - spike effect
; spike flags
; Bit 0 - linearly along Z
; Bit 1 - cylindrically around Z
; Bit 2 - radially from axis
; Bit 3 - restrict to integral cycles
; Bit 4 - reverse spike timing
; Bit 5 - return to starting shape
; Bits 6 thru 15 - reserved
FRACT MinDistance; ; minimum spike distance
FRACT MaxDistance; ; maximum spike distance
FRACT MinCycles; ; minimum spike cycles
FRACT MaxCycles; ; maximum spke cycles
FRACT Dispersion; ; dispersion adjust
LONG Seed; ; random number seed
(24 bytes total)
sway - group sway effect
; sway flags
; Bit 0 - random axis
; Bit 1 - Z axis
; Bit 2 - X axis
; Bit 3 - Y axis
; Bit 4 - restrict to int. gyrations
; Bits 5 thru 15 - reserved
FRACT MinGyrations; ; minimum number of gyrations
FRACT MaxGyrations; ; maximum number of gyrations
FRACT MinAngle; ; minimum gyration angle
FRACT MaxAngle; ; maximum gyration angle
LONG Seed; ; random number seed
(20 bytes total)
tumble - tumble effect
; tumble flags
; Bit 0 - random axis
; Bit 1 - Z axis
; Bits 2 thru 15 - reserved
FRACT MinRotations; ; minimum number of rotations
FRACT MaxRotations; ; maximum number of rotations
LONG Seed; ; random number seed
(12 bytes total)
S?FX - variable size
See SPFX above chunk. Up to four special effects can be applied to an
object at one time.
========================================================================
SECTION 6 - PC (80x86 CPU) notes
========================================================================
The IFF file format originated on machines in which the byte order for
LONG (4 byte) and WORD (2 byte) data is "most significant byte first".
This concept has been preserved in the "PC" versions of Imagine.
What it means, is that if you are writing code for the "other" type of CPU
(80386 code, for example), you will need to reverse the byte ordering in
(U)LONG, FRACT, and (U)WORD data wherever it appears (eg. the FRACTs in
a VECTOR structure must be (separatly) byte reversed... the size field
following a chunk identifier is another good example).
From the Imagine Object File Format document, by Scotty Kirvan.
========================================================================
SECTION 7 - IFF file format notes
========================================================================
In case you are unfamiliar with the IFF file structure, the ISTG files
have the following (simple, "single FORM") IFF structure (again, from the
description of Turbo Silver TDDD chunk):
form_ID 4 characters: 'F','O','R','M'
form_size LONG size : -- MSB(yte) first
form_type 4 characters: 'I','S','T','G'
chunks:
chunk_ID 4 characters: eg. 'S','O','B','J'
chunk_size LONG size : -- byte reversed if appropriate
chunk_data 'size' bytes:
chunk_pad 0 or 1 bytes: -- pad to even length if 'size' is odd
Note: The "form_size" field appearing after the "form_ID" is the total
length of the data that FOLLOWS it, INCLUDING the 4-byte (ISTG) id.
Also the "chunk_size" fields list the size of the data in the
"chunk_data" blocks that follow. In other words, the size fields
when rounded up to an even number, always list the number of bytes
(after the size field) to skip forward in the file if, based on the
ID field preceding the size, the reader can not or does not wish to
interpret the data... so, in particular, the sizes that appear DO NOT
include the length of the ID and size fields themselves, and the
'form_size' DOES include 4 bytes for the 'form_type' field that
follows it.
========================================================================
CLOSING - Closing statements and Disclaimer
========================================================================
Hopefully this document is useful to people out there. Once again, if
there is anything you want added/changed/deleted, please e-mail as listed
at the top of the document.
The information presented herein
What follows is a small disclaimer so no one gets sued for information
that is harmful or accidentally incorrect or misleading (if you find a
mistake... please send e-mail so it can be fixed).
Disclaimer: There is no guarantee regarding any information
presented in this document. The information may not
be correct, useful or helpful. Knowledge is
dangerous - use at your own risk. No warranties are
made or implied, and no liability or responsibility
is assumed. Good luck and enjoy.
========================================================================
END OF ISTG.DOC
/\_
| | "Gabriele Scibilia aka <G>SZ ~ ArtNouveaU"
| O | "minix@arsenio.disi.unige.it"
| | "2:332/211.24@FidoNet.org"
| O | "Imagine Mailing List,IML FAQer" ae(-_^)ue
|___| _ __ ___ ______Wizard signing off