
to display the Polygon File Output Options box.

Render stats, or if the Quality Type is set to GLOBAL in the Render Globals Quality Parameters window (Render
Globals). See the following.
Render stats or Render
Globals for more information. Note: The Triangles format can be used with the sla and surfmate standalones.
#define FLOAT_START 99999.0
#define FLOAT_END -FLOAT_START
Each triangle file is composed of lists of numbers output in machine format. A triangle is made up of three normals, vertices, colors, and parametric coordinates. Objects are delineated by two arbitrary floating point values, which are too large to be valid surface normal values. The starting floating point value marking an object is followed by a null terminated string (the object's name), a single integer representing a count of the number of triangles in this object, and finally, the name of the texture applied to this object (if any).
FLOAT_START /* Marks start of an object (float) */
name /* A NULL terminated string (chars) */
count /* Number of triangles to follow. (int) */
texture_name /* A NULL terminated string (chars) naming */
nx ny nz /* Normal, vertex 1 (floats)*/
fx fy fz /* Vertex 1, triangle 1 (floats)*/
cr cg cb /* The color of vertex 1. 0-255 (floats) */
u v /* U,V of vertex 1 (floats) */
nx ny nz /* Normal, vertex 2 */
fx fy fz /* Vertex 2, triangle 1 */
cr cg cb /* The color of vertex 2. 0-255 */
u v /* U,V of vertex 2 */
nx ny nz /* Normal, vertex 3 */
fx fy fz /* Vertex 3, triangle 1 */
cr cg cb /* The color of vertex 3. 0-255 */
u v /* U,V of vertex 3 */
etc...
FLOAT_END /* Marks the end of an object */
name /* - name of object just terminated */
FLOAT_START
etc....
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
(3 other fingers here)
FLOAT_END
hand
FLOAT_START
elbow
345
(345 triangles here)
FLOAT_END
elbow
(some other arm-related objects here)
FLOAT_END
arm
For an example of how to read a triangle file, see /usr/alias/Gifts/src/reader/reader.c
Should the object be textured on the color channel, each quadrilateral can have a texture swatch on it. The swatch is created by doing 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.
This feature is accessed by setting a shell ENVIRONMENT variable from a Unix shell window, and then running Alias from that window. The command to set the ENVIRONMENT variable is as follows:
setenv QUAD_OUTPUT 16
The following defines are used to delineate objects.
#define FLOAT_START 99999.0
#define FLOAT_END -FLOAT_START
Quadrilateral files are composed of lists of numbers output in binary encoded format (that is, not human readable). A quadrilateral is made up of four normals, vertices, and parametric coordinates. Objects are delineated by two arbitrarily large floating point values, which are too large to be valid surface normal values.
The starting floating point value marking an object is followed by a null terminated string (the object's name), a single integer representing a count of the number of quadrilaterals in this object, and then if the number of quadrilaterals is non-zero, the NAME of the texture applied to the object (if any). If there is no texture applied to the object, a single, null character is printed.
Note: In some cases, Alias is forced to write triangles instead of quadrilaterals- near the edge of trim curves, some faces, triangle polysets, and so on. In such a case, a quadrilateral is printed for every field in the last vertex that is set to 111.3, and the texture array is always 1 by 1. (The number 111.3 was chosen because it is a floating point number that gets written exactly with fprintf. Not all floating point numbers have this property).
FLOAT_START /* Marks start of an object (float) */
name /* A NULL terminated string (chars) */
count /* Number of quads to follow. (int) */
texture_name /* A NULL terminated string (chars) naming */
nx ny nz /* Normal, vertex 1 (floats)*/
fx fy fz /* Vertex 1, quadrilateral 1 (floats)*/
u v /* U,V of vertex 1 (floats) */
nx ny nz /* Normal, vertex 2 */
fx fy fz /* Vertex 2, quadrilateral 1 */
u v /* U,V of vertex 2 */
nx ny nz /* Normal, vertex 3 */
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 /* Two ints for resolution of texture 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....
If the number of quadrilaterals for a given object is zero (0), then the object is a collection of other objects that may or may not contain quadrilaterals, or other sub-groups of objects. In other words, the zero count objects describe the hierarchy or DAG associated with the model.
For example, a model of an arm might look something like this (if translated into plain text and formatted).
FLOAT_START
arm
0
FLOAT_START
hand
0
FLOAT_START
thumb
567
(567 quadrilaterals here)
FLOAT_END
thumb
FLOAT_START
finger
2143
(2143 quadrilaterals here)
FLOAT_END
finger
(3 other fingers here)
FLOAT_END
hand
FLOAT_START
elbow
345
(345 quadrilaterals here)
FLOAT_END
elbow
(some other arm-related objects here)
FLOAT_END
arm
For an example of how to read a quad file, see /usr/alias/Gifts/src/reader/qreader.c
Note: Polysets are written out in this format. However, if you have already converted your object to a triangular polyset and then choose quad output, only triangles are printed-triangles are not welded back to being quads.You can preview what kind of triangles will be coming out by using the convert to polygons feature in the Alias interactive package.