Alias - Wavefront FileFormats
Alias - Wavefront FileFormats
Overview 2
Alias Pix 5
Matte 7
Alias Camera Depth 9
Polygons: Object-separated Triangle Output 11
Polygons: Object-separated Quadrilateral Output 14
Animation SDL 18
Maya IFF 24
Particle file 28
Bulge definition 30
Index 35
FileFormats - StudioTools19.5
FileFormats
2 - StudioTools 9.5
Alias File Formats
This document describes 2D image file formats
used by Studio.
For information on the 3D image file formats, see
Basic Tools -General.
(Note that the following 3D file formats are not
available on all platforms, including Studio 9.5 for
the Solaris Operating Environment: DBView,
Inventor, StyleGuide, OBJ.)
File Formats
1
Overview
The file formats are available in the following
operating environments.
File Formats
2
Overview
is, in most cases, a simple integer representing
the frame number.
• These subdirectories are typically found in the
user_data/demo or user_data/<project>
directories used by the interactive package.
• So for a user in the default demo project who
has output all the information to render an
animation to the file sdl/final, the renderer will
output pix files pix/final.1, pix/final.2,... and, if
requested, will also output matte files mask/
final.1, mask/final.2,...
• When rendering on fields, a trailing “o” or
“e” is appended to the end of the frame
number (for odd and even).
• Studio uses the “o'' extension to indicate that
this image has been rendered for the odd
field, and we assume that it is the odd field
that is displayed first, followed by the even
field. This assumption can be changed,
however, using Render → Globals and setting
the Image File Output to ODD FIRST or EVEN
FIRST.
File Formats
3
Overview
pix/final_right.2e
File Formats
4
Overview
Alias Pix
Systems
IRIX, Solaris, Windows NT
Description
An Alias pix file has a 10-byte header containing 5
short integers (there is no explicit magic number)
which is then followed immediately by image data
in a simple run-length encoded scheme.
Only RGB information is contained in the file.
Matte files are similar but exist in a separate file
(see Matte File Format for details).
bytes header value notes
0, 1 width x resolution in pixels
2, 3 height y resolution in pixels
4, 5 xoffset unused
6, 7 yoffset unused
8, 9 bits/pixel 24 for pix files (0x18)
Example
Here is the output of od -x for a pix file that is 8
pixels wide and 6 pixels high, representing a ramp
that goes from black at the bottom of the image to
blue at the top:
0000000 0008 0006 0000 0005 0018 08ff 0000 08cc
0000020 0000 0899 0000 0866 0000 0833 0000 0800
0000040 0000
0000042
File Formats
5
Alias Pix
This is read as describing an image that is 8 pixels
wide [0008] and 6 scanlines high [0006]. The next
four bytes describe the obsolete offset information.
This is a pix file since there are 24 bits/pixel [0018].
The first (top) scanline is composed of a run of 8
pixels of (B=255, G=0, R=0)[08ff 0000]. The next
scanline (since this one is complete) is 8 pixels of
(B=204, G=0, R=0) [08cc 0000]. The rest of the
scanlines are coded in the same fashion with the
last scanline of eight pixels of (B=0, G=0, R=0) [0800
0000].
File Formats
6
Alias Pix
Matte
Systems
IRIX, Solaris, Windows NT
Description
Alias matte files are a variant of Alias pix files.
bytes header value notes
0, 1 width x resolution in pixels
2, 3 height y resolution in pixels
4, 5 xoffset unused
6, 7 yoffset unused
8, 9 bits/pixel 8 for matte files (0x8)
Example
The following is an octal dump of an 8x6 Alias
matte file for a sphere that nearly fills the image:
0000000 0008 0006 0000 0005 0008 0100 0110 015f
0000020 02bf 015f 0110 0100 0100 015f 04ff 015f
0000040 0100 0100 01bf 04ff 01bf 0100 0100 01bf
0000060 04ff 01bf 0100 0100 015f 04ff 015f 0100
0000100 0100 010f 015f 02bf 015f 010f 0100
0000116
This is read as describing an image that is 8 pixels
wide [0008] and 6 scanlines high [0006]. The
next four bytes describe the obsolete offset
information.This is a matte file since there are 8
bits/pixel [0008].The description below shows
File Formats
7
Matte
the remainder of the file which describes the matte
from the top scanline to the bottom.
0100 - one pixel of 0/255 (0%) coverage,
0110 - one pixel of 16/255 (6%) coverage,
015f - one pixel of 95/255 (37%) coverage,
02bf - two pixels of 191/255 (75%) coverage,
015f - one pixel of 95/255 (37%) coverage,
0110 - one pixel of 16/255 (6%) coverage,
0100 - one pixel of 0/255 (0%) coverage.
File Formats
8
Matte
Alias Camera Depth
Systems
IRIX, Solaris, Windows NT
Description
An Studio Camera Depth file contains depth
information corresponding to the image created
from that camera. The Camera Depth file is used
for post-render 3D compositing. The file contains a
magic number, an X and Y resolution, and an array
of floating point depth values.
bytes header notes C-type
value
0, 1, 2, magic Uniquely identifies int
3 number files of this type
4, 5 width x resolution in pixels short
6, 7 height y resolution in pixels short
File Formats
9
Alias Camera Depth
* fill the array */
close( filein );
File Formats
10
Alias Camera Depth
Polygons: Object-separated
Triangle Output
Systems
IRIX, Solaris, Windows NT
Description
This format is used when polygons are exported
from Studio using File > Export > Polygons.
The following definitions are used to delineate
objects.
#define FLOAT_START 99999.0
#define FLOAT_END -FLOAT_START
File Formats
11
Polygons: Object-separated Triangle Output
u v /* U,V of vertex 3 */
etc... (defines another triangle)
FLOAT_END /* Marks the end of an object */
name /* - name of object just terminated */
FLOAT_START
etc....
Zero Count Objects
If the number of triangles for an object is zero (0),
then the object is a collection of other objects that
may or may not contain triangles or other sub-
groups of objects. In other words, zero count
objects describe the hierarchy or DAG of the model.
Example
For example, a model of an arm might look
something like the following (if translated into
plain text and formatted):
FLOAT_START
arm
0
FLOAT_START
hand
0
FLOAT_START
thumb
567
(567 triangles here)
FLOAT_END
thumb
FLOAT_START
finger
2143
(2143 triangles here)
FLOAT_END
finger
FLOAT_END
hand
FLOAT_START
forearm
345
File Formats
12
Polygons: Object-separated Triangle Output
FLOAT_END
forearm
(some other arm-related objects here)
FLOAT_END
arm
File Formats
13
Polygons: Object-separated Triangle Output
Polygons: Object-separated
Quadrilateral Output
Description
This format is used when quadrilateral polygons
are exported from Studio using File > Export >
Polygons.
The quadrilateral output file format allows
tessellated output in a form other than triangles,
and outputs texture information if it exists. (For
information on Windows > Information > Render stats,
see Rendering in Alias.)
Each quadrilateral corresponds to the subdivided
approximations to the surface created during the
Alias triangle tessellation phase of rendering. The
higher the surface subdivisions set in the Render
Stats spreadsheet editor, the more quadrilaterals
are produced for that surface.
If the object is textured on the color channel, each
quadrilateral can have a texture swatch on it. The
swatch is created by a uniform parametric
sampling of the texture across the quadrilateral. In
addition to the texture swatch, the name of the
texture assigned is included at the head of each
object, and the hierarchy of the model is
maintained.
In UNIX systems, you can access this feature by
setting a shell ENVIRONMENT variable from a UNIX
shell window, and then running Alias from that
window. The command to set this variable is as
follows:
setenv QUAD_OUTPUT 16
File Formats
14
Polygons: Object-separated Quadrilateral Output
The following definitions are used to delineate
objects.
#define FLOAT_START 99999.0
#define FLOAT_END -FLOAT_START
File Formats
15
Polygons: Object-separated Quadrilateral Output
fx fy fz /* Vertex 3, quadrilateral 1 */
u v /* U,V of vertex 3 */
nx ny nz /* Normal, vertex 4 */
fx fy fz /* Vertex 4, quadrilateral 1 */
u v /* U,V of vertex 4 */
s t /* Ints. for resolving text. swatch */
texture_swatch /* s times t Rgba structures. */
etc...
FLOAT_END /* Marks the end of an object */
name /* Name of object just terminated */
FLOAT_START
etc....
File Formats
16
Polygons: Object-separated Quadrilateral Output
FLOAT_END
elbow
(some other arm-related objects here)
FLOAT_END
arm
File Formats
17
Polygons: Object-separated Quadrilateral Output
Animation SDL
Systems
IRIX, Solaris, Windows NT
Description
An Animation SDL file is like a regular Scene
Description Language file (see File → Save SDL)
with an extra section to describe the model’s
hierarchies. An Animation SDL file has two sections,
DEFINITION and HIERARCHY.
File Formats
18
Animation SDL
}
}
{ <----- Another child of the picked object.
Apply animation to other child picked object.
}
}
File Formats
19
Animation SDL
specifies the CV on the curve. For example, if a face
is made up of 3 curves, then to refer to the 4th CV
on the 2nd curve of the face, the type statement is
written as:
type “Curve CV” (2, 4);
• For a Polyset Vertex, specify the vertex
number in the polyset.
type "Polyset Vertex" (62);
• No other animatable items have additional
information, so their parentheses should be
empty.
Applying the animation
The statements following the type statements
indicate how animation is applied to each of the
item’s animation parameters. These are called
channel statements, and specify how the animation
parameter uses the actions from the DEFINITION
section.
The general form of the channel statement is:
channel “channel name” (action_name [extract
axis] (action_name...));
File Formats
20
Animation SDL
Additional actions that are within additional
parentheses act as timewarps on the original curve
(see Anim → Time Warps → New time warp).
Example 2
The following is a commented example Animation
SDL file of an animated cylinder.
DEFINITION
/* the 3-D NURBS curve used by the motion path
action */
curve curve#2 (
degree = 3,
knots = (0.0, 0.0, 0.0, 1.0, 1.0 , 1.0 ),
cvs = (
cv( (0.0, 0.0, 0.0),1.0),
cv( (3.0, 3.0, 3.0),1.0),
cv( (-4.0, 2.0, -6.0),1.0),
cv( (-3.0, 2.0, 3.0),1.0) )
);
/* a motion path action */
motion_curve motion_path ( curve#2, in =
PRE_CONSTANT, out = POST_CONSTANT );
parameter_curve param_curve.X_Scale ( in =
PRE_CONSTANT, out = POST_CONSTANT, cvs = (
parameter_vertex(1.0 , 1.0 , TAN_SMOOTH, (1.0
,0.0), TAN_SMOOTH, (1.0 , 0.0) ),
parameter_vertex( 30.0 , 4.0 , TAN_SMOOTH,
(1.0 ,0.0), TAN_SMOOTH, (1.0 , 0.0) )
) );
parameter_curve param_curve.Z_Rotate ( in =
PRE_CONSTANT, out = POST_CONSTANT, cvs = (
parameter_vertex(1.0 , 0.0, TAN_SMOOTH, (-1.0 ,
0.0), TAN_SMOOTH, (1.0 , 0.0) ),
parameter_vertex(30.0 ,360.0 , TAN_SMOOTH, (-
1.0 , 0.0 ), TAN_SMOOTH, (1.0, 0.0) )
) );
File Formats
21
Animation SDL
parameter_curve timewarp ( in = PRE_IDENTITY, out
= POST_IDENTITY, cvs = (
parameter_vertex(1.0 , 1.0, TAN_SMOOTH, (-
0.70711,-0.70711 ), TAN_SMOOTH, (0.70711,0.70711)
),
parameter_vertex(30.0 ,30.0 ,TAN_SMOOTH, (-
0.70711,-0.70711 ),TAN_SMOOTH, (0.70711,0.70711) )
) );
parameter_curve param_curve.X_Position ( in =
PRE_CONSTANT, out = POST_CONSTANT, cvs = (
parameter_vertex(1.0 , -0.2612 , TAN_SMOOTH, (-
1.0 ,0.0), TAN_SMOOTH, (-1.0 ,0.0) ),
parameter_vertex( 30.0 , -0.18593, TAN_SMOOTH,
(-1.0 ,0.0), TAN_SMOOTH, (-1.0 ,0.0) )
) );
parameter_curve param_curve.Y_Position ( in =
PRE_CONSTANT, out = POST_CONSTANT, cvs = (
parameter_vertex(1.0 ,0.2612 , TAN_SMOOTH, (-
1.0 ,0.0 ), TAN_SMOOTH, (-1.0 ,0.0) ),
parameter_vertex( 30.0 , 0.58722, TAN_SMOOTH,
( -1.0 , 0.0 ), TAN_SMOOTH, (-1.0 ,0.0))
) );
parameter_curve param_curve.Z_Position ( in =
PRE_CONSTANT, out = POST_CONSTANT, cvs = (
parameter_vertex( 1.0 , 0.5 , TAN_SMOOTH, (
-1.0 , 0.0 ), TAN_SMOOTH, ( 1.0 , 0.0
) ),
parameter_vertex( 30.0, 0.90137, TAN_SMOOTH,
( -1.0 , 0.0 ), TAN_SMOOTH, (-1.0 ,0.0))
) );
HIERARCHY
{
type "Dag Node" ( cylinder );
File Formats
22
Animation SDL
/* The width of the cylinder is also animated.
*/
channel "X Scale" ( param_curve.X_Scale );
{
/* This is the first child of the top level */
/* of the cylinder. It spins around the Z */
/* axis. A timewarp has been applied. */
type "Dag Node" ( cyl_body );
channel "Z Rotate" ( param_curve.Z_Rotate (
timewarp ));
}
{
/* Cap A of the cylinder is not animated, */
/* nor are any of its CVs, but these braces */
/* are necessary to maintain to maintain the*/
/* hierarchy structure. */
/* If these braces were omitted Cap B's */
/* animation would be read onto Cap A. */
}
{
/* Cap B is not animated but one of its cvs */
/* is. */
{
type "Surface CV" ( 2, 4 );
/* Surface CV u = 2, v = 4 is animated. */
channel "X Position" ( param_curve.X_Position
);
channel "Y Position" ( param_curve.Y_Position
);
channel "Z Position" ( param_curve.Z_Position
);
}
}
File Formats
23
Animation SDL
Maya IFF
Systems
Windows NT.
Studio for Windows NT can read Maya IFF files
and save them as TIFF or Alias pix files.
Description
IFF stands for Image File Format.
•The basic element of an IFF file is a block,
sometimes called a chunk.
•Each block has an identifier called a tag or ID
and a block length to allow it to be skipped (in
some cases the block length is missing and the
end of the block is indicated by a special
marker).
•Several grouping block types allow the file to
be structured as a hierarchy.
File Formats
24
Maya IFF
list in a PROP block. A List has an extra tag
value to indicate what it is a list of.
•PROP further defines the properties of objects.
Groups
Four tags are used to arrange blocks into
groups: FORM, CAT, LIST, and PROP. The first
four characters following the size are used to
identify the type of the group.
is like
struct Text t = {
char *f = "Times";
char *c = "Hello World";
};
The size of the group (38) equals the size of the data
it contains (6 plus 12) plus the size of the headers (4
for TEXT, 8 for CHAR 6 and 8 for CHAR 12). In this
case, the result is 6+12+4+8+8 = 38.
As in C structures you can nest groups; for
example:
FORM 52 TEXT
FORM 8 FONT
CHAR 6 "Times"
LONG 4 <12>
LONG 4 <0>
CHAR 12 "Hello World"
EOF
or in C terms:
struct Text t = {
struct Font f = {
char *n = "Times";
int s = 12;
int d = 0;
};
char *string = "Hello World";
};
File Formats
25
Maya IFF
constrained to use a unique data type and may
contain the equivalent of a complete C structure.
The FORM tag separates independent blocks of
data that can be handled separately and specifies
the meaning of each subunit.
In the example above, the CHAR chunk in the
FONT FORM does not mean the same thing as the
CHAR chunk in the TEXT FORM. The FORM tag
determines how you interpret an ordered set of
data types.
The CAT tag defines a concatenation of
independent objects with no order relation between
them. Two typical uses of CATs are for libraries of
objects (pictures in Example 1) or clipboards
(Example 2).
Example 1:
CAT 3632 PICT
FORM 1234 PICT ...
FORM 2378 PICT ...
EOF
Example 2:
CAT 2130 CLIP
FORM 1234 PICT ...
FORM 876 DRAW ...
EOF
File Formats
26
Maya IFF
information:
LIST ... ANIM
PROP 44 PICT
IHDR 32 (common size info)
FORM ... PICT
BODY .... (data)
FORM ... PICT
BODY .... (data)
FORM ... PICT
BODY .... (data)
EOF
File Formats
27
Maya IFF
Particle file
Systems
IRIX, Solaris, Windows NT
Description
The Particle file format is a simple ASCII dump of
the current status of every particle in the system.
Rendering, mass, generator, and other information
is carried in the wire file or SDL file.
The file is all space separated:
Normal particles
For type 4 particles (normal), information for each
blob is described below.
Field Type Comments
<start_x> Float X position of particle at start of frame.
<start_y> Float Y position of particle at start of frame.
<start_z> Float Z position of particle at start of frame.
<end_x> Float X position of particle at end of frame.
<end_y> Float Y position of particle at end of frame.
<end_z> Float Z position of particle at end of frame.
<R> Float Red color of particle in this frame.
<G> Float Green color of particle in this frame.
<B> Float Blue color of particle in frame.
<cycles_left> Integer Number of cycles left in the particle’s life.
<cycles_total> Integer Total number of cycles in the particle’s
life.
File Formats
28
Particle file
information for each blob is described below.
Field Type Comments
<start_x> Float X position of particle at start of frame.
<start_y> Float Y position of particle at start of frame.
<start_z> Float Z position of particle at start of frame.
<end_x> Float X position of particle at end of frame.
<end_y> Float Y position of particle at end of frame.
<end_z> Float Z position of particle at end of frame.
<R> Float Red color of particle in this frame.
<G> Float Green color of particle in this frame.
<B> Float Blue color of particle in this frame.
<cycles_left> Integer Number of cycles left in the particle’s life.
<cycles_total> Integer Total number of cycles in the particle’s life.
<start_size> Float Size of particle at start of frame.
<end_size> Float Size of particle at end of frame.
File Formats
29
Particle file
Bulge definition
Systems
IRIX, Solaris, Windows NT
Description
The character builder feature (found in the Windows
→ Deformation control, under Frame Type:
CHARACTER BUILDER) allows you to create muscle
bulges on the geometry around skeleton bones. The
shape of these muscle bulges can be freely defined
using the Section editor in the CHARACTER BUILDER
frame type of the deformation control window.
You can define any number of bulge shapes. The
bulge definition shapes are not stored in the wire
file, but in an ASCII file called bulge_types which
resides in your misc_data directory of your current
project. The advantage of storing these bulge
shapes in a separate file outside of your wire file is
that you can build a catalogue of bulge shapes, and
reuse them from wire file to wire file, and even
from project to project (you can copy the
bulge_types file from one project directory to
another).
Caution!
Be careful when you modify or delete bulge
definitions in the interactive package.
When you “assign attributes” to a skeleton joint,
one of the attributes is the bulge definition. The
skeleton joint does not store the whole bulge
definition, but rather the bulge definition code.
Thus if you have several wire files that use the
same bulge definition and you modify the bulge
definition in the interactive package, you are
actually modifying the bulge definition for all wire
files that reference that bulge code. In particular, if
you delete a bulge definition in Studio, you may be
deleting a bulge definition that is used not only by
a skeleton joint in your current Studio session, but
also in any other wire file you may have previously
saved that used that bulge code.
In Studio, if you start to delete a bulge definition, a
confirm box will appear warning you to this effect.
File Formats
30
Bulge definition
The bulge_types file format
Each bulge shown in the Bulge Definitions Lister in
the Deformation Control window is defined in the
bulge_types file in the misc_data directory.
File Formats
31
Bulge definition
>> angle: 0
File Formats
32
Bulge definition
•A keypoint definition's first two values must
be greater than the previous definition's
corresponding values, if any exist.
•A keypoint definition's first two values must
be between 0.0 and 1.0, inclusive.
•A keypoint definition's third value must be
between -0.5 and 0.5, inclusive.
Example
A sample bulge definition (from the default
bulge_types file) is as follows:
>> bulge: “Generic” code: 5
>> angle: 0
>> 0.000000 0.000000
0.008335
>> 0.500000 0.500000
0.250000
>> 1.000000 1.000000
0.000000
>>
>> angle: 180
>> 0.000000 0.000000
0.000000
>> 1.000000 1.000000
0.000000
File Formats
33
Bulge definition
File Formats
34
Bulge definition
Index
A
ALIAS
camera depth file format, 9
depth map format, 9
file formats, 5
matte file format, 7
particles file format, 28
pix file format, 5
Alias pix 24
Animatable item types, 19
Animated
SDL files
example of, 21
Animation
parameters,
and Animation SDL files, 20
SDL files, 18
animation parameters, 20
Animation SDL files, 20
C
Channel statements 20
CVs
Curve, 19
surface, 19
D
DAG nodes, 19
Definition section
of Animation SDL file, 18
Depth
camera file format, 9
map format, 9
E
exporting
polygons 11, 14
F
File
> Export > Polygons 11, 14
file formats
polygons 11, 14
File Formats
35
Index
File formats, 5
camera depth files, 9
mask files, 7
matte files, 7
File formats, depth map, 9
H
Hierarchy section of Animation SDL file, 18
I
IFF files 24
L
Lights,
and Animation SDL files, 19
M
Mask
files,
format, 7
Matte
files,
format, 7
Maya files 24
O
object-separated quadrilateral format 14
object-separated triangle format 11
P
Pix
files,
format, 5
polygons
export format (quadrilateral) 14
export format (triangular) 11
exporting 11, 14
S
SDL
Animation files, 18
animation parameters, 20
example of, 21
SDL Animation files, 20
Shaders
and Animation SDL files, 19
File Formats
36
Index
Surface
CVs
and Animation SDL files, 19
T
Textures
and Animation SDL files, 19
TIFF 24
triangle file, how to read 13
Z
zero count objects 11
File Formats
37
Index