Previous Document Next Document Synchronize TOC
Chapter 1

Softimage XSI File Format v3.0

This chapter provides an overview and detailed descriptions of the dotXSI templates that comprise the dotXSI file format in the following sections:

The dotXSI File Format

The dotXSITM file format is an ASCII file format defined by Softimage Co. to store SOFTIMAGE®|3D and SOFTIMAGE|XSI scene data. You can use it to simplify the import and export of characters, models, and animation for complete customizability of any game-development pipeline. The file format lets you include user data, making it straightforward to introduce new types of custom information.

Version 3.0 of the file format includes support for meshes, NURBS, hierarchies, skeletons, 2D IK chains, animation constraints, Hermite spline function curves, envelope weights (also on NURBS surfaces), custom effects, and user data.

The dotXSI file format is optimized for current game engine technology, and it can be easily:

Compatibility

The current version of SOFTIMAGE|3D can read and write versions 1.3, 2.0, and 3.0 dotXSI files. Note, however, that while an older version of SOFTIMAGE|3D can load more recent versions of dotXSI files, it ignores templates that it does not recognize.

SOFTIMAGE|XSI v1.5 can read and write v3.0 dotXSI files.

dotXSI File and XSI Viewer Tools

The following tools and toolkits are available for use with the dotXSI file format.

XSI Viewer
SOFTIMAGE|FTK

A toolkit that allows you to easily implement support for the dotXSI file format. The toolkit includes:

XSI Viewer SDK

A development kit for:

The XSI platform offers support for embedded middleware components:

dotXSI v3.0 File Format

New Templates

Version 3.0 of the dotXSITM file format introduces a variety of new templates for storing scene data.

For storing
New templates in v3.0
Groups of vertices
Multi-joint 2D and 3D chains
Texture sequences
SOFTIMAGE|3D Instances
Global material settings
Nulls
NURBS curves
Node and branch visibility
Support for SOFTIMAGE|XSI actions
SOFTIMAGE|XSI curve list
SOFTIMAGE|XSI user data
SOFTIMAGE|XSI surface meshes

Obsolete Templates

Templates used in v2.0
Templates used in v3.0

Changes to Existing Templates

Template
Change
Includes support for Transformation, Camera, Light, Ambience, Fog, and Material animation.
Contains an originator field.
Supports SOFTIMAGE|XSI infinite lights.
Embedded SI_Material templates include SI_FCurve templates for Ambient, Diffuse, Specular, Decay, Refractivity, Reflectivity, and Transparency.

dotXSI v2.0 File Format

New Templates

Version 2.0 of the dotXSI file format introduced a variety of new templates for storing scene data.

For storing
New templates in v2.0
User data
2-joint chains
Groups of vertices
Meshes
Polygon lists
Triangles and triangle strips
Global materials
SRT Transforms
Animation
Persistent custom effects
custom effect template
Models and model hierarchies
Global scene info
General file information

Obsolete Templates

Version 2.0 of the dotXSI file format does not use any of the DirectX templates, such as AnimationSet or Mesh, and replaces a number of v1.3 templates (see table).

Templates used in v1.3
Templates used in v2.0
AnimationSet
Frame
MeshMaterialList
Mesh

Changed Templates

Some of the new v2.0 templates can be nested in v1.3 templates, such as SI_NurbsCurve, SI_PatchSurface, SI_Material, and SI_Texture2D.

dotXSI v1.3 File Format

This table shows which v1.3 templates have been replaced by new templates in v2.0.

v1.3 template
v2.0 template
AnimationSet
Frame
MeshMaterialList
Mesh

Formatted User Data

By default, user data is stored as raw bytes in a dotXSI file. To store user data in a readable format, you need to define a User Data for dotXSI (UDX) file. .XSI Export and .XSI Import use UDX files to read and write formatted user data (see the SI_ElementUserData _<userDataTag>, SI_SubelementUserDataPolygon_<userDataTag>, and SI_SubelementUserDataVertex_<userDataTag> tags.

Limitations

SOFTIMAGE|XSI does not support formatted user data. You can, however, add custom parameters to XSI scene data contained in the dotXSI file-see XSI_CustomPSet.

UDX File Format


<User Data Tag>			// name of the user data tag  

<nbDataFields>					// number of data fields in the group  

<dataFieldName>		// name of the data field  

<dataFieldType>		// type of the data field  

<dataFieldType>
Description
BOOLEAN
8-bit value. Possible values are 0=FALSE and 1=TRUE.
BYTE
8-bit value
SHORT
16-bit value
INTEGER
32-bit value
float
32-bit IEEE float
STRING
0 terminated string
ARRAY <type>
Specifies an array of one of the above types. For example: ARRAY INTEGER

UDX files are stored in the SI_UDX_PATH directory, which typically is %SI_LOCATION%\3D\custom\udx.

Embedding UDX in XSI

The SI_UserDataFormat template allows you to embed the user data formatting information in a dotXSI file. Defining the user data format in the dotXSI file allows users to exchange the dotXSI files without also having to give the UDX files.

Example: Model Rendering Properties

Suppose you want to format the user data that represents model rendering properties for a hypothetical display driver. To do this, you would write a UDX file that looks like this:


RENDERING_TAG

4

"Back Culling"

BOOLEAN

"Front Culling"

BOOLEAN

"Drawing Method"

BYTE

"Z-Buffer"

BOOLEAN 

The internal C representation of this user data would look like this:


#define DRAW_POLY 0

#define DRAW_LINE 1

#define DRAW_POINT 2



typedef struct

{

	SAA_Boolean   bBackCulling;

	SAA_Boolean   bFrontCulling;

	unsigned char cDrawingMethod;

	SAA_Boolean   bZBuffer;

} 

And the user data would be attached to the model like this:


//...

RenderingProp p;



// ... set rendering properties params...



char buffer[7];

char *pBufPos = buffer;



memcpy( (void*)&pBufPos, (void*)&p.bBackCulling, sizeof(p.bBackCulling) );

pBufPos += sizeof(p.bBackCulling);



memcpy( (void*)&pBufPos, (void*)&p.bFrontCulling, sizeof(p.bFrontCulling) );

pBufPos += sizeof(p.bFrontCulling);



memcpy( (void*)&pBufPos, (void*)&p.cDrawingMethod, sizeof(p.cDrawingMethod) );

pBufPos += sizeof(p.cDrawingMethod);



memcpy( (void*)&pBufPos, (void*)&p.bzBuffer, sizeof(p.bzBuffer) );

pElem->SetUserData( "RENDERING_TAG", buffer, 7 ); 

When XSI Export exports this user data, it generates the following templates given the following data: Back Culling = TRUE, Front Culling = FALSE, Drawing Method =DRAW_POLY, and Z-Buffer = TRUE.


SI_UserDataFormat RENDERING_TAG

{

	4;

	"Back Culling","BOOLEAN";

	"Front Culling","BOOLEAN";

	"Drawing Method","BYTE";

	"Z-Buffer","BOOLEAN";

}



SI_ElementUserData_RENDERING_TAG

{

	1,			// Formatted

	0,			// Bigendian

	1,			// Back Culling

	0,			// Front Culling

	0,			// Drawing Method 

	1			// Z-Buffer

} 

The unformatted user data would look like this:


SI_ElementUserData_RENDERING_TAG

{

	0,			// Raw Byte Dump

	0,			// Bigendian

	7,			// User data length = 7

	0,1,0,0,0,0,1

} 

In SOFTIMAGE|3D, Booleans are represented by an unsigned short; this is why the user data length is 7 and not 4.

Example: Vertex Weight Map

Suppose you want to format the user data that represents vertex weight maps for a hypothetical bend operator. To do this, you would write a UDX file that looks like this:


VERTEX_BEND_TAG

2

"Bend Amount"

FLOAT

"Weight"

ARRAY FLOAT 

The internal C representation of this user data would look like this:


typedef struct

{

	float fBendAmount;

	int iNbWeights;

	float *pWeights;

} 

And the user data would be attached to the vertices like this:


//...

WeightMap m;



// ... set weight map params...



char *buffer = NULL;



int nBufferSize = sizeof(m.fBendAmount) + sizeof(m.iNbWeights ) + sizeof( float ) * m.iNbWeights;



buffer = (char*)malloc( nBufferSize );



char *pBufPos = buffer;



memcpy( (void*)&pBufPos, (void*)&m.fBendAmount, sizeof(m.fBendAmount) );

pBufPos += sizeof(m.fBendAmount);



memcpy( (void*)&pBufPos, (void*)&m.iNbWeights, sizeof(m.iNbWeights) );

pBufPos += sizeof(m.iNbWeights);



memcpy( (void*)&pBufPos, (void*)m.pWeights, sizeof( float ) * m.iNbWeights );



pVertex1->SetUserData( "RENDERING_TAG", buffer, nBufferSize, FALSE );

pVertex2->SetUserData( "RENDERING_TAG", buffer, nBufferSize, FALSE );

pVertex3->SetUserData( "RENDERING_TAG", buffer, nBufferSize, FALSE );

pVertex4->SetUserData( "RENDERING_TAG", buffer, nBufferSize, FALSE );

pVertex5->SetUserData( "RENDERING_TAG", buffer, nBufferSize, FALSE );

pVertex6->SetUserData( "RENDERING_TAG", buffer, nBufferSize, FALSE );



free( buffer ); 

When XSI Export exports this user data, it generates the following templates given the following data:


// Bend amount = 3.0

// Weights = 0.5, 0.5, 1.0, 1.0, 0.25, 0.25



SI_UserDataFormat BEND_TAG

{

	2;

	"Bend Amount", "FLOAT";

	"Weights", "ARRAY FLOAT";

}



SI_SubElementUserDataVertex_BEND_TAG

{

	6,			// Number of affected subelements

	3,			// index 1

	5, 			// index 2

	9, 			// index 3

	10, 			// index 4

	11, 			// index 5

	12, 			// index 6

	1,			// Formatted

	0,			// Bigendian 

	3.00000,			// Bend Amount

	6,			// Number of Weight

	0.50000,			// Weight 1

	0.50000,			// Weight 2

	1.00000,			// Weight 3

	1.00000,			// Weight 4

	0.25000,			// Weight 5

	0.25000,			// Weight 6

} 

The unformatted user data would look like this:


SI_SubElementUserDataVertex_BEND_TAG

{

	6,			// Number of affected subelements

	3,			// index 1

	5, 			// index 2

	9, 			// index 3

	10, 			// index 4

	11, 			// index 5

	12, 			// index 6

	0,			// Raw Byte Dump

	0,			// Bigendian

	32,			// User data length = 32

	64,64,0,0,

	0,0,0,6,

	63,0,0,0,

	63,0,0,0,

	63,128,0,0,

	63,128,0,0,

	62,128,0,0,

	62,128,0,0,

} 

Custom Effects

A persistent custom effect is stored in a template that looks like this:


<effectName> <modelName>

{

	<nbArguments>;

	<Argument1>;

	...

	<ArgumentN>;

	<nbResults>;

	<Result1>;

	...

	<ResultN>;



// effect parameters 

	<paramName>, <paramValue>;

	// ...other effect parameter name/value pairs... 

	<paramName>, <paramValue>;

} 

Limitations

SOFTIMAGE|XSI does not support custom effects.

To export custom-effect data from SOFTIMAGE|3D, you need to write a UDX file for the custom effect, and put it in the directory specified by the SI_UDX_PATH environment variable (typically %SI_LOCATION%/3D/custom/udx).

UDX file format:


<effectName>

<nbParameters>

"<ParameterName>" <type>

... 

<effectName>
Name of the custom effect as it appears in SOFTIMAGE|3D (e.g., "ModelNote", not "ModelNote.v2"). The name is case sensitive.
<nbParameters>
Number of effect parameters. This is the number of symbols declared in the _SYMBOL section of the effect .cus file.
<ParameterName>
Symbol name (case-sensitive) from the _SYMBOL section of the .cus file.
<type>
The type of the effect parameter:
BOOLEAN (for effect parameters connected to check boxes and radio buttons)
FLOAT (for parameters connected to text boxes)
STRING (for parameters connected to text boxes)
INTEGER (for parameters connected to text boxes)
Parameters connected to pulldown menus, RGBA color sliders, and list boxes (text views) are not supported.

Example

This example shows the dotXSI for the Chase effect, which animates one model to chase another model. The SI_Model template for the custom effect icon stores the effect data.


// Custom effect icon 

SI_Model MDL-chase1 {

	SI_Transform SRT-chase1

	{

		...

	}



	SI_Mesh MSH-chase1

	{

		SI_Shape SHP-chase1-ORG

		{

			...

		}



		SI_TriangleList

		{

			...

		}



	}



 // Custom effect parameters 

	Chase chase1

	{

		1;

		"sphere1";

		1;

		"cube1";

		"spdPrp",1.000000;

		"spdCns",0.000000;

	}

} 

The UDX file for the Chase effect:


Chase

2

"spdPrp" FLOAT

"spdCns" FLOAT 

dotXSI Templates

Template
Version
Description
1.3/2.0/3.0
This template must come first in the file.
Custom Effect Data
1.3/2.0/3.0
Stores the arguments, results, and parameters of a persistent effect.
1.3/2.0
Stores the rotation flag for the effector of a 2-joint chain.
1.3/2.0
Stores the preferred rotation for a joint in a 2-joint chain.
1.3/2.0
Stores the names of the joints and effector of a 2-joint chain.
1.3/2.0/3.0
Stores the ambient scene color.
1.3/2.0/3.0
Indicates how angle values are expressed in the file (degrees or radians).
1.3
Adds support for Euler rotation keys.
1.3
Supports the animation of any template parameter.
1.3/2.0/3.0
Stores camera data.
1.3
Stores camera fcurves.
1.3/2.0/3.0
Specifies the coordinate system in which transformations are expressed.
3.0
Stores cluster information.
1.3/2.0/3.0
Stores constraint information.
1.3/2.0/3.0
Stores user data attached to a camera, light, material, model, or texture.
1.3/2.0/3.0
Defines an envelope (also known as a skin).
1.3/2.0/3.0
Defines a list of envelopes.
2.0/3.0
Stores general information (file name, time stamp).
2.0/3.0
Stores an fcurve.
1.3/2.0
Describes the fog (depth fading) in the scene.
1.3/2.0/3.0
Stores the scaling, rotation, and translation of the base position of a skeleton.
3.0
Stores an object's global material.
3.0
Stores the rotation flag for the effector of an IK chain.
3.0
Stores IK joint information.
3.0
Stores the names of the joints and effector of an IK chain.
1.3/2.0
Identifies an animated texture sequence.
3.0
Stores SOFTIMAGE|3D model instance information.
1.3/2.0/3.0
Stores light data.
2.0
Stores light fcurves.
2.0/3.0
Defines a material. Adds support for specifying the shading model (Constant, Lambert, Phong, Blinn, Shadow Object, or Vertex Color) and storing the ambient color.
2.0/3.0
Stores global materials.
2.0/3.0
Stores a mesh.
1.3
Stores animation data for polygon vertices.
1.3
Adds support for shading normal discontinuities at the vertex level.
1.3
Adds support for texture coordinate discontinuities at the vertex level.
1.3
Adds support for vertex color discontinuities.
2.0/3.0
Stores models and model hierarchies.
3.0
Defines a null object.
3.0
Defines a NURBS curve.
2.0/3.0
Defines a NURBS surface.
1.3/2.0
Defines a patch (a surface defined by splines).
2.0/3.0
Stores a list of polygons in a mesh.
2.0/3.0
Stores global scene information (such as the start and end frames, and the frame rate).
2.0/3.0
Stores the mesh geometry.
2.0/3.0
Stores the animation of vertex positions, normals, colors, and uv coordinates.
1.3/2.0/3.0
Stores polygon user data.
1.3/2.0/3.0
Stores vertex user data.
1.3/2.0/3.0
Stores 2D texture information.
2.0/3.0
Stores SRT transforms as vectors.
2.0
Stores SRT fcurves.
2.0/3.0
Stores a list of triangles.
2.0/3.0
Stores triangle strips.
2.0/3.0
Stores formatting information for user data.
3.0
Stores node and branch visibility fcurves. (SOFTIMAGE|XSI only supports node visibility)
3.0
Stores a list of NURBS curves.
3.0
Stores SOFTIMAGE|XSI custom paramaters.
3.0
Stores source action data.
3.0
Stores action clip data.
3.0
Stores an action clip's extrapolation type.
3.0
Stores action data.
3.0
Stores an action's static values.
3.0
Stores an action clips's clipping and offset values.
3.0
Stores an action track's status.

File Header

All dotXSI files must begin with a header. The file header indicates the file format and its revision number.

Field
Size
(bytes)
Contents
Description
Magic number
4
"xsi"
File type
Version/major number
2
01
Major version 1
Version/minor number
2
03
Minor version 3
Format type
4
"txt"
Text file


"bin"
Binary file


"com"
Compressed file
Compression type
4
"lzw"



"zip"

Float size
4
0064
64-bit floats

4
0032
32-bit floats

Example

For example, the dotXSI files generated with XSI Export v1.3 plug-in begin with:


xsi 0103txt 0032 

Reading left to right, this indicates:

XSI v2.0 files generated begin with:


xsi 0200txt 0032 

Reference

The following sections provide details about the data stored in each of the dotXSI file templates.

SI_2D_2Joint_IK
_Effector

Stores the rotation flag for the effector of a 2-joint chain.

XSI Version

v1.3/v2.0. Not supported in v3.0. Replaced by SI_IK_Effector.

Template

SI_2D_2Joint_IK_Root-<name>

{

	<rotationFlag>,			// 0=inherit parent's rotation, 1=do not inherit 

} 

Example

See the example for SI_Model.

SI_2D_2Joint_IK_Joint

Stores the preferred rotation for a joint in a 2-joint chain.

XSI Version

v1.3/v2.0. Not supported in v3.0. Replaced by SI_IK_Joint.

Template

SI_2D_2Joint_IK_Joint-<name>

{

	<rotx>,<roty><rotz>			// Preferred rotation 

} 

Example

See the example for SI_Model.

SI_2D_2Joint_IK_Root

Stores the names of the joints and effector of a 2-joint chain.

XSI Version

v1.3/v2.0. Not supported in v3.0. Replaced by SI_IK_Root.

Template

SI_2D_2Joint_IK_Root-<name>

{

	"<joint1 Name>",

	"<joint2 Name>",

	"<effectorName>",

} 

Example

See the example for SI_Model.

SI_Ambience

Describes the ambient color in the scene.

XSI Version

v1.3/v2.0/v3.0

Template

SI_Ambience

{

	<red>, 

	<green>, 

	<blue>,

} 

Members
Member name
Type
Description
red, green, blue
float
The ambient color in the scene.

Example

SI_Ambience

{

	0.300000, 

	0.300000, 

	0.300000, 

} 

SI_Angle

Indicates how angle values are expressed in the file. If not specified, the values in the file should be considered as being expressed in degrees.

Limitations

This template is ignored when imported into SOFTIMAGE|XSI, although a warning appears if the angle is not expressed in degrees.

XSI Version

v1.3/v2.0/v3.0

Template

SI_Angle

{

	<type>;

} 

Members
Member name
Type
Description
type
int
Specifies angle representation:
0 = degrees
1 = radians

Example

See the example for SI_AnimationKey.

SI_AnimationKey

Defines a set of animation keys. This template allows the expression of rotations using Euler transformations.

XSI Version

v1.3

Members
Member name
Type
Array size
Description
keyType
int

0 = quaternion rotations
1 = scaling
2 = translation
3 = Euler rotations
nKeys
int


keys
array TimedFloatKeys
nKeys


Example

SI_Angle {

	0;			// Angles expressed in degrees 

}



Frame frm-cube3 {



	FrameTransformMatrix {

		1.000000,0.000000,0.000000,0.000000,

		0.000000,1.000000,0.000000,0.000000,

		0.000000,0.000000,1.000000,0.000000,

		0.000000,0.000000,0.000000,1.000000;;

	}



	Mesh cube3 {

		...

		MeshMaterialList {

			...

			SI_Material {

				...

			}

		}

		SI_MeshNormals {

			...

		}

	}

} 

AnimationSet {

	Animation anim-cube3 {

		{frm-cube3}

		SI_AnimationKey {

			3;		// Euler rotation 

			80;		// 80 animation keys; values in degrees (see SI_Angle) 

		// Animation keys: 

			1; 3; 0.000000, 0.000000, 0.000000;;,

			2; 3; -0.275021, 0.000000, 0.000000;;,

			// ... 

			100; 3; 63.095589, -43.543098, 0.000000;;;

		}

	}

} 

SI_Animation
ParamKey

Defines animation of any template parameter.

XSI Version

v1.3

Members
Name
Type
Array size
Description
reference
{template name}

Reference to a template.
parameterIndex
int

Index of the template parameter to animate. The index is zero-based.
keyType
int

0 = int
1 = float
2 = Vector
3 = ColorRGB
4 = ColorRGBA
nKeys
int

Number of animation keys.
keys
array TimedFloatKeys
nKeys
Animation keys.

Comments

This template works by considering the referenced template as a structure indexed by the parameterIndex value. For example, the following definition shows how the parameters in a SI_Camera template are indexed:


// The members of a template are indexed starting from 0: 

SI_Camera Camera1 {

	0.000000; 2.000000; 20.000000;;		// Camera1[0] = camera position vector 

	0.000000; -3.404255; 0.000000;;		// Camera1[1] = interest position vector 

	0.000000;					// Camera1[2] = roll 

	41.539440;					// Camera1[3] = field of view 

	0.100000;					// Camera1[4] = near plane 

	32768.000000;					// Camera1[5] = far plane 

} 

Examples

Camera Interest

This example shows how to animate the position of the camera interest:


// Define a camera instance 

SI_Camera Camera1 {

	0.000000; 2.000000; 20.000000;;

	0.000000; -3.404255; 0.000000;;		// Camera1[1] = interest position vector

	0.000000;

	41.539440;

	0.100000;

	32768.000000;

}



AnimationSet {

	Animation anim-Camera1 {

		{SCENE}



		SI_AnimationParamKey {

			{Camera1}	// reference to the camera data object 

			1;	// Camera1[1] is the interest vector 

			2;	// vector animation key 

			59;	// 59 animation keys to follow: 

// animation keys 

// <frame>; <nValues>; <value1>; ... <valueN>;; 

			1; 3; 0.000000, -3.404255, 0.000000;;,

			2; 3; 0.000000, -3.341151, 0.000000;;,

			3; 3; 0.000000, -3.161310, 0.000000;;,

			// other keys snipped... 

			100; 3; 0.000000, 19.347515, 0.000000;;;

		}

	}

} 

Mesh Vertex Positions

This example shows how to animate the positions of polygon mesh vertices.


Frame frm-cube1 {



	FrameTransformMatrix {

		1.000000,0.000000,0.000000,0.000000,

		0.000000,1.000000,0.000000,0.000000,

		0.000000,0.000000,1.000000,0.000000,

		0.000000,0.000000,0.000000,1.000000;;

	}



	Mesh cube1 {

		8;						// cube1[0] = number of vertices 

		-0.500000;-0.500000;-0.500000;,	// cube1[1] = vertex 0 

		-0.500000;-0.500000;0.500000;,	// cube1[2] = vertex 1 

		-0.500000;0.500000;-0.500000;,	// cube1[3] = vertex 2 

		-0.500000;0.500000;0.500000;,		// cube1[4] = vertex 3 

		0.500000;-0.500000;-0.500000;,	// cube1[5] = vertex 4 

		0.500000;-0.500000;0.500000;,		// cube1[6] = vertex 5 

		0.500000;0.500000;-0.500000;,		// cube1[7] = vertex 6 

		0.500000;0.500000;0.500000;;		// cube1[8] = vertex 7 



		6;						// 6 polygons 

		4;0,1,3,2;,

		4;1,5,7,3;,

		4;5,4,6,7;,

		4;4,0,2,6;,

		4;4,5,1,0;,

		4;2,3,7,6;;



		MeshMaterialList {

			...

			SI_Material {

				...

			}

		}

		SI_MeshNormals {

		...

		}

	}

}

// Vertex position animation. 

// Note that while XSI Export puts each SI_AnimationParamKey in a separate 

// Animation block, you can put multiple SI_AnimationParamKey in a single 

// Animation block and XSI Import will load it correctly. 



AnimationSet {

	Animation anim-cube1 {

		{frm-cube1}



		SI_AnimationParamKey {		// keys for vertex 1

			{cube1}				// reference to cube1 template 

			2;					// index of vertex 1 in the cube1 template 

			2;					// vector keys 

			77;				// 77 keys 

			1; 3; -0.500000, -0.500000, 0.500000;;,

			2; 3; -0.527668, -0.516229, 0.510289;;,

			3; 3; -0.605175, -0.561691, 0.539113;;,

			...

			100; 3; -0.500000, -0.500000, 0.500000;;;

		}

	}

	Animation anim-cube1 {

		{frm-cube1}



		SI_AnimationParamKey {		// keys for vertex 6

			{cube1}				// reference to cube1 template 

			7;					// index of vertex 6 in the cube1 template 

			2;					// vector keys 

			77;				// 77 keys 

			1; 3; 0.500000, 0.500000, -0.500000;;,

			2; 3; 0.500000, 0.500000, -0.500000;;,

			3; 3; 0.500000, 0.500000, -0.500000;;,

			...

			100; 3; 0.500000, 0.500000, -0.500000;;;

		}

	}

} 

SI_Camera

Describes the camera data.

XSI Version

v1.3/v2.0/v3.0

Template

SI_Camera <cameraName> {

	<posx>; <posy>; <posz>;;

	<intx>; <inty>; <intz>;;

	<roll>;

	<fieldOfView>;

	<nearPlane>;

	<farPlane>;



// User data 

	SI_ElementUserData _<userDataTag> 

	{

	}

	// more SI_ElementUserData templates... 



	{

		...

	}

	...  // more constraints... 



// Animation 

	SI_CameraAnimation CANANIM-<cameraName>

	{

		...

	}

} 

Members
Member name
Type
posx, posy, posz
float
intx, inty, intz
float
roll
float
fieldOfView
float
nearPlane
float
farPlane
float

Example

SI_Camera myCamera

{

	0.0; 0.0; 10.0;;	 // position (0.0,0.0,10.0) 

	0.0; 0.0; 0.0;;		  // interest (0.0,0.0,0.0) 

	0.0;					  // roll (0 degrees) 

	0.0;					  // field of view (0 degrees) 

	5.0;					  // near plane (5.0 units) 

	100.0;					  // far plane (100.0 units) 

} 

SI_CameraAnimation

Stores camera fcurves.

XSI Version

v2.0. Not supported in v3.0. Replaced by SI_FCurve.

Template

SI_CameraAnimation CAMANIM-<cameraName>

{

	<nbFcurves>,

	SI_FCurve <template_name>

	{

		// ... 

	}

	...  // more SI_FCurve templates... 

} 

Data Members
Member
Type
Description
nbFcurves
int
Number of SI_Fcurve templates in this SI_CameraAnimation template.

Nested Templates
Template
Description
Position, interest, roll, fov, near, and far fcurves.

Example

SI_Camera Camera1 {

	0.000000; 2.000000; 20.000000;;

	0.000000; 0.000000; 0.000000;;

	0.000000;

	41.539440;

	0.100000;

	32768.000000;



	SI_CameraAnimation CAMANIM-Camera1

	{

		2,						// nbFcurves 

		SI_FCurve Camera1-POSITION-XYZ

		{

			"Camera1",

			"POSITION-XYZ",

			"LINEAR",

			3,1,

			100,

			1,0.0,2.0,20.0,

			2,-0.00173,1.977385,20.0,

			3,-0.005458,1.911115,20.0,

			// ... 

			100,8.75963,115.106979,12.446608,

		}



		SI_FCurve Camera1-ROLL

		{

			"Camera1",

			"ROLL",

			"LINEAR",

			1,1,

			100,

			1,0.0,

			2,-0.066626,

			3,-0.26227,

			// ... 

			100,-392.587128,

		}

	} 

SI_Cluster

Stores groups of vertices on a model. This is a sublevel template of the SI_Model template. The SI_Shape template can be placed inside SI_Cluster template to define cluster shapes.

XSI Version

v3.0

Template

SI_Cluster <cluster name>

{

<referenced model>,

<weighting (AVERAGE|ADDITIVE)>,

<cluster center reference (put an empty string if there is no cluster center)>,

<number of vertices>,

<index of vertex 1>,

...

<index of vertex n>

} 

Example

SI_Cluster blueball

{

   "blueball",

   "AVERAGE",

   "",

   11,

   1,

   21,

   22,

   28,

   29,

   35,

   36,

   42,

   43,

   49,

   50,

} 

SI_Constraint

Stores constraints.

XSI Version

v1.3/v2.0/v3.0

Template

SI_Constraint <objectName>-<constraintType>

{

	"<objectName>",

	"<constraintType>",

	<nbConstrainingObjects>,

	"<constrainingObjectName>",



	...		// more constraining objects 

}  

<constraintType>
Applies to
POSITION
Lights, cameras, models
SCALING
Models
DIRECTION
Models
ORIENTATION
Models
UP_VECTOR
Cameras, models
PREFERED_AXIS
Models
INTEREST
Lights, cameras

Example: Position Constraint

This dotXSI fragment shows a cone that is position-constrained to a sphere and a cube, and scaling-constrained to a cube.


SI_Model MDL-sphere1 {

	SI_Transform SRT-sphere1

	{

		...

	}



	SI_Mesh MSH-sphere1

	{

		SI_Shape SHP-sphere1-ORG

		{

			...

		}

	}



	SI_TransformAnimation SRTANIM-sphere1

	{

		1,

		SI_FCurve sphere1-TRANSLATION-XYZ

		{

			...

		}

	}

}



SI_Model MDL-cube2 {

	SI_Transform SRT-cube2

	{

	} 

	SI_Mesh MSH-cube2

	{

		SI_Shape SHP-cube2-ORG

		{

		}

	}



	SI_TransformAnimation SRTANIM-cube2

	{

		1,

		SI_FCurve cube2-SCALING-XYZ

		{

		}

	}

}



SI_Model MDL-cone1 {

	SI_Transform SRT-cone1

	{

	}



	SI_Mesh MSH-cone1

	{

		SI_Shape SHP-cone1-ORG

		{



		}



	SI_Constraint cone1-POSITION

	{

		"cone1",

		"POSITION",

		2,

		"cube2",

		"sphere1",

	}



	SI_Constraint cone1-SCALING

	{

		"cone1",

		"SCALING",

		1,

		"cube2",

	}

} 

Example: Up-vector constraint

This dotXSI fragment shows a cube that is position-constrained to a cone and direction-constrained to a grid. The cone also has Up Vector contraints to a sphere and a null object. The Up Vector constraints are nested within the constraint that they affect.


	SI_Constraint cube1-POSITION

	{

		"cube1",

		"POSITION",

		1,

		"cone1",

		SI_Constraint cube1-UP_VECTOR

	{

			"cube1",

			"UP_VECTOR",

			1,

			"sphere1",

		}

	}

	SI_Constraint cube1-DIRECTION

	{

		"cube1",

		"DIRECTION",

		1,

		"grid1",

		SI_Constraint cube1-UP_VECTOR

		{ 

			"cube1",

			"UP_VECTOR",

			1,

			"null1",

		}

	} 

 // When upvct_active is without reference (not assigned to a specific object but set to affect a specific axes) then it is exported as follows: 

	SI_Constraint cube1-DIRECTION

	{

		"cube1",

		"DIRECTION",

		1,

		"grid1",

		SI_Constraint cube1-UP_VECTOR

		{

			"cube1",

			"UP_VECTOR",

			0,

		}

	} 

SI_CoordinateSystem

Specifies the coordinate system in which transformations are expressed. This template allows game developers to express data in any coordinate system.

Limitations

If an XSI file contains this template, SOFTIMAGE|XSI ignores it.

XSI Version

v1.3/v2.0/v3.0

Members
Member name
Type
Description
handRotation
int
Specifies the coordinate system:
0 = left-handed (D3D, PlayStation)
1 = right-handed (SOFTIMAGE|3D, Nintendo)
uAxis
int
Orientation of the U axis for texture coordinates:
0 = right (all)
1 = left
vAxis
int
Orientation of the V axis for texture coordinates:
0 = down (D3D, Nintendo, PlayStation)
1 = up (SOFTIMAGE|3D)
xAxis
int
Orientation of the X axis:
0 = right (all)
1 = left
2 = up
3 = down
4 = in
5 = out
yAxis
int
Orientation of the Y axis:
0 = right
1 = left
2 = up (SOFTIMAGE|3D, D3D, Nintendo)
3 = down (PlayStation)
4 = in
5 = out
zAxis
int
Orientation of the Z axis:
0 = right
1 = left
2 = up
3 = down
4 = in (D3D, PlayStation)
5 = out (SOFTIMAGE|3D, Nintendo)

Note

Only SOFTIMAGE|3D-style coordinates are supported by the XSI Export and XSI Import plug-in.


Example

SI_CoordinateSystem myCoordinateSystem

{

	1;	// right-handed rotation 

	0;	// U axis goes right 

	1;	// V axis goes up 

	0;	// X axis goes right 

	2;	// Y axis goes up 

	5;	// Z axis goes out 

} 

SI_ElementUserData
_<userDataTag>

Stores user data attached to models, cameras, materials, and textures.

Limitations

SOFTIMAGE|XSI does not export this template. If a dotXSI file contains this template, SOFTIMAGE|XSI ignores it.

XSI Version

v1.3/v2.0/v3.0

Template

SI_ElementUserData_<userDataTag> {



	<format>,		// 0=decimal dump, 1=formatted dump

	<endian>,		// 0=big, 1=little 



	// decimal dump 

	<length>,		// User data length 

	<byte1>, <byte2>, <byte3>, <byte4>,

	<byte5>, <byte6>, <byte7>, <byte8>,

	...

	...,<byteN>,



	// formatted dump 

	<float>,

	<int>,

	<boolean>,

	<short>,

	<byte>,

	<string>,

	<arraySize>,

	<element1>,

	...

	<elementN>,

} 

See Formatted User Data for more information on importing and exporting formatted user data.

Example

SI_Envelope

Defines an envelope (also known as a skin).

XSI Version

v1.3/v2.0/v3.0

Members
Member name
Type
Array size
Description
envelope
{template name}

Name of the model to be used as an envelope.
deformer
{template name}

Name of the object to be used as a deformer.
nVertices
int

Number of weighted vertices in the envelope.
vertexWeights
array
nVertices
Array of weight values associated to the vertices of the envelope.

VertexWeights
Member name
Type
Description
vertexIndex
int
Index of the vertex.
weight
float
Weight value in the range [0.0, 100.0].

Comments
Example

See the example for SI_EnvelopeList.

SI_EnvelopeList

Defines a list of envelopes.

XSI Version

v1.3/v2.0/v3.0

Members
Member name
Type
Array size
Description
nEnvelopes
int

Number of envelopes in the list.

Nested Templates
Envelope definitions.

Example

SI_EnvelopeList myEnvelopeList

{

	4;

	SI_Envelope

	{

		"frm-mySphere";	// envelope model 

		"frm-myChainRoot";	// deformer bone model 

		0;	// number of weighted vertices 

	}



	SI_Envelope

	{

		"frm-mySphere";	// envelope model 

		"frm-myBone1";					// deformer bone model 

		6;					// number of weighted vertices 

		0; 30.0;;					// vertex 0 

		1; 30.0;;					// vertex 1 

		2; 30.0;;					// vertex 2 

		3; 70.0;;					// vertex 3 

		4; 70.0;;					// vertex 4 

		5; 70.0;;					// vertex 5 

	}



	SI_Envelope

	{

		"frm-mySphere";	// envelope model 

		"frm-myBone2";					// deformer bone model 

		6;					// number of weighted vertices 

		0; 70.0;;					// vertex 0 

		1; 70.0;;					// vertex 1 

		2; 70.0;;					// vertex 2 

		3; 30.0;;					// vertex 3 

		4; 30.0;;					// vertex 4 

		5; 30.0;;					// vertex 5 

	}



	SI_Envelope

	{

		"frm-mySphere";						// envelope model 

		"frm-myEffector";						// deformer bone model 

		0;						// number of weighted vertices 

	}

} 

SI_FileInfo

Stores general information about the file.

Limitations

If a dotXSI file contains this template, SOFTIMAGE|XSI and SOFTIMAGE|3D ignore it.

XSI Version

v2.0/v3.0

Template

SI_FileInfo 

{

	"<projectName>",

	"<userName>",

	"<savedDateTime>

	"<originator>,

} 

SI_FCurve

Defines function curves.

XSI Version

v2.0/v3.0

Template

SI_FCurve <objectName>-<Fcurve>-<Components>

{

  "<objectName>",

  "<Fcurve>",

  "<Interpolation>",

  <nbFcurves>,<nbKeyValues>,

  <nbKeys>,

  <frame>,<keyValues>,

  ...

  <frame>,<keyValues>,

} 

The <Components> part of the template name indicates which component fcurves are included in the template. For example, TRANSLATION-XZ indicates that the X and Z translation fcurves are specified in the template.

Data Members
Member
Type
Description
objectName
char *
Name of the object to which the function curves apply.
Fcurve
char *
Name of the function curves.
For cameras (v2.0/v3.0):
INTEREST | FAR | FOV | NEAR | POSITION | ROLL
For lights (v2.0):
CONE | INTEREST | POSITION | SPREAD
For lights (v3.0):
COLOR | CONE | INTEREST | POSITION | SPREAD
For models (v2.0):
SCALING | ROTATION | TRANSLATION
For models (v3.0):
SCALING | ROTATION | TRANSLATION | VISIBILTY
For Fog (v3.0 only - not supported by SOFTIMAGE|XSI):
COLOR | END | START
For materials (v3.0 only):
AMBIENT | DIFFUSE | EMMISSIVE | POWER | SPECULAR
Interpolation
char *
Possible values are:
CONSTANT | HERMITE | LINEAR | CUBIC
nbFcurves
int
Number of vector component fcurves. For example, if there is only the X translation fcurve, then the dimension is 1. If there are fcurves for X, Y, and Z, then the dimension is 3.
nbKeyValues
int
Number of values stored for a vector component at a given key.
CONSTANT and LINEAR fcurves have one key vaue for each vector component.
HERMITE fcurves have three values for each vector component. At each key, a value, in-tangent, and out-tangent is required for each vector component.
The values are arranged in order of major first. For example: ( Xvalue, Xin-tan, Xout-tan, Yvalue, Yvalue, Yin-tan, Yout-tan, ... )
nbKeys
int
Number of keys.
keyValues

For each key, a comma-separated list beginning with the frame number (an integer) or the time in seconds (a floating point value). The SI_Scene template specifies whether time is expressed in frames or time.
The key values are floating point values.
The number of key values is given by (Dimension * NbKeyValues).

Example

 SI_FCurve Camera1-ROLL

  {

   "Camera1",

   "ROLL",

   "LINEAR",

   1,1,

   76,

   1,0.0,

   2,0.000155,

   3,0.000616,

   4,0.001377,

   5,0.002431,

   6,0.003772,

   7,0.005393,

   8,0.007289,

   9,0.009452,

   10,0.011876,

   11,0.014556,

   12,0.017484,

   13,0.020655,

   14,0.024061,

   15,0.027697,

   16,0.031556,

   17,0.035631,

   18,0.039917,

   19,0.044408,

   20,0.049095,

   21,0.053974,

   22,0.059038,

   23,0.06428,

   24,0.069695,

   25,0.075275,

   26,0.081014,

   27,0.086907,

   28,0.092946,

   29,0.099125,

   30,0.105439,

   32,0.118441,

   34,0.131903,

   36,0.145773,

   38,0.159999,

   40,0.174532,

   42,0.18932,

   44,0.204311,

   47,0.22707,

   56,0.295689,

   58,0.310681,

   60,0.325468,

   62,0.340001,

   64,0.354227,

   66,0.368097,

   68,0.381559,

   70,0.394561,

   71,0.400875,

   72,0.407054,

   73,0.413093,

   74,0.418986,

   75,0.424725,

   76,0.430305,

   77,0.43572,

   78,0.440962,

   79,0.446026,

   80,0.450905,

   81,0.455593,

   82,0.460083,

   83,0.464369,

   84,0.468444,

   85,0.472303,

   86,0.475939,

   87,0.479345,

   88,0.482516,

   89,0.485444,

   90,0.488124,

   91,0.490548,

   92,0.492711,

   93,0.494607,

   94,0.496228,

   95,0.497569,

   96,0.498623,

   97,0.499384,

   98,0.499845,

   99,0.5,

   100,0.5,

  } 

SI_Fog

Describes the fog (depth fading) in the scene.

Limitations

SOFTIMAGE|XSI does not export this template. If a dotXSI file contains this template, SOFTIMAGE|XSI ignores it.

XSI Version

v1.3/v2.0/v3.0

Members
Member name
Type
Description
Type
int
0 = vertex
1 = pixel
Interpolation
int
0 = linear (depth cue)
1 = exponential
Color
ColorRGB
Color of fog.
Near
float
Distance at which fog starts (everything before this is unmodified).
Far
float
Distance at which fog stops (everything beyond this has the fog's color).

Example

SI_Fog myFog

{

	0;					// vertex fog 

	0;					// linear interpolation 

	0.0; 0.0; 1.0;;		// blue fog 

	10.0;					// fog starts at 10 units along camera->interest vector 

	100.0;					// fog stops at 100 units along camera->interest vector 

} 

Comment

The fog type indicates whether the fog is:

SOFTIMAGE|3D supports vertex fog only.

SI_FrameBasePose
Matrix

Specifies the scaling, rotation, and translation of the base position of a skeleton.

XSI Version

v1.3/v2.0

Members
Member name
Type
Description
baseMatrix
Matrix4x4
Transformation matrix corresponding to base scaling, rotation, and translation.

SI_GlobalMaterial

Identifies the global material of SI_Model. In the XSI file format, SI_Model corresponds to a model in SOFTIMAGE|3D and an object in SOFTIMAGE|XSI. The template is always embedded inside SI_model.

XSI Version

v3.0

Template

SI_GlobalMaterial

{

	<referenced material>,

	<BRANCH | LOCAL | INHERITED>

} 

Example

SI_GlobalMaterial {

	"mat1"

	"BRANCH"

  } 

SI_IK_Effector

Stores the rotation flag for the effector of an IK chain. This flag affects the way the effector rotation is exported. In SOFTIMAGE|XSI this flag refers to the Effector Rotation Relative to Last Bone option. If the last bone inherits its rotation, the flag is set to True. False if not. This means that rotation in the SI_FCurve template will be local if this flag is True and global if this flag is False.

XSI Version

v3.0

Template

SI_IK_Effector <effector name>

{

<rotation flag>

} 

SI_IK_Joint

Stores IK joint information.

Limitations

SOFTIMAGE|3D does not export pseudo root, stiffness activation, or stiffness data. If an XSI file contains this data, SOFTIMAGE|3D ignores it.

XSI Version

v3.0

Template

SI_IK_Joint <joint name>

{

<solver type (2D | 3D | DEFAULT| LENGTH)>,

<preferred rotation x>, <preferred rotation y>, <preferred rotation z>,

<rotation limit activation>,

<rotation limit min x>, <rotation limit min y>, <rotation limit min z>,

<rotation limit max x>, <rotation limit max y>, <rotation limit max z>,

<pseudo-root>,

<stiffness activation>,

<stiffness>,

} 

SI_IK_Root

Stores the names of the joints and effector of an IK chain.

XSI Version

v3.0

Template

SI_IK_Root <root name>

{

<number of joints>,

<joint 1 name>,

...

<joint n name>,

<effector name>

} 

SI_ImageClip

Identfies the animated texture sequence.

Limitations

SOFTIMAGE|XSI does not export this template. If a dotXSI file contains this template, SOFTIMAGE|XSI will ignore it.

XSI Version

v3.0

Template

SI_ImageClip <image clip name>

{

	<texture reference>,

	<number of images>,

	<starting frame/time>,

	<ending frame/time>,

	<image rate>,

	<STOP | LOOP | PINGPONG>

	<image file name 1>,

	...

	<image file name 2>

} 

Example

SI_ImageClip bee.1.pic	{

   "t2d1",

   20,

   1.0,

   20.0,

   30.000000,

   "LOOP",

   "bee.1.pic";

   "bee.2.pic";

   "bee.3.pic";

   "bee.4.pic";

   "bee.5.pic";

   "bee.6.pic";

   "bee.7.pic";

   "bee.8.pic";

   "bee.9.pic";

   "bee.10.pic";

   "bee.11.pic";

   "bee.12.pic";

   "bee.13.pic";

   "bee.14.pic";

   "bee.15.pic";

   "bee.16.pic";

   "bee.17.pic";

   "bee.18.pic";

   "bee.19.pic";

   "bee.20.pic";

} 

SI_Instance

Stores SOFTIMAGE|3D model instances. This template is stored inside the SI_Model template. Note that this template does not apply to SOFTIMAGE|XSI.

Limitations

SOFTIMAGE|XSI does not export this template. If an XSI file contains this template, SOFTIMAGE|XSI converts the instance to a null object to preserve the model hierarchy.

XSI Version

v3.0

Template

SI_Instance <instance name>

{

<referenced root name>

} 

Example

SI_Model MDL-inst

{

SI_Transform SRT-inst 

{

1.0,1.0,1.0,

0.0,0.0,0.0,

-23.910456,-47.999069,20.927017,

}



SI_Instance inst

{

"Parent_1",

}

} 

SI_Light

Describes a light.

XSI Version

v1.3/v2.0/v3.0

Template

SI_Light <lightName>

{

	<type>;

	<red>; <green>; <blue>;;



// Point light form: 

	<posx>; <posy>; <posz>;;



// Infinite light form: 

	<dirx>; <diry>; <dirz>;;



// Spot light form: 

	<posx>; <posy>; <posz>;;

	<intx>; <inty>; <intz>;;

	<coneAngle>;

	<spreadAngle>;



	SI_LightAnimation LIGHTANIM-<lightName>

	{

		...

	}



// User data 

	SI_ElementUserData _<userDataTag> 

	{

		...

	}

	// more SI_ElementUserData templates... 



	{

		...

	}

	...  // more constraints... 

} 

Members
Member name
Type
Description
type
int
Specifies the light type:
0 = point or spot
1 = directional
2 = spot
3 = SOFTIMAGE|XSI infirnite light
red, green, blue
float
Color of the light.
posx, posy, posx
float
Specifies the light position.
dirx, diry, dirz
float
Direction of the infinite light.
intx, inty, intz
float
Position of the spotlight interest.
coneAngle
float

spreadAngle
float


Example

// Point light 

SI_Light myPointLight

{

	0;							// point

	0.0; 1.0; 0.0;;							// color (green)

	10.0; 10.0; 10.0;;							// position (10,10,10)

}



// Infinite light 

SI_Light myInfiniteLight

{

	1;							// directional

	0.0; 1.0; 0.0;;							// color (green)

	10.0; 10.0; 10.0;;							// position (10,10,10)

}



// SOFTIMAGE|XSI Infinite light 

SI_Light Infinite

{

	3;									  // XSI directional

	1.000000, 1.000000, 1.000000,	// Red, Green, Blue

	1.456311, 2.797295, 0.000000,	// Position x, y, z)

	-54.000000; 113.625000, 0.000000,	// Orientation x, y, z)

}



// Spotlight 

SI_Light mySpotLight

{

	0;							// directional

	0.0; 1.0; 0.0;;							// color (green)

	10.0; 10.0; 10.0;;							// position (10,10,10)

	0.0; 0.0; 0.0;;							// interest (0,0,0)

	5.0;							// coneAngle (5 degrees)

	20.0;							// spreadAngle (20 degrees)

} 

SI_LightAnimation

Stores light fcurves.

XSI Version

v2.0. Not supported in v3.0. Replaced by SI_FCurve.

Template

SI_LightAnimation LIGHTANIM-<lightName>

{

	<nbFcurves>,

	SI_FCurve <template_name>

	{

		// ... 

	}

	...  // more SI_FCurve templates... 

} 

Data Members
Member
Type
Description
nbFcurves
int
Number of SI_Fcurve templates in this SI_LightAnimation template.

Nested Templates
Template
Description
Color and position fcurves for infinite and point lights.
Color, position, interest, cone, and spread fcurves for spotlights.

SI_Material

Defines a material.

XSI Version

v1.3/v2.0/v3.0

Members
Member name
Type
Description
faceColor
ColorRGBA
Diffuse color
power
float
Specular decay
specularColor
ColorRGB
Specular color
emissiveColor
ColorRGB
Emissive color. Not supported by SOFTIMAGE|3D.
shadingModel
int
Defines the material shading model:
0 = Constant
1 = Lambert
2 = Phong
3 = Blinn
4 = Shadow Object
5 = Vertex Colour
ambientColor
ColorRGB
Ambient color

Nested Templates
Local 2d textures applied to the material. If not present, the face is untextured.
Material user data.

Example (Lambert shaded material)
SI_Material myMaterial
{
1.0; 0.0; 0.0; 0.0;; // diffuse (red)
1.0; // specular exponent
0.0; 1.0; 0.0;; // specular (green)
0.0; 0.0; 0.0;; // emissive color (black)
1; // Lambert shading model
0.3; 0.3; 0.3;; // ambient color (light gray)
}
Example (with 2D Textures)

See the example for SI_MaterialLibrary.

SI_MaterialLibrary

Specifies a list of materials that are global to the scene.

XSI Version

v2.0/v3.0

Template

SI_MaterialLibrary MATLIB-<sceneName>

{

	<nbMaterials>,

	SI_Material <materialName>

	{

		...

	}

	...		// more materials... 

} 

Example

SI_MaterialLibrary MATLIB-myCube

{

	1,

	SI_Material MAT_SURFACE-TERRACOTTA001.1-1

	{

		0.75,0.55,0.333,1.0,

		250.0,

		1.0,1.0,1.0,

		0.0,0.0,0.0,

		5,

		1.0,0.733,0.444,

		SI_Texture2D {

			"noIcon.pic";

			4;

			50;75;

			0;49;0;74;

			0;

			1;1;

			0;0;

			1.000000;1.000000;

			0.000000;0.000000;

			1.000000,0.000000,0.000000,0.000000,

			0.000000,1.000000,0.000000,0.000000,

			0.000000,0.000000,1.000000,0.000000,

			0.000000,0.000000,0.000000,1.000000;;

			3;

			0.000000;

			0.000000;

			0.000000;

			0.000000;

			0.000000;

			0.000000;

			4.014000;

		}

	}

}

SI_Model MDL-cube2 {

	SI_Transform SRT-cube2

	{

		...

	}

	SI_Mesh MSH-cube2

	{

		SI_Shape SHP-cube2-ORG

		{

			...

		}



		SI_TriangleList

		{

			12,

			"NORMAL|COLOR|TEX_COORD_UV",

			"MAT_SURFACE-TERRACOTTA001.1-1",

			...

	 }

} 

SI_Mesh

Stores a mesh definition.

XSI Versions

v2.0/v3.0

Template

SI_Mesh MSH-<objectName>

{

	SI_Shape SHP-<objectName>-ORG

	{

		...

	}



	SI_TriangleList

	{

		...

	}



	SI_TriStripList

	{

		...

	}



	// Output if no tesselation 

	SI_PolygonList

	{

		...

	}



	SI_ShapeAnimation

	{

		...

	}



	// Polygon user data 

	SI_SubelementUserDataPolygon_<userDataTag> {

		...

	}

	...		// more polygon user data... 



	// Vertex user data 

	SI_SubelementUserDataVertex_<userDataTag> {

		...

	}

	...		// more vertex user data... 

} 

Examples

This example shows an untessellated mesh.


SI_MaterialLibrary MATLIB-no_name

{

  1,

  SI_Material MAT_SURFACE-TERRACOTTA001.1-1

  {

   0.75,0.55,0.333,1.0,

   250.0,

   1.0,1.0,1.0,

   0.0,0.0,0.0,

   1,

   1.0,0.733,0.444,

  }



}



SI_Model MDL-cube2 {

  SI_Transform SRT-cube2

  {

   1.0,1.0,1.0,

   0.0,0.0,0.0,

   0.0,0.0,0.0,

  }



  SI_Mesh MSH-cube2

  {

   SI_Shape SHP-cube2-ORG

   {

     2,

     "ORDERED",

     8,

     "POSITION",

     -0.5,-0.5,-0.5,

     -0.5,-0.5,0.5,

     -0.5,0.5,-0.5,

     -0.5,0.5,0.5,

     0.5,-0.5,-0.5,

     0.5,-0.5,0.5,

     0.5,0.5,-0.5,

     0.5,0.5,0.5,



     6,

     "NORMAL",

     -1.0,0.0,0.0,

     0.0,0.0,-1.0,

     0.0,-1.0,0.0,

     0.0,0.0,1.0,

     0.0,1.0,0.0,

     1.0,0.0,0.0,

   }



   SI_PolygonList

   {

     6,

     "NORMAL",

     "MAT_SURFACE-TERRACOTTA001.1-1",

     24,

     4,

     4,

     4,

     4,

     4,

     4,



     0,1,3,2,

     1,5,7,3,

     5,4,6,7,

     4,0,2,6,

     4,5,1,0,

     2,3,7,6,



     0,0,0,0,

     3,3,3,3,

     5,5,5,5,

     1,1,1,1,

     2,2,2,2,

     4,4,4,4,

   }

  }

} 

SI_MeshFace

Specifies the vertices that define a polygon. The main purpose of this template is to allow the association of polygon vertex data in an easily readable way.

The SI_MeshNormals, SI_MeshTextureCoords, and SI_MeshVertexColors templates contain arrays of SI_MeshFace templates.

XSI Versions

v1.3/v2.0

Members
Member name
Type
Array size
Description
polygonIndex
int

Index of the polygon.
nFaceVertexIndices
int

Number of vertices for this polygon.
faceVertexIndices
array int
nFaceVertexIndices
Polygon vertex indices.

Example

See the example for SI_MeshTextureCoords.

In a dotXSI file output by XSI Export, you will not see a data object like:


SI_MeshFace myMeshFace

{

	0;	// polygon index

	4;	// number of vertices

	0;	// index for vertex 0

	1;	// index for vertex 1

	2;	// index for vertex 2

	3;	// index for vertex 3

} 

Instead, you will see something like this in a SI_MeshNormals, SI_MeshTextureCoords, or SI_MeshVertexColors template:


0;4;0,1,2,3;,

1;4;4,5,6,7;,

2;4;8,9,10,11;,

3;4;12,13,14,15;,

4;4;16,17,18,19;,

5;4;20,21,22,23;; 

SI_MeshNormals

Specifies shading normals for polygon vertices.

This template allows you to define shading normal discontinuities at the vertex level, without the need to duplicate the vertices.

XSI Versions

v1.3/v2.0

Members
Member name
Type
Array size
Description
nNormals
int

Number of normal vectors defined.
normals
array Vector
nNormals
Normal vector array.
nFaceNormals
int

Number of polygon vertex normal indices.
faceNormals
nFaceNormals
Polygon vertex normal indices (specifies number of normals for each polygon, and then all the normal indices for all the vertices of the polygon).

Example

The mechanism is identical to the SI_MeshTextureCoords template, except that the indices point into a palette of shading normals.

SI_MeshTextureCoords

Specifies texture coordinates for polygon vertices.

This template allows you to define texture coordinate discontinuities at the vertex level, without the need to duplicate the vertices.

XSI Versions

v1.3/v2.0

Members
Member name
Type
Array size
Description
nTextureCoords
int

Number of texture coordinates defined.
textureCoords
array Coords2d
nTextureCoords
Texture coordinates array.
nFaceTextureCoords
int

Number of polygon vertex texture coordinate indices.
faceTextureCoords
nFaceTextureCoords
Polygon vertex texture coordinate indices (specifies index of texture coordinates for each vertex of each textured polygon in a mesh).

Example

Here is an example of a simple cube.


Mesh cube1 {

	8;		// 8 vertices 

	-0.500000;-0.500000;-0.500000;, // vert[0] 

	-0.500000;-0.500000;0.500000;,  // vert[1] 

	-0.500000;0.500000;-0.500000;,  // vert[2] 

	-0.500000;0.500000;0.500000;,   // vert[3] 

	0.500000;-0.500000;-0.500000;,  // vert[4] 

	0.500000;-0.500000;0.500000;,   // vert[5] 

	0.500000;0.500000;-0.500000;,   // vert[6] 

	0.500000;0.500000;0.500000;;    // vert[7] 



	6;		// 6 polygons 

	4;0,1,3,2;,		// poly[0]; vert[0], vert[1], vert[3], vert[2]

	4;1,5,7,3;,		// poly[1]; vert[1], vert[5], vert[7], vert[3]

	4;5,4,6,7;,		// poly[2]; vert[5], vert[4], vert[6], vert[7]

	4;4,0,2,6;,		// poly[3]; vert[4], vert[0], vert[2], vert[6]

	4;4,5,1,0;,		// poly[4]; vert[4], vert[5], vert[1], vert[0]

	4;2,3,7,6;;		// poly[5]; vert[2], vert[3], vert[7], vert[6]



	MeshMaterialList {

		...

		SI_Material {

			...

			SI_Texture2D {

			...

			}

		}

	}



	SI_MeshNormals {

	..

	}



	SI_MeshTextureCoords { 

		24;	// 24 UV coordinates (6 polys * 4 verts/poly) 

		0.000000;0.000000;,	 // UV[0] 

		0.000000;0.000000;,	 // UV[1] 

		0.000000;1.000000;,	 // UV[2] 

		0.000000;1.000000;,	 // UV[3] 

		0.000000;0.000000;,	 // UV[4] 

		1.000000;0.000000;,	 // UV[5] 

		1.000000;1.000000;,	 // UV[6] 

		0.000000;1.000000;,	 // UV[7] 

		1.000000;0.000000;,	 // UV[8] 

		1.000000;0.000000;,	 // UV[9] 

		1.000000;1.000000;,	 // UV[10] 

		1.000000;1.000000;,	 // UV[11] 

		1.000000;0.000000;,	 // UV[12] 

		0.000000;0.000000;,	 // UV[13] 

		0.000000;1.000000;,	 // UV[14] 

		1.000000;1.000000;,	 // UV[15] 

		1.000000;0.000000;,	 // UV[16] 

		1.000000;0.000000;,	 // UV[17] 

		0.000000;0.000000;,	 // UV[18] 

		0.000000;0.000000;,	 // UV[19] 

		0.000000;1.000000;,	 // UV[20] 

		0.000000;1.000000;,	 // UV[21] 

		1.000000;1.000000;,	 // UV[22] 

		1.000000;1.000000;;	 // UV[23] 



		6;	// 6 polygons 

		0;4;0,1,2,3;,	// poly[0]; 4 verts; UV[0], UV[1], UV[2], UV[3] 

		1;4;4,5,6,7;,	// poly[1]; 4 verts; UV[4], UV[5], UV[6], UV[7] 

		2;4;8,9,10,11;,	// poly[2]; 4 verts; UV[8], UV[9], UV[10], UV[11] 

		3;4;12,13,14,15;,	// poly[3]; 4 verts; UV[12], UV[13], UV[14], UV[15] 

		4;4;16,17,18,19;,	// poly[4]; 4 verts; UV[16], UV[17], UV[18], UV[19] 

		5;4;20,21,22,23;;	// poly[5]; 4 verts; UV[20], UV[21], UV[22], UV[23] 

	}

} 

SI_MeshVertexColors

Specifies vertex colors for polygon vertices.

This allows you to define vertex color discontinuities at the vertex level, without having to duplicate the vertices.

XSI Version

v1.3

Members
Member name
Type
Array Size
Description
nVertexColors
int

Number of vertex colors defined.
vertexColors
array ColorRGBA
nVertexColors
Vertex colors array.
nFaceVertexColors
int

Number of polygon vertex color indices.
faceVertexColors
nFaceVertexColors
Polygon vertex color indices (specifies index of vertex color for each vertex of each polygon in a mesh).

Example

The mechanism is identical to the SI_MeshTextureCoords template, with the difference that the indices point into a palette of vertex colors.

SI_Model

Contains all the information for one of the following objects:

SI_Model replaces the Frame template in version 2.0 of the dotXSI file.

XSI Version

v2.0/v3.0

Template

SI_Model <modelName>

{

// Transformations, either in a matrix or as SRT vectors 

	FrameTransformMatrix | SI_Transform SRT-<modelName> 

	{

		...

	}



// Base pose for IK chains and skeletons 

	SI_FrameBasePoseMatrix | SI_Transform BASEPOSE-<modelName> 

	{

		...

	}



// Models 

	SI_Mesh |  SI_Null | XSI_CurveList | SI_PatchSurface | XSI_SurfaceMesh

	{

		...

	}



// IK chain 

	SI_2D_2Joint_IK_Effector | SI_2D_2Joint_IK_Joint | SI_2D_2Joint_IK_Root 

	{

		...

	}



// Custom effect icon 

	<effectName> <modelName> 

	{

		...

	}



// User data for models 

	SI_ElementUserData_<tagName> 

	{

	}

	// ...more SI_ElementUserData templates... 



// Constraints 

	SI_Constraint 

	{

		...

	}

	...  // more constraints... 



// SRT animation 

	SI_TransformAnimation 

	{

		...

	}



// Children 

	SI_Model

	{

		...

	}

	...  // more children... 

} 

Examples

This example shows a simple chain with two joints, two local envelopes (the cones), and an animated effector.

This dotXSI fragment shows how the SI_Model templates are nested to represent a hierarchy:


SI_Model MDL-chn1 {



	SI_2D_2Joint_IK_Root chn1

		{

		"jnt1_1",

		"jnt1_2",

		"eff1",

	}



	SI_Model MDL-jnt1_1 {



		SI_2D_2Joint_IK_Joint jnt1_1

		{

		

		}



		SI_Model MDL-jnt1_2 {

			// ...

			SI_2D_2Joint_IK_Joint jnt1_2

			{

				// ... 

			}



			SI_Model MDL-eff1 {

				// ...

				SI_2D_2Joint_IK_Effector eff1

				{

					// ...

				}

			}



			SI_Model MDL-cone1 {

				// ...

				SI_Mesh MSH-cone1

				{

					 // ...

				}

			}

		}



		SI_Model MDL-cone2 {

			// ... 

			SI_Mesh MSH-cone2

			{

				// ...

			}

		}

	}

} 

Here's a more complete XSI fragment that shows all the templates output for a chain with envelopes.


SI_Model MDL-chn1 {

  SI_Transform SRT-chn1

  {

   1.0,0.998,1.0,

   0.0,0.0,0.0,

   -0.028358,4.070922,0.0,

  }



  SI_Transform BASEPOSE-chn1

  {

   1.0,0.998,1.0,

   0.0,0.0,0.0,

   -0.028358,4.070922,0.0,

  }



  SI_2D_2Joint_IK_Root chn1

  {

   "jnt1_1",

   "jnt1_2",

   "eff1",

  }



  SI_Model MDL-jnt1_1 {

   SI_Transform SRT-jnt1_1

   {

     1.0,1.0,1.0,

     0.0,0.0,-157.539627,

     0.0,0.0,0.0,

   }



   SI_Transform BASEPOSE-jnt1_1

   {

     1.0,1.0,1.0,

     -0.105912,0.177412,-80.781914,

     0.0,0.0,0.0,

   }



   SI_2D_2Joint_IK_Joint jnt1_1

   {

     0.0,0.0,-136.207794,

   }



   SI_Model MDL-jnt1_2 {

     SI_Transform SRT-jnt1_2

     {

      1.0,1.0,1.0,

      0.0,0.0,65.661148,

      2.828497,-0.0,0.0,

     }



     SI_Transform BASEPOSE-jnt1_2

     {

      1.0,1.0,1.0,

      0.0,0.0,91.992439,

      2.828497,0.0,0.0,

     }



     SI_2D_2Joint_IK_Joint jnt1_2

     {

      0.0,0.0,91.992439,

     }



     SI_Model MDL-eff1 {

      SI_Transform SRT-eff1

      {

        1.0,1.0,1.0,

        -1.833463,0.0,0.0,

        2.888311,-0.000001,0.0,

      }



      SI_Transform BASEPOSE-eff1

      {

        1.0,1.0,1.0,

        0.0,0.0,0.0,

        2.888311,0.0,0.0,

      }



      SI_2D_2Joint_IK_Effector eff1

      {

        // ... 

      }



      SI_TransformAnimation SRTANIM-eff1

      {

        1,

        SI_FCurve eff1-TRANSLATION-XYZ

        {

         "eff1",

         "TRANSLATION-XYZ",

         "LINEAR",

         3,1,

         50,

         1,-2.736975,0.103552,0.0,

         // ... 

         50,3.142071,0.299988,-0.017767,

        }



      }



     }



     SI_Model MDL-cone1 {

      SI_Transform SRT-cone1

      {

        0.325549,0.736785,0.352694,

        0.0,0.0,-101.051689,

        1.376,0.171174,0.0,

      }



      SI_Transform BASEPOSE-cone1

      {

        0.325549,0.736785,0.352694,

        0.0,0.0,-101.051666,

        1.376,0.171174,0.0,

      }



      SI_Mesh MSH-cone1

      {

        SI_Shape SHP-cone1-ORG

        {

         // ... 

        }



        SI_TriangleList

        {

         // ... 

        }



        SI_PolygonList

        {

         // ... 

        }



        SI_ShapeAnimation SHPANIM-cone1

        {

         "LINEAR",

         2,

         SI_FCurve cone1-SHPANIM-1

         {

           "cone1",

           "SHPANIM-1",

           "LINEAR",

           1,1,

           2,

           1,0.0,

           50,1.0,

         }



        }



      }



     }

   }



   SI_Model MDL-cone2 {

     SI_Transform SRT-cone2

     {

      0.325549,0.529636,0.352694,

      0.000331,0.178044,-75.729683,

      1.01251,-0.171254,-0.03829,

     }



     SI_Transform BASEPOSE-cone2

     {

      0.325549,0.529636,0.352694,

      0.000331,0.178044,-75.729683,

      1.01251,-0.171254,-0.03829,

     }



     SI_Mesh MSH-cone2

     {

      SI_Shape SHP-cone2-ORG

      {

        // ... 

      }



      SI_TriangleList

      {

        // ... 

      }



      SI_PolygonList

      {

        // ... 

      }



      SI_ShapeAnimation SHPANIM-cone2

      {

        "LINEAR",

        2,

        SI_Shape SHP-cone2-0

        {

         // ... 

        }



        SI_Shape SHP-cone2-1

        {

         // ... 

        }



        SI_FCurve cone2-SHPANIM-1

        {

         "cone2",

         "SHPANIM-1",

         "LINEAR",

         1,1,

         2,

         1,0.0,

         50,1.0,

        }

      }

     }

   }

  }

}



SI_EnvelopeList {

  4;

  SI_Envelope {

   "MDL-cone1";

   "MDL-jnt1_2";

   0;

  }

  SI_Envelope {

   "MDL-cone1";

   "MDL-eff1";

   0;

  }

  SI_Envelope {

   "MDL-cone2";

   "MDL-chn1";

   0;

  }

  SI_Envelope {

   "MDL-cone2";

   "MDL-jnt1_1";

   26;

   0;100.000000;,

   ...

   25;99.999992;;

  }

} 

This example shows two models and the icon for a persistent custom effect (the Chase effect, which causes the cube to chase the sphere). The SI_Model template for the custom effect icon stores the effect data.


SI_Model MDL-sphere1 {

  SI_Transform SRT-sphere1

  {

   // ... 

  }



  SI_Mesh MSH-sphere1

  {

   SI_Shape SHP-sphere1-ORG

   {

   }



   SI_TriangleList

   {

   }



  }



  SI_TransformAnimation SRTANIM-sphere1

  {

   1,

   SI_FCurve sphere1-TRANSLATION-XYZ

   {

     "sphere1",

     "TRANSLATION-XYZ",

     "LINEAR",

     3,1,

     100,

     1,-8.003719,0.0,0.0,

     // ... 

     100,-4.00186,-1.255231,0.125523,

   }



  }

}



SI_Model MDL-cube1 {

  SI_Transform SRT-cube1

  {

   1.0,1.0,1.0,

   0.0,0.0,0.0,

   8.40859,0.857385,-0.085738,

  }



  SI_Mesh MSH-cube1

  {

   SI_Shape SHP-cube1-ORG

   {

   }



   SI_TriangleList

   {

   }

  }



  SI_TransformAnimation SRTANIM-cube1

  {

   1,

   SI_FCurve cube1-TRANSLATION-XYZ

   {

     "cube1",

     "TRANSLATION-XYZ",

     "LINEAR",

     3,1,

     100,

     1,8.40859,0.857385,-0.085738,

     100,1.533862,-0.226494,0.022649,

   }

  }



}



// Custom effect icon 

SI_Model MDL-chase1 {

  SI_Transform SRT-chase1

  {

   1.0,1.0,1.0,

   0.0,0.0,0.0,

   -0.21047,-0.527895,0.368916,

  }



  SI_Mesh MSH-chase1

  {

   SI_Shape SHP-chase1-ORG

   {

   }



   SI_TriangleList

   {

   }

  }



 // Custom effect parameters

  Chase chase1

  {

   1;

   "sphere1";

   1;

   "cube1";

   "spdPrp",1.000000;

   "spdCns",0.000000;

  }

} 

SI_Null

Identifies a null object.

XSI Version

v3.0

Template

SI_Null 

{

} 

Example

SI_Model MDL-null

{

	SI_GlobalMaterial 

	{

		"Scene_Root",

		"BRANCH",

	}

	SI_Transform SRT-null { 

		1.000000, 

		1.000000, 

		1.000000, 

		0.000000, 

		0.000000, 

		0.000000, 

		0.000000, 

		0.000000, 

		0.000000, 

	}

	SI_Visibility 

	{ 

		1, 

	}

	SI_Null null 

{ 

	}

} 

SI_NurbsCurve

Stores NURBS curve information. It is similar to the NURBS Surface template except one parameter is used (either u or v) instead of two (u and v).

SI_NurbsCurves always stores curve data in IGES format.

XSI Version

v3.0

Template

SI_NurbsCurve

{

	<degree>,

	<closed>,

	<paramType>,

	<nbKnots>,

	<knots>,

	<nbControlPoints>,

	<controlPoints>,

} 

Example

XSI_CurveList  circle

{

	SI_NurbsCurve  circle

	{

		3;

		1;

		0;

		15;

		-2.000000; -2.000000; -1.000000; 0.000000;

		1.000000; 2.000000; 3.000000;4.000000; 5.000000;

		6.000000; 7.000000; 8.000000; 9.000000;

		10.000000;10.000000;;

		11;

		0.000000;5.540971;0.000000;1.000000;,

		3.918058;3.918058;0.000000;1.000000;,

		5.540971;0.000000;0.000000;1.000000;,

		3.918058;-3.918058;0.000000;1.000000;,

		0.000000;-5.540971;0.000000;1.000000;,

		-3.918058;-3.918058;0.000000;1.000000;,

		-5.540971;0.000000;0.000000;1.000000;,

		-3.918058;3.918058;0.000000;1.000000;,

		0.000000;5.540971;0.000000;1.000000;,

		3.918058;3.918058;0.000000;1.000000;,

		5.540971;0.000000;0.000000;1.000000;;

	}

} 

SI_NurbsSurface

Defines a NURBS surface.

This template provides a definition for existing NURBS representations, such as IGES. This ensures that the SI_NurbsSurface representation is compatible with most existing game engines and file formats.

SI_NurbsSurface always stores surface data in IGES format.

XSI Version

v1.3/v2.0/v3.0

Members
Member name
Type
Array size
Description
uvDegree
array int
2
Degree of surface in U and V.
uvClosed
array BOOLEAN
2
Surface is closed in U.
paramType
int

Knot parameterization of the NURBS curves:
0 = uniform
1 = non-uniform
2 = chord_length
3 = centripetal
nbUVKnots
array int
2
Number of IGES knots in U and V.
uKnots
array DOUBLE
nbUKnots
Knots in U.
vKnots
array DOUBLE
nbVKnots
Knots in V.
nbControlPoints
array int
3
Total number of IGES control points:
Number of control points in U
Number of control points in V
controlPoints
array vector
nbControlPoints[0]
Surface control points: x, y, z, w

Nested Templates
SI_ShapeAnimation (v2.0 only)

Comments

Closed in U or V implies that a surface is periodic (its continuity is degree -1 by formulation and not construction). In IGES format it implies an overlapping of degree control points, not just the last and first ones.

The IGES Nurbs representation implies:

Open curves have an extra order knot at the end and at the start (order = degree + 1).

Closed (periodic) curves have knot spacing overlap and an overlapping of degree control points.

The SOFTIMAGE|3D NURBS representation implies:


	nbControlPoints = nbKnots - (degree + 1) 


	nbControlPoints = nbKnots - 1 

The following table summarizes how the number of IGES control points and IGES knots are calculated.
Constant name
Open
Closed
nbSoftKnots
nbSoftPoints + degree - 1
nbSoftPoints + 1
nbIgesPoints
nbSoftPoints
nbSoftPoints + degree
nbIgesKnots
nbSoftKnots
nbSoftKnots + 2*degree


nbSoftPoints is the number of control points in U (or V) for a NURBS surface in SOFTIMAGE|3D. This is the number shown in the NURBS Surface Info dialog box.

nbSoftKnots is the number of knots in U (or V) for a NURBS surface in SOFTIMAGE|3D.

nbIgesPoints and nbIgesKnots are the numbers of U (or V) points and knots output in a dotXSI file.

Example

SI_NurbsSurface grid3 {

	1; 1;;	// Linear in U, V 

	1; 0;;	// Closed in U, Open in V 

	0;	// Uniform parameterization 

	6; 3;;	// 6 knots in U, 3 knots in V 

	0.000000; 0.000000; 1.000000; 2.000000; 3.000000; 3.000000; ;

	0.000000; 1.000000; 2.000000; ;

	12; 4; 3;;	// Number of control points: Total, U, V

// Control points: 

	-1.000000;0.000000;1.000000;1.000000;,

	0.000000;0.000000;1.000000;1.000000;,

	1.000000;0.000000;1.000000;1.000000;,

	-1.000000;0.000000;1.000000;1.000000;,

	-1.000000;0.000000;0.000000;1.000000;,

	0.000000;0.000000;0.000000;1.000000;,

	1.000000;0.000000;0.000000;1.000000;,

	-1.000000;0.000000;0.000000;1.000000;,

	-1.000000;0.000000;-1.000000;1.000000;,

	0.000000;0.000000;-1.000000;1.000000;,

	1.000000;0.000000;-1.000000;1.000000;,

	-1.000000;0.000000;-1.000000;1.000000;;



	SI_Material {

		...

		SI_Texture2D {

			...

		}

	}

} 

See also XSI_SurfaceMesh.

SI_PatchSurface

Defines a patch.

A patch is a surface defined by splines (Linear, Bézier, Cardinal, or B-Spline curves) in the U and V dimensions. Each dimension can use a different spline type. For example, a patch can be Linear in the U dimension and Cardinal in the V dimension.

Limitations

SOFTIMAGE|XSI does not export this template. If an XSI file contains this template, SOFTIMAGE|XSI converts the patch to a null object.

XSI Version

v1.3/v2.0/3.0

Members
Member name
Type
Array Size
Description
uvType
array int
2
Types of spline in U and V:
0 = Linear
1 = Bézier
2 = Cardinal
3 = B-Spline
uvTension
array float
2
Surface tensions in U and V (applies only to patches that are Cardinal in the U or V dimension).
uvClosed
array BOOLEAN
2
TRUE if surface is closed in the corresponding UV direction.
nbControlPoints
array int
3
- Total number of control points.
- Number of control points in U.
- Number of control points in V.
controlPoints
array Vector
nbControlPoints[0]
Patch control points.

Nested Templates
SI_ShapeAnimation (v2.0 only)

Comments

When a B-Spline patch is open in U or V, there are two extra control points in each open dimension. These extra control points are "phantom" keys used to define the interpolation of the surface at the beginning and end of the surface in each dimension.

SI_PolygonList

Specifies the positions, normals, colors, and uv coordinates for polygon vertices by indexing into the SI_Shape template that defines the mesh.

XSI Versions

v2.0/v3.0

Template

SI_PolygonList

{

	<nbPolygons>,

	"<NORMAL|COLOR|TEX_COORD_UV>"

	"<material>"

	<nbTotalVertices>

	<nbVertices[0]>		// Number of vertices in polygon 0 

	...		// Number of vertices in polygons 1, 2, ... 



	// Indices for polygon vertex positions 

	<v0>, <v1>, ..., <vnbVertices[0]-1>	// polygon 0 

	...					// polygons 1, 2, ... 



	// indices for polygon vertex normals 

	<n0>, <n1>, ..., <nnbVertices[0]-1>	// polygon 0 

	...										// polygons 1, 2, ... 



	// indices for polygon vertex colors 

	<c0>, <c1>, ..., <cnbVertices[0]-1>,	// polygon 0

	...										// polygons 1, 2, ... 



	// indices for polygon vertex uv coords 

	<uv0>, <uv1>, ..., <uvnbVertices[0]-1>,	// polygon 0

	...										// polygons 1, 2, ... 

} 

Data Members
Member
Type
Description
nbPolygons
int
Number of polygons in the mesh
<NORMAL|COLOR|TEX
_COORD_UV>
char *
Specifies what information is stored in the template. Can be one or more of the following:
- NORMAL
- COLOR
- TEX_COORD_UV
If more than one of these is present, use a vertical bar to separate the strings (for example, "NORMAL|COLOR").
Vertex positions are always present in a SI_PolygonList template.
<material>
char *
Name of the material.
vi
int
Index of a vertex position in the POSITIONS section of the SI_Shape template for the mesh.
ni
int
Index of a normal in the NORMAL section of the SI_Shape template for the mesh.
ci
int
Index of a color in the COLOR section of the SI_Shape template for the mesh.
uvi
int
Index of a UV coordinate in the TEX_COORD_UV section of the SI_Shape template for the mesh.

Example

SI_Model MDL-cube2 {

  SI_Transform SRT-cube2

  {

   1.0,1.0,1.0,

   0.0,0.0,0.0,

   0.0,0.0,0.0,

  }



  SI_Mesh MSH-cube2

  {

   SI_Shape SHP-cube2-ORG

   {

     2,

     "ORDERED",

     8,

     "POSITION",

     -0.5,-0.5,-0.5, // vertex[0] 

     -0.5,-0.5,0.5,  // vertex[1]

     -0.5,0.5,-0.5,  // vertex[2]

     -0.5,0.5,0.5,   // vertex[3]

     0.5,-0.5,-0.5,  // vertex[4]

     0.5,-0.5,0.5,   // vertex[5]

     0.5,0.5,-0.5,   // vertex[6]

     0.5,0.5,0.5,    // vertex[7]



     6,

     "NORMAL",

     -1.0,0.0,0.0,  // normal[0]

     0.0,0.0,-1.0,  // normal[1]

     0.0,-1.0,0.0,  // normal[2]

     0.0,0.0,1.0,   // normal[3]

     0.0,1.0,0.0,   // normal[4]

     1.0,0.0,0.0,   // normal[5]

   }



   SI_PolygonList

   {

     6,    // 6 polygons 

     "NORMAL",

     "MAT_SURFACE-TERRACOTTA001.1-1",

     24,   // 24 vertices 

     4,     // Each polygon in the cube has 4 vertices 

     4,

     4,

     4,

     4,

     4,



// Indices of the vertices in the POSITION section of the SI_Shape template 

     0,1,3,2,  // polygon[0] 

     1,5,7,3,

     5,4,6,7,

     4,0,2,6,

     4,5,1,0,

     2,3,7,6,  // polygon[5] 



// Indices of the normals in the NORMAL section of the SI_Shape template 

     0,0,0,0,  // polygon[0] 

     3,3,3,3,

     5,5,5,5,

     1,1,1,1,

     2,2,2,2,

     4,4,4,4,  // polygon[5] 

   }

  }

} 

SI_Scene

Contains global scene information

XSI Version

v2.0/v3.0

Template

SI_Scene <sceneName>

{

  "<Timing>",

  <start>,<end>,

  <frameRate>,

} 

Data Members
Member
Type
Description
Timing
char *
Specifies whether time values are expressed as frames or seconds.
Possible values are:
FRAMES | SECONDS
start
int | float
Start time (in either frames or seconds, depending on the value of the Timing flag) of the scene.
end
int | float
End time (in either frames or seconds, depending on the value of the Timing flag) of the scene.
frameRate
float
Frames per second.

Example

SI_Scene myTestScene

{

  "FRAMES",

  1,100,

  30.0,

} 

The same scene with timing expressed in seconds:


SI_Scene myTestScene

{

  "SECONDS",

  0.033333,3.333333,

  30.0,

} 

SI_Shape

Specifies a shape: vertex positions, normals, colors, and texture coordinates.

XSI Version

v2.0/v3.0

Template

// Ordered form used to define original shape 

SI_Shape SHP-<objectName>-ORG

{

	<nbShapeArrays>,

	"ORDERED",



// Arrays 

	<nbVertices>,

	"POSITION",

	<posx>,<posy>,<posz>,

	...

	<posx>,<posy>,<posz>,



	<nbNormals>,

	"NORMAL",

	<x>,<y>,<z>,

	...

	<x>,<y>,<z>,



	<nbVertexColors>,

	"COLOR",

	<r>,<g>,<b>,<w>,

	...

	<r>,<g>,<b>,<w>,



	<nbTxtCoordinates>,

	"TEX_COORD_UV",

	<u>,<v>,

	...

	<u>,<v>,

}

// Indexed form used in SI_ShapeAnimation to specify shape animation 



SI_Shape SHP-<objectName>-<shapeIndex>

{

	<nbShapeArrays>,

	"INDEXED",



// Arrays 

	<nbVertices>,

	"POSITION",

	<index>,<posx>,<posy>,<posz>,

	...

	<index>,<posx>,<posy>,<posz>,



	<nbNormals>,

	"NORMAL",

	<index>,<x>,<y>,<z>,

	...

	<index>,<x>,<y>,<z>,

} 

<index> is the (zero-based) index of an element (position, normal, color, or uv coordinate) in the corresponding array of the original shape.

For a mesh, the original shape definition is in the SI_Shape template named "SHP-<objectName>-ORG" that occurs outside of the SI_ShapeAnimation template. This is true only for meshes.

For a NURBS or patch surface, the original shape is defined by the SI_NurbsSurface or SI_PatchSurface.

SI_ShapeAnimation

Specifies shape animation, which is the animation of vertex positions, normals, colors, and texture coordinates.

Shape animation is stored as a series of shapes and an fcurve that assigns the shapes to times/frames.

XSI Version

v2.0/v3.0

Template

SI_ShapeAnimation SHPANIM-<objectName>

{

  "LINEAR",

  <nbShapes>,

  SI_Shape SHP-<objectName>-0

  {

   // ... 

  }



  // ... 



  SI_Shape SHP-<objectName>-<nbShapes - 1>

  {

   // ... 

  }



  SI_FCurve <objectName>-SHPANIM-1

  {

   // ... 

  }

} 

Examples

Shape animation is specified as list of SI_Shape templates, followed by an SI_Fcurve template that specifies which shape is shown at which frame.


SI_Model MDL-cube2 {



  SI_Mesh MSH-cube2

  {

   // Original shape 

   SI_Shape SHP-cube2-ORG

   {

     // ... 

   }



   SI_ShapeAnimation SHPANIM-cube2

   {

     "LINEAR",

     100,



     // shape 0 

     SI_Shape SHP-cube2-0

     {

      // ... 

     }



     // shape 1

     SI_Shape SHP-cube2-1

     {

      // ... 

     }



     ...



     // shape 99 

     SI_Shape SHP-cube2-99

     {

      // ... 

     }



     SI_FCurve cube2-SHPANIM-1

     {

      "cube2",

      "SHPANIM-1",

      "LINEAR",

      1,1,

      100,

      1,0.0,  // frame1, shape 0

      2,1.0,  // frame 2, shape 1

      // ... 

      100,99.0, // frame 100, shape 99

     }

   }

  }

} 

The position of a vertex in a shape is specified by the index of the vertex in the original shape, followed by the position coordinates in the shape.


SI_Mesh MSH-cube2

{

  // Original shape 

  SI_Shape SHP-cube2-ORG

  {

   1,

   "ORDERED",

   8,

   "POSITION",

   -0.5,-0.5,-0.5,      

   -0.5,-0.5,0.5,      

   -0.5,0.5,-0.5,      

   -0.5,0.5,0.5,       

   0.623872,-0.5,1.375891,  // vertex 4; this position is animated below 

   0.5,-0.5,0.5,       

   0.5,0.5,-0.5,       

   0.5,0.5,0.5,       



  }



  SI_ShapeAnimation SHPANIM-cube0

  {

   "LINEAR",

   100,

   SI_Shape SHP-cube2-0

   {

     4,

     "INDEXED",

     1,

     "POSITION",

     4,0.623872,-0.5,1.375891,

   }



   // ... 



   SI_Shape SHP-cube2-17

   {

     4,

     "INDEXED",

     1,

     "POSITION",

     4,2.737332,-0.5,1.477784,

   }



   // ... 



   SI_Shape SHP-cube2-55

   {

     4,

     "INDEXED",

     1,

     "POSITION",

     4,2.777072,-0.5,-1.902699,

   }



   // ...  

SI_SubelementUserDataPolygon_<userDataTag>

Stores polygon user data.

Limitations

SOFTIMAGE|XSI does not export this template. If an XSI file contains this template, SOFTIMAGE|XSI ignores it.

XSI Version

v1.3/v2.0/v3.0

Template

SI_SubelementUserDataPolygon_<userDataTag> {

	<nbSubelements>,



// Polygon indices 

	<polygonIndex>

	...		// more polygon indices 



// user data 

	<format>,		// 0=decimal dump, 1=formatted dump

	<endian>,		// 0=big, 1=little 



	// decimal dump 

	<length>,		// User data length 

	<byte1>, <byte2>, <byte3>, <byte4>,

	<byte5>, <byte6>, <byte7>, <byte8>,

	...

	...,<byteN>,



	// formatted dump 

	<float>,

	<int>,

	<boolean>,

	<short>,

	<byte>,

	<string>,

	<arraySize>,

	<element1>,

	...

	<elementN>,

} 

See Formatted User Data for more information on importing and exporting formatted user data.

SI_SubelementUserDataVertex_<userDataTag>

Stores vertex user data.

Limitations

SOFTIMAGE|XSI does not export this template. If an XSI file contains this template, SOFTIMAGE|XSI ignores it.

XSI Version

v1.3/v2.0/v3.0

Template
SI_SubelementUserDataVertex_<userDataTag> {
<nbSubelements>,

// Vertex indices
<vertexIndex>
... // more vertex indices

// user data
<format>, // 0=decimal dump, 1=formatted dump
<endian>, // 0=big, 1=little

// decimal dump
<length>, // User data length
<byte1>, <byte2>, <byte3>, <byte4>,
<byte5>, <byte6>, <byte7>, <byte8>,
...
...,<byteN>,

// formatted dump
<float>,
<int>,
<boolean>,
<short>,
<byte>,
<string>,
<arraySize>,
<element1>,
...
<elementN>,
}

See Formatted User Data for more information on importing and exporting formatted user data.

SI_Texture2D

Defines a 2D texture.

Limitations

SOFTIMAGE|XSI only imports and exports the first four parameters of this template for native XSI textures: the image's name, mapping type, width, and height.

XSI Version

v1.3/v2.0/v3.0

Members
Member name
Type
Description
imageName
STRING
Name of the image file.
mappingType
int
Type of mapping used to associate texture image to the geometry.
0 = XY projection
1 = XZ projection
2 = YZ projection
3 = UV map (unwrapped)
4 = UV map (wrapped)
5 = Cylindrical projection
6 = Spherical projection
7 = Reflection map
width
int
Number of horizontal pixels in image.
height
int
Number of vertical pixels in image.
cropUMin
int
Start of the cropping region in U.
cropUMax
int
End of the cropping region in U.
cropVMin
int
Start of the cropping region in V.
cropVMax
int
End of the cropping region in V.
UVSwap
Boolean
Indicates if the U and V orientations are swapped.
When FALSE, U goes from 0.0 (left) to 1.0 (right) and V goes from 0.0 (bottom) to 1.0 (top).
When TRUE, U goes from 0.0 (top) to 1.0 (bottom) and V goes from 0.0 (right) to 1.0 (left).
URepeat
int
Number of horizontal repetitions of the image.
VRepeat
int
Number of vertical repetitions of the image.
UAlternate
VAlternate
Boolean
Boolean
Specifies whether to mirror the texture horizontally (U) and vertically (V). Corresponds to the Tiling options in SOFTIMAGE|3D.
0;0;
1;0;
0;1;
1;1;
UScale
float
Scaling of image in U.
VScale
float
Scaling of image in V.
UOffset
float
Offset of image in U.
VOffset
float
Offset of image in V.
projectionMatrix
Matrix4x4
Texture projection matrix.
To compute the UV texture coordinates, you need to transform the geometry using the inverse of the texture projection matrix. This generates vertex positions in the the projection coordinate system. Then you compute the actual projection of the geometry into the UV domain defined by the projection method.
blendingType
int
Type of blending between texture and material attributes:
1 = Alpha Mask
2 = Intensity Mask
3 = No Mask
4 = RGB Modulation
blending
float
Normalized contribution of texture attributes (ambient, diffuse, specular, transparency, reflectivity).
Note: When blendingType is No Mask, this value corresponds to the Overall Blending parameter in the 2D Texture dialog box. Otherwise, this value is multiplied with either the alpha channel or the RGB intensity of the image pixels.
ambient
float
Normalized contribution of texture pixel colors to the material ambient color.
The weight used to normalize the contribution is a scalar and is multiplied by the average intensity of the global ambience.
Note: When this value is 0.0, SOFTIMAGE|3D uses the material ambient value. Otherwise, the texture ambient value is multiplied with the atmosphere ambience, and then blended with the material ambient color according to the blending value.
diffuse
float
Normalized contribution of texture pixel colors to the material diffuse color.
Note: If this value is 0.0, then SOFTIMAGE|3D uses the material diffuse value. Otherwise, it blends the texture diffuse value with the material diffuse color according to the blending value.
specular
float
Normalized contribution of texture pixel colors to the material specular color.
Note: If this value is 0.0, then SOFTIMAGE|3D uses the material specular value. Otherwise, it blends the texture specular value with the material specular color according to the blending value.
transparency
float
Normalized contribution of texture pixel colors to the material transparency level.
Note: If this value is 0.0, then SOFTIMAGE|3D uses the material transparency value. Otherwise, it blends the texture transparency value with the material transparency color according to the blending value.
reflectivity
float
Normalized contribution of texture pixel colors to the material reflectivity level.
Note: If this value is 0.0, then SOFTIMAGE|3D uses the material reflectivity value. Otherwise, it blends the texture reflectivity value with the material reflectivity color according to the blending value.
roughness
float
Bump mapping intensity and/or displacement of geometry along surface normals.
For bump mapping, mappingType determines the axis frame or bump basis vectors, which displaces the normals (according to the differences in values between neighboring pixels along the U and V axes).

Nested Templates
Texture user data.

Example

See also the example for SI_Material.

SI_Material {
0.700000;0.700000;0.700000;1.000000;;
50.000000;
1.000000;1.000000;1.000000;;
0.000000;0.000000;0.000000;;
2;
0.500000;0.500000;0.500000;;

SI_Texture2D {
"CITY-london.pic"; // imageName
0; // mappingType
512;432; // width, height
0;511;0;431; // cropUMin, cropUMax, cropVMin, cropVMax
0; // UVSwap
1;1; // URepeat, VRepeat
0;0; // UAlternate, VAlternate
1.000000;1.000000; // UScale, VScale
0.000000;0.000000; // UOffset, VOffset

1.000000,0.000000,0.000000,0.000000, // projectionMatrix
0.000000,1.000000,0.000000,0.000000,
0.000000,0.000000,1.000000,0.000000,
0.000000,0.000000,0.000000,1.000000;;

3; // blendingType
1.000000; // blending
0.750000; // ambient
1.000000; // diffuse
0.000000; // specular
0.000000; // transparency
0.000000; // reflectivity
0.000000; // roughness
}
}

SI_Transform

Specifies an SRT transformation as three vectors.

Provides a default (or base) transform for an object.

SI_Transform can be used in place of the FrameTransformMatrix (for example, to avoid having to extract the vectors from a transformation matrix).

SOFTIMAGE|3D outputs a SI_Transform template when the Transforms option is set to SRT Values. Otherwise, a FrameTransformMatrix template is exported.

XSI Version

v2.0/v3.0

Template

SI_Transform <SRT | BASEPOSE>-<objectName>

{

  <scalX>,<scalY>,<scalZ>,

  <rotX>,<rotY>,<rotZ>,

  <transX>,<transY>,<transZ>,

} 

Data Members
Member
Type
Description
scalX, scalY, scalZ
float
Scaling vector.
rotX, rotY, rotZ
float
Rotation vector.
transX, transY, transZ
float
Translation vector.

Example

Transforms for a simple sphere:


SI_Model MDL-sphere1 {

  SI_Transform SRT-sphere1

  {

   1.0,1.0,1.0,

   0.0,0.0,0.0,

   -8.003719,0.0,0.0,

  }

  ...

} 

Transforms for a chain:


SI_Model MDL-chn95 {

  SI_Transform SRT-chn95

  {

   1.0,0.998,1.0,

   0.0,0.0,0.0,

   -0.028358,4.070922,0.0,

  }



  SI_Transform BASEPOSE-chn95

  {

   1.0,0.998,1.0,

   0.0,0.0,0.0,

   -0.028358,4.070922,0.0,

  }

  ...

} 

SI_Transform
Animation

Stores SRT fcurves.

XSI Versions

v2.0. Not supported in v3.0. Replaced by SI_Fcurve.

Template

SI_TransformAnimation SRTANIM-<objectName>

{

	<nbFcurves>,

	SI_FCurve <template_name>

	{

		// ... 

	}

	...  // more SI_FCurve templates... 

} 

Data Members
Member
Type
Description
nbFcurves
int
Number of SI_Fcurve templates in this SI_TransformAnimation template.

Nested Templates
Template
Description
Scaling, rotation, and translation fcurves.

Example

See the examples for SI_Model.

SI_TriangleList

Specifies the positions, normals, colors, and uv coordinates for triangle vertices by indexing into the SI_Shape template that defines the mesh.

XSI Versions

v2.0/v3.0

Template
SI_TriangleList
{
<nbTriangles>,
"<NORMAL|COLOR|TEX_COORD_UV>"
"<material>"

// indices of triangle vertex positions
<v0>, <v1>, <v2>, // triangle 0
... // triangles 1, 2, ...

// indices of triangle vertex normals
<n0>, <n1>, <n2>, // triangle 0
... // triangles 1, 2, ...

// indices of triangle vertex colors
<c0>, <c1>, <c2>, // triangle 0
... // triangles 1, 2, ...

// triangle vertex uv coords
<uv0>, <uv1>, <uv2>, // triangle 0
... // triangles 1, 2, ...

}
Data Members
Member
Type
Description
nbTriangles
int
Number of triangles in the tessellation.
<NORMAL|COLOR|TEX
_COORD_UV>
char *
Specifies what triangle information is stored in the template. Can be one or more of the following:
NORMAL
COLOR
TEX_COORD_UV
If more than one of these is present, use a vertical bar to separate the strings (for example, "NORMAL|COLOR").
Vertex positions are always present in a SI_TriangleList template.
<material>
char *
Name of the material.
vi
int
Index of a vertex position in the POSITIONS section of the SI_Shape template for the mesh.
ni
int
Index of a normal in the NORMAL section of the SI_Shape template for the mesh.
ci
int
Index of a color in the COLOR section of the SI_Shape template for the mesh.
uvi
int
Index of a UV coordinate in the TEX_COORD_UV section of the SI_Shape template for the mesh.

Example
SI_MaterialLibrary MATLIB-myCube
{
1,
SI_Material MAT_SURFACE-TERRACOTTA001.1-1
{
0.75,0.55,0.333,1.0,
250.0,
1.0,1.0,1.0,
0.0,0.0,0.0,
5,
1.0,0.733,0.444,

SI_Texture2D {
"noIcon.pic";
4;
50;75;
0;49;0;74;
0;
1;1;
0;0;
1.000000;1.000000;
0.000000;0.000000;
1.000000,0.000000,0.000000,0.000000,
0.000000,1.000000,0.000000,0.000000,
0.000000,0.000000,1.000000,0.000000,
0.000000,0.000000,0.000000,1.000000;;
3;
0.000000;
0.000000;
0.000000;
0.000000;
0.000000;
0.000000;
4.014000;
}
}
}


SI_Model MDL-cube2 {
SI_Transform SRT-cube2
{
1.0,1.0,1.0,
0.0,0.0,0.0,
0.0,0.0,0.0,
}

SI_Mesh MSH-cube2
{
SI_Shape SHP-cube2-ORG
{
4,
"ORDERED",
8,
"POSITION",
-0.5,-0.5,-0.5,
-0.5,-0.5,0.5,
-0.5,0.5,-0.5,
-0.5,0.5,0.5,
0.623872,-0.5,1.375891,
0.5,-0.5,0.5,
0.5,0.5,-0.5,
0.5,0.5,0.5,

15,
"NORMAL",
-1.0,0.0,0.0,
0.313313,-0.880909,-0.354731,
0.313313,-0.880909,-0.354731,
0.0,0.0,1.0,
0.0,-1.0,0.0,
0.552001,-0.552001,-0.624972,
0.0,1.0,0.0,
0.578086,0.576982,0.576982,
0.32551,0.324888,0.88797,
0.32551,0.324888,0.88797,
0.32551,0.88797,0.324888,
0.32551,0.88797,0.324888,
0.250917,0.684485,0.684485,
0.250917,0.684485,0.684485,
0.250917,0.684485,0.684485,

4,
"COLOR",
0.74902,0.54902,0.329412,1.0,
0.058824,0.937255,0.894118,1.0,
0.184314,0.337255,0.811765,1.0,
0.984314,0.0,0.419608,1.0,

4,
"TEX_COORD_UV",
0.0,0.0,
0.0,4.0,
3.0,0.0,
3.0,4.0,

}

SI_TriangleList
{
12,
"NORMAL|COLOR|TEX_COORD_UV",
"MAT_SURFACE-TERRACOTTA001.1-1",
0,1,3,
0,3,2,
1,5,7,
1,7,3,
7,5,4,
7,4,6,
4,0,2,
4,2,6,
0,4,5,
0,5,1,
2,3,7,
2,7,6,

0,0,0,
0,0,0,
3,8,12,
3,12,3,
13,9,7,
13,7,10,
1,1,5,
1,5,5,
2,2,4,
2,4,4,
6,6,14,
6,14,11,

0,0,0,
0,0,0,
1,0,3,
1,3,2,
0,0,0,
0,0,0,
0,0,0,
0,0,0,
0,0,0,
0,0,0,
0,0,0,
0,0,0,

0,0,1,
0,1,1,
0,2,3,
0,3,1,
3,2,2,
3,2,3,
2,0,1,