IM files

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
m
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
'''IM Files''' are the mesh files that display all solid objects in Trainz.
 
  
 +
''Please note that this document is obsolete as of trainz-build 4.5. Trainz now imports from the [[FBX file format]], which is widely used as a generic interchange format. The IM file format is still supported for backwards compatibility but may not support newer features and techniques.''
  
'''Indexed Mesh''' files were developed by [[Auran]] as part of the Auran Jet gaming engine that is used in the Trainz Simulators.
 
  
 +
[[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.
  
The IM file contains all of the geometric and texture mapping data needed to render a solid object.
 
  
 +
IM files contain the following approximate structure:
  
Any surface or solid object can be rendered as a series of triangular facets. The IM file stores the 3d x,y,z coordinates of all the facets and the texture mapping data to allow the object to be displayed with the correct surface colours. The separate texture images are referenced by the mesh to achieve this.
+
* 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 Auran for '3DSMax'.  The content creator builds the model in 3DSMax and exports the IM file for use in Trainz. Additionally an exporter is available for the free program, 'Blender'.  Auran'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.
 
  
 +
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.
  
Auran 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...   
+
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...   
  
  
Line 20: Line 51:
  
 
[[Category:File formats]]
 
[[Category:File formats]]
 +
[[Category:Blender]]

Latest revision as of 20:20, 12 September 2017

Please note that this document is obsolete as of trainz-build 4.5. Trainz now imports from the FBX file format, which is widely used as a generic interchange format. The IM file format is still supported for backwards compatibility but may not support newer features and techniques.


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
    • 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 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.

Personal tools