Studio Model Data

From NFBSP

Jump to: navigation, search

Contents

Version

SMD version. This is required exactly as it appears below or it will refuse to compile.

Example:

version 1

Node Tree Data

"Nodes" and "Bones Table" is used interchangably.

Starts with:

nodes

Ends with:

end

Each node has three parts:

Name Datatype Comments
ID uint Used to identify a specific node.
Name string The name which is copied directly to the MDL. Names have a maximum length of 64 characters.
ParentID int Links this node to another node. "-1" is used to signify no parent.

Example:

0 "Root" -1

Skeleton Prose Data

Starts with:

skeleton

Ends with:

end

Each bone has at least two parts:

Time:

Name Datatype Comments
Frame int At this frame...

Bone(s): - Note: The compiler can only handle 128 (0-127) bones!

Name Datatype Comments
BoneID uint The bone to manipulate.
PosX float X-axis location.
PosY float Y-axis location.
PosZ float Z-axis location.
RotX float Rotation (in radians) of the X-axis.
RotY float Rotation (in radians) of the Y-axis.
RotZ float Rotation (in radians) of the Z-axis.

Example:

time 0
0 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000

Triangle Block

"Triangles" block is the basis for the structure of all models.

Starts with:

triangles

Ends with:

end

Each triangle has at least two parts:

Texture:

Name Datatype Comments
File string The name of the image to load not including any directories.

Verticies:

Name Datatype Comments
Effect string "$blended"
Blends byte Must be 4 or else the compiler will error.
Bone[0] sbyte Hardware Blending Bone
Scale[0] float Hardware Blending Scale
Bone[1] sbyte Hardware Blending Bone
Scale[1] float Hardware Blending Scale
Bone[2] sbyte Hardware Blending Bone
Scale[2] float Hardware Blending Scale
Bone[3] sbyte Hardware Blending Bone
Scale[3] float Hardware Blending Scale
PosX float Position X-axis
PosY float Position Y-axis
PosZ float Position Z-axis
NormX float Normal X-axis
NormY float Normal Y-axis
NormZ float Normal Z-axis
TexU float The U component of the UV texture coordinates.
TexV float The V component of the UV texture coordinates.

Example:

my_fav_texture.png
$blended 4  -1 1.0000 -1 0.0000 -1 0.0000 -1 0.0000 0.000000 -100.000000 50.000000 0.0000 0.0000 1.0000 1.000000 1.000000
$blended 4  -1 1.0000 -1 0.0000 -1 0.0000 -1 0.0000 0.000000 -100.000000 50.000000 0.0000 0.0000 1.0000 1.000000 1.000000
$blended 4  -1 1.0000 -1 0.0000 -1 0.0000 -1 0.0000 0.000000 -100.000000 50.000000 0.0000 0.0000 1.0000 1.000000 1.000000

See Also

Related Tools

External Links

Personal tools