Microsoft Train Simulator Modeling3D Canvas Pro includes the ability to export models to Microsoft Train Simulator's shape format (.s). A number of technical documents relating to the creation of models for Microsoft Train Simulator are provided with Microsoft Train Simulator. This tutorial does not attempt to explain information provided in these documents. Before beginning any models intended to be used with Microsoft Train Simulator, you should disable the rendering of two-sided faces (Tools->Options->Device->Render Two-Sided Faces). Microsoft Train Simulator does not render the interior sides of faces (polygons). This means that faces are only visible from one side. This is done to improve performance. The fact that faces are only visible from one side is usually not a problem in practice since most objects are solid and the interior faces are not visible. Modeling in 3D Canvas Pro This is a very simple model of a building created in 3D Canvas Pro: The same model as seen in Microsoft Train Simulator: Many of 3D Canvas' material attributes are not supported by Microsoft Train Simulator. The only material attributes that Microsoft Train Simulator supports are texture mapping, ambient brightness and specular highlighting. Typically materials should be applied using an ambient level of 20 and a non-zero specular level. This will produce models that look appropriate in Microsoft Train Simulator. Also, textures can only be applied using flat wrapping unless they are being applied to a subset of the object's faces. Microsoft Train Simulator does not support varying ambient levels per object so if you apply different ambient levels to different parts of an object they will be averaged on export. You can however change the ambient level on sub-objects to make them different than the main object. Any ambient level higher than 20 will be set to 20 on export since that is the maximum permitted by Microsoft Train Simulator. Specularity in Microsoft Train Simulator is either on or off. Any value for the specular level other than zero will be considered on. Increasing the specular level in 3D Canvas will not increase the specularity in Microsoft Train Simulator, but setting it to zero will turn off specularity. When specularity is off, materials appear much brighter. This can be useful if you want an object to look particularly bright. In general though a non-zero specular level should normally be used. Note that Microsoft Train Simulator allows for the prioritization of materials. This is used to ensure correct rendering when viewing through multiple translucent objects. This feature is not supported by 3D Canvas Pro. In practice this may not have much effect, but it could be factor with some objects. To have the ability to use colors as well as textures, a single large texture can be created that combines a number of smaller textures and colors. The texture can then be cropped as it is applied to provide the desired texture or color. You may use multiple textures per object also if you wish, but Microsoft suggests using as few textures as possible per object in order to improve performance. Much of your material painting will be done using the Paint Tool. The Fill operation can be quite useful for filling a selected group of faces with a material. If you are filling a subset of the faces with a material all three wrapping modes (flat, cylindrical and spherical), can be used. If you are filling the entire object, only the flat wrap can be used or distortion will occur. The UnWrap and UVMap operations are particularly useful with models created for Microsoft Train Simulator because they allow for precise application of textures. Translucency layers can be used with 3D Canvas Pro, but since it does not support Targa (.tga) files you will need to split your Targa file into a non-translucent bitmap (.bmp) and a translucency map (.bmp). You can then select the primary texture and translucency map in 3D Canvas Pro. This will allow you to create translucent windows etc. Once you have created and exported your model you will need to take the original Targa file and translate it to an .ace file for the translucency to work in Train Simulator. You will NOT want to translate the bitmap files to the .ace format. Train Simulator differentiates between textures with transparent regions and textures with translucent regions. 3D Canvas does not differentiate between these two types of translucency. So for the purposes of export to Train Simulator format 3D Canvas assumes that a translucency map has transparent regions unless a translucent value is set also. So to indicate that a texture should be considered translucent rather than transparent, the Material Palette's Translucent value has to be set to something other than zero. Standard translational and rotational animations are supported. It appears though that these are only supported within Microsoft Train simulator for engines. Each frame of an object must be uniquely named for animation to work properly. There are many other requirements for engines, and these are covered in the technical documents provided with Microsoft Train Simulator. Each 3D Canvas Pro unit, the length of the edge of a square on the 3D Canvas Pro grid, is equal to 1 meter. Exporting to the Microsoft Train Simulator File Format Exporting to the .s format is relatively simple. Just right-click on the object and select Export Selection->Microsoft Train Simulator from the popup menu. 3D Canvas Pro should warn you if there are any issues with the export. Adding Models to Your Route Once you have exported your model there are a number of steps that must be completed before you can use it on your route: 1) convert the .s file to a Unicode file. Microsoft provides a utility with Train Simulator called txt2uni.exe that will do this conversion. 2) convert the texture(s) to the .ace format. Microsoft provides a utility with Train Simulator called makeace.exe that will do this conversion. Note that textures must be 64x64, 128x128, 256x256 or 512x512 to be used in Train Simulator. 3) Copy the .s file to your route's Shapes folder. 4) Copy the .ace file to your route's Textures folder. 5) Create a .sd file (shape description) for your object in your route's Shapes folder. Here it is what we use (it likely could be improved):
It should be named myobject.sd (replacing "myobject" with your object's file name) and myobject.s within the file must be changed to indicate the file name of your object. Also, you will need to convert this file to Unicode using txt2uni.exe. 6) Modify your route's .ref file so that it is aware of the new object. Here is what we add:
Then just add the object to your route in the usual way. Creating Engines There are a considerable number of requirements for creating engines for Microsoft Train Simulator. The technical documents provided with Microsoft Train Simulator provide all necessary information. |