Template Archives


The templates in this chapter are no longer used by the current version of the dotXSI file format. They are provided here as legacy information.

Template
Version
Description
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
Adds support for Euler rotation keys.
1.3
Supports the animation of any template parameter.
1.3
Stores camera fcurves.
1.3/2.0/3.0
Stores the scaling, rotation, and translation of the base position of a skeleton.
2.0
Stores light fcurves.
1.3/2.0/3.0
Stores animation data for polygon vertices.
1.3/2.0/3.0
Adds support for shading normal discontinuities at the vertex level.
1.3/2.0/3.0
Adds support for texture coordinate discontinuities at the vertex level.
1.3/2.0/3.0
Adds support for vertex color discontinuities.
2.0
Stores SRT fcurves.

SI_2D_2Joint_IK _Effector

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

XSI Version

v1.3/v2.0. Made obsolete 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. Made obsolete 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. Made obsolete 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_AnimationKey

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

XSI Version

v1.3 Made obsolete in v2.0.

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. Made obsolete in v2.0.

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 
} 

Example: 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;;;
		}
	}
} 

Example: 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_CameraAnimation

Stores camera fcurves.

XSI Version

v2.0. Made obsolete in v3.0. Replaced by SI_FCurve.

Template

SI_CameraAnimation CAMANIM-<cameraName>
{
	<nbFcurves>,
	SI_FCurve <template_name>
	{
		// … 
	}
	...  // more SI_FCurve templates… 
} 

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_FrameBasePose Matrix

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

Limitations

XSI Version

v1.3/v2.0/v3.0. Made obsolete in v3.5. Replaced by SI_Transform.

Members

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

SI_LightAnimation

Stores light fcurves.

XSI Version

v2.0. Made obsolete in v3.0. Replaced by SI_FCurve.

Template

SI_LightAnimation LIGHTANIM-<lightName>
{
	<nbFcurves>,
	SI_FCurve <template_name>
	{
		// … 
	}
	...  // more SI_FCurve templates… 
} 

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_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/v3.0. Made obsolet in v3.5, this template is replaced by SI_Shape, which is nested in the SI_Mesh template.

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/v3.0. Made obsolet in v3.5, this template is replaced by SI_Shape, which is nested in the SI_Mesh template.

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
array SI_MeshFace
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/v3.0. Made obsolet in v3.5, this template is replaced by SI_Shape, which is nested in the SI_Mesh template.

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
array SI_MeshFace
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 Versions

v1.3/v2.0/v3.0. Made obsolet in v3.5, this template is replaced by SI_Shape, which is nested in the SI_Mesh template.

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
array SI_MeshFace
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_TransformAnimation

Stores SRT fcurves.

XSI Versions

v2.0. Made obsolete in v3.0. Replaced by SI_FCurve.

Template

SI_TransformAnimation SRTANIM-<objectName>
{
	<nbFcurves>,
	SI_FCurve <template_name>
	{
		// … 
	}
	...  // more SI_FCurve templates… 
} 

Members

Member
Type
Description
nbFcurves
int
Number of SI_Fcurve templates in this SI_Transfor
mAnimation
template.

Nested Templates

Template
Description
Scaling, rotation, and translation fcurves.

Example

See the examples for SI_Model.