IM files
m |
|||
Line 1: | Line 1: | ||
− | + | [[IM files]] ("Indexed Mesh" files) store the mesh data that define the majority of solid geometry in Trainz. The file format was originally developed Auran (now [[N3V Games]]) as part of the Auran Jet gaming engine that was used for the original Trainz Simulators. The new E2 engine introduced in [[TANE]] also imports from this file format. | |
− | + | IM files contain the following approximate structure: | |
+ | * Render Chunks | ||
+ | ** Material Descriptor | ||
+ | *** Material Name - Selects one of the supported [[Material Types|material types]] and can be used for material sharing. | ||
+ | *** Lighting Parameters - [[material emissive color]], [[material diffuse color]], [[material specular color]], [[material shininess]]. | ||
+ | *** Texture Slots | ||
+ | **** Texture Path - Selects a texture resource (*.texture) relative to the mesh file. | ||
+ | ** Vertex Data | ||
+ | *** Position | ||
+ | *** Normal | ||
+ | *** Texture Coordinates | ||
+ | *** Skinned Animation Bone Selection and Weights | ||
+ | *** (etc) | ||
+ | ** Index Data | ||
+ | ** Rigid Animation Data - obsolete rigid-body animation support, where each chunk is assigned exactly one bone. | ||
+ | *** Position | ||
+ | *** Orientation | ||
+ | *** Scale | ||
+ | * Skinned Animation Data - skinned animation support, where each vertex is assigned zero or more bones. | ||
+ | ** Bones | ||
+ | *** Bone Name | ||
+ | *** Parent Bone Name | ||
+ | *** Default Position | ||
+ | *** Default Orientation | ||
+ | *** Default Scale | ||
+ | * Attachment Points | ||
+ | ** Name - Various named [[Attachment Points|attachment points]] are used by the Trainz game code for specific purposes. Custom attachment names may be used by the [[config.txt file]] or from script. | ||
+ | ** Position | ||
+ | ** Orientation | ||
− | |||
− | |||
− | |||
Indexed Meshes are generated by the exporter plug-ins provided by N3V Games for '3DSMax'. The content creator builds the model in 3DSMax and exports the IM file for use in Trainz. | Indexed Meshes are generated by the exporter plug-ins provided by N3V Games for '3DSMax'. The content creator builds the model in 3DSMax and exports the IM file for use in Trainz. |
Revision as of 11:54, 16 October 2015
IM files ("Indexed Mesh" files) store the mesh data that define the majority of solid geometry in Trainz. The file format was originally developed Auran (now N3V Games) as part of the Auran Jet gaming engine that was used for the original Trainz Simulators. The new E2 engine introduced in TANE also imports from this file format.
IM files contain the following approximate structure:
- Render Chunks
- Material Descriptor
- Material Name - Selects one of the supported material types and can be used for material sharing.
- Lighting Parameters - material emissive color, material diffuse color, material specular color, material shininess.
- Texture Slots
- Texture Path - Selects a texture resource (*.texture) relative to the mesh file.
- Vertex Data
- Position
- Normal
- Texture Coordinates
- Skinned Animation Bone Selection and Weights
- (etc)
- Index Data
- Rigid Animation Data - obsolete rigid-body animation support, where each chunk is assigned exactly one bone.
- Position
- Orientation
- Scale
- Material Descriptor
- Skinned Animation Data - skinned animation support, where each vertex is assigned zero or more bones.
- Bones
- Bone Name
- Parent Bone Name
- Default Position
- Default Orientation
- Default Scale
- Bones
- Attachment Points
- Name - Various named attachment points are used by the Trainz game code for specific purposes. Custom attachment names may be used by the config.txt file or from script.
- Position
- Orientation
Indexed Meshes are generated by the exporter plug-ins provided by N3V Games for '3DSMax'. The content creator builds the model in 3DSMax and exports the IM file for use in Trainz.
Models can also be built in the the free 3D Blender application. See HowTo/Export from Blender for the export process. N3V's 'TrainzMeshImporter' is used, in this case, to create the IM file from an intermediate XML file.
The exporters can be obtained from the downloads page of this Wiki.
N3V Games provides no editing or manipulation programs for Indexed Meshes, and third party progammers are requested not to alter mesh files. If any changes are needed, the mesh creator must do it...
There is no need for the Trainz user to know the workings of the IM file, so no further data is provided here.