|
|
|
|
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.
- dotXSI v3.0 File Format.
- dotXSI v2.0 File Format.
- dotXSI v1.3 File Format.
- Formatted User Data.
- Custom Effects.
- dotXSI Templates.
- Reference.
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:
- Imported into and exported from SOFTIMAGE|3D (v3.8 and later) and SOFTIMAGE|XSI 1.5.
- Exported from SOFTIMAGE|3D and SOFTIMAGE|XSI and imported into the XSI Viewer.
- Used to exchange scene data between SOFTIMAGE|3D and SOFTIMAGE|XSI.
- Imported into third-party software.
- Converted into other file formats.
- Extended and customized to meet any special needs.
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
- On-target reference viewers that allow the preview and validation of dotXSI files.
- XSI Viewer is free and publicly available, providing baseline support for dotXSI files.
- Supported platforms: Win32 OGL, Win98 D3D, and Win98 OGL.
SOFTIMAGE|FTK
A toolkit that allows you to easily implement support for the dotXSI file format. The toolkit includes:
- dotXSI file I/O library (.lib).
- dotXSI file I/O library headers (.h).
- Visual Studio project and views (developer environment).
- Documentation, including file format specification and examples.
XSI Viewer SDK
- Plugging XSI support into your own products.
- Customizing the file format.
- Writing plug-ins for the previewing tools.
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.
Obsolete Templates
Changes to Existing Templates
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.
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).
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.
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
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" BOOLEANThe 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 FLOATThe 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).
<effectName> <nbParameters> "<ParameterName>" <type> ...
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" FLOATdotXSI Templates
File Header
All dotXSI files must begin with a header. The file header indicates the file format and its revision number.
Example
For example, the dotXSI files generated with XSI Export v1.3 plug-in begin with:
xsi 0103txt 0032Reading left to right, this indicates:
XSI v2.0 files generated begin with:
xsi 0200txt 0032Reference
The following sections provide details about the data stored in each of the dotXSI file templates.
SI_2D_2Joint_IK
_EffectorStores 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
Template
SI_Ambience { <red>, <green>, <blue>, }Members
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
Template
SI_Angle { <type>; }Members
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
Members
keyType int 0 = quaternion rotations1 = scaling2 = translation3 = 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
ParamKeyDefines animation of any template parameter.
XSI Version
Members
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
XSI Version
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
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
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
Nested Templates
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
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
XSI Version
Template
SI_Constraint <objectName>-<constraintType> { "<objectName>", "<constraintType>", <nbConstrainingObjects>, "<constrainingObjectName>", ... // more constraining objects }
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
Members
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
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
Members
VertexWeights
Comments
- A vertex of an envelope can be assigned to one or more joints, but the sum of all its weights is always 100.0.
- The envelope and deformer are strings. They refer to object names.
- An SI_Envelope may have 0 vertices. In SOFTIMAGE|3D, this corresponds to the situtation in whichthe envelope is assigned to a skeleton, but all its vertices are weighted 0 relative to the referenced joint.
Example
See the example for SI_EnvelopeList.
SI_EnvelopeList
XSI Version
Members
Nested Templates
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
Template
SI_FileInfo { "<projectName>", "<userName>", "<savedDateTime> "<originator>, }SI_FCurve
XSI Version
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
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):For lights (v2.0):For lights (v3.0):For models (v2.0):For models (v3.0):For Fog (v3.0 only - not supported by SOFTIMAGE|XSI):For materials (v3.0 only): Interpolation char * Possible values are: 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
Members
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:
- Vertex fog (where the rendering engine computes the vertex colors normally, and then modifies given vertex distance to camera and simply linearly interpolates on surfaces) or
- Pixel fog (where the normal rendering color is computed, and then the color is modulated using the Z-buffer pixel value).
SOFTIMAGE|3D supports vertex fog only.
SI_FrameBasePose
MatrixSpecifies the scaling, rotation, and translation of the base position of a skeleton.
XSI Version
Members
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
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
Template
SI_IK_Effector <effector name> { <rotation flag> }SI_IK_Joint
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
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
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
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
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
XSI Version
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
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
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
Nested Templates
Color and position fcurves for infinite and point lights.Color, position, interest, cone, and spread fcurves for spotlights.
SI_Material
XSI Version
Members
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
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
XSI Versions
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
Members
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
Members
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
Members
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 Version
Members
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_Model
Contains all the information for one of the following objects:
- A mesh, surface mesh, curve list, patch surface or a null
- A root, effector, or joint of an IK chain
- A custom effect icon
- A SOFTIMAGE|XSI model
SI_Model replaces the Frame template in version 2.0 of the dotXSI file.
XSI Version
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
XSI Version
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
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
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
Members
Nested Templates
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:
- Open curves have an extra degree knot at both the end and start, with the number of control points given by:
nbControlPoints = nbKnots - (degree + 1)nbControlPoints = nbKnots - 1The following table summarizes how the number of IGES control points and IGES knots are calculated.
nbSoftKnots nbSoftPoints + degree - 1 nbSoftPoints + 1 nbIgesPoints nbSoftPoints nbSoftPoints + degree nbIgesKnots nbSoftKnots nbSoftKnots + 2*degreenbSoftPoints 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
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
Members
Nested Templates
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
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
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
Template
SI_Scene <sceneName> { "<Timing>", <start>,<end>, <frameRate>, }Data Members
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
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
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>
Limitations
SOFTIMAGE|XSI does not export this template. If an XSI file contains this template, SOFTIMAGE|XSI ignores it.
XSI Version
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>
Limitations
SOFTIMAGE|XSI does not export this template. If an XSI file contains this template, SOFTIMAGE|XSI ignores it.
XSI Version
Template
See Formatted User Data for more information on importing and exporting formatted user data.
SI_Texture2D
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
Members
Nested Templates
Example
See also the example for SI_Material.
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
Template
SI_Transform <SRT | BASEPOSE>-<objectName> { <scalX>,<scalY>,<scalZ>, <rotX>,<rotY>,<rotZ>, <transX>,<transY>,<transZ>, }Data Members
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, } ... }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
AnimationXSI 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
Nested Templates
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
Template
Data Members
Example