Introduction | Index
Trimesh Node
Defines a node containing geometry.

Syntax:

node trimesh [node_name]

     Properties

     Vertex List

     Face List

     Texture Vertex List

endnode

Description:

This node contains geometric data. It contains a list of verticies and texture coordinates, as well as a list of faces that refer to them.

Properties:

parent [node_name] - the parent node in the tree. All nodes have this property. Top level nodes use NULL.

The following three properties are optional:

position [X] [Y] [Z] - The position in 3d space of this node.
orientation [X-Axis] [Y-Axis] [Z-Axis] [rotation_ammount] - the node is rotated around the axis given in x,y,z
wirecolor [red] [green] [blue] - This probably defines the color for the object's wireframe.

These probably define an opengl material to use for the object. They affect the color and lighting properties of the object. These values combine with the light color and the texture to determine the color of the final object. Ambient light affects all objects in the scene equally. Diffuse light comes from a specific light source. Specular controls the color of specular highlights on shiny objects and shininess controls how shiny an object is. Depending on how texture mapping is done diffuse and ambient colors may have no effect on textured objects. Probably all of these values range from 0 to 1.

ambient [red] [green] [blue]
diffuse [red] [green] [blue]
specular [red] [green] [blue]
shininess [ammount]

bitmap [file_name] - the name of the texture map to use for this node.

(The following properties appear in spell_01.mdl)

danglymesh [??] - Unknown.

period [float] - Unknown. Period could relate to some kind of procedural animation information. Or even procedural geometry or deformation. More experimentation is needed.

tightness [float] - Unknown. Like period there are several possible interpertations of this.

displacement [float] - Unknown. Like period there are several possible interpertations of this.

showdispl [true|false] - Unknown.

displtype [??] - Unknown.

alpha [float] - Unknown. Probably related to transparency.

transparencyhint [??] - Unknown.

tilefade [??] - Unknown.

scale [float] - Possibly a uniform scale parameter. I haven't tested this one yet.

render [??] - Unknown.

Shadow [??] - Unknown. Could indicate if the mesh casts a shadow.

beaming [??] - Unknown.

inheritcolor [??] - Unknown.

selfillumcolor [red] [green] [blue] - This is the missing property used by opengl materials. This probably makes the mesh seem to "glow". The mesh does not act as a light source however.

rotatetexture [??] - Unknown.

center [x] [y] [z] - This may be the center of the node. This could possibly affect rotations.

gizmo SubAnim:Gizmo - Unknown. With this one I'm not even sure what the syntax is. It appears to relate to additional animation information. The associated animation node has a gizmokey (gizmo key) property.

Sections:

Trimesh nodes have three sections.

Vertex List - A list of points in 3d space that make up the surface of the mesh.

Face List - A list of faces, each one a triangle with end points chosen from the vertex list. Each face is mapped to a set of texture coordinates.

Texture Vertex List - A list of texture coordinates.


Introduction | Index

Document URL: http://www.wnwn.net/mdl/

Worlds of NeverWinter: http://www.wnwn.net/

This document is not supported by Bioware and should not be taken as an official specification for the NWN model format. It is based on my own experiments with the model viewer and speculations by others in the NWN community. There may be errors or omissions in this document, if you find any please let me know at: sorcerer@wnwn.net. The format may also change before the game is released. Finally I would like to thank the great community on the bioware forum for their contributions to this project.