You are on page 1of 3

Converting a Shape and Texture

It is presumed that the other modelling documents have been read or followed, as this is the final stage of shape creation. The conversion utilities for shapes and textures have been built around the Kuju Entertainment Ltd shape format and game engine. To allow a shape to be viewed within the Microsoft Train Simulator game environment, the shape that has been created must be converted to a compatible Kuju Entertainment Ltd file format. These are the <filename>.s format and the <filename>.ace format, where the <filename>.s format is the shape to be loaded and used and the <filename>.ace format is the texture. Once these are made they must be put into the correct directory structure so that they can be loaded into the correct route. Please see other documentation for further information on this. Texture Conversion The texture conversion is called MakeAce and it converts only two file formats, <filename>.tga and <filename>.bmp. The <filename>.tga format is for any texture with transparency or alpha and the <filename>.bmp format is for solid textures without any extra channels. The utility and game engine can support up to 32 bit textures. When textures are created with an alpha or transparent channel, there must be only one, the MakeAce utility supports the extra channel but one only. Because the texture utility supports the shape utility and the <filename>.3ds format, it is important to keep the names of textures down to an 8.3 format, this means 8 characters for the filename and 3 characters for the extensions which .3ds is. It is also important to remember that all textures must be square and in relation to the sizes discussed before (64x64, 128x128, 256x256 or 512x512 pixels only). Once the texture is created and saved in the 8.3 format, it can be converted to an ace file format. Either one of the following: 1) MakeAce.exe <inputfilename>.bmp <outputfilename>.ace or 2) MakeAce.exe <inputfilename>.tga <outputfilename>.ace or 3) MakeAce.exe <inputfilename>.tga <outputfilename>.ace -trans Where 1) Represents a standard .bmp format texture that has no transparency or alpha 2) Represents an alpha .tga filename format texture 3) Represents a transparent .tga filename format texture (-trans on command) This will then create an appropriate .ace file format that can be used in Microsoft Train Simulator. This .ace file must be placed in the same directory as the shape that has been created as this is where the shape will look for its texture associate. Shape Conversion. The shape conversion utility supplied with Microsoft Train Simulator works on the Kuju Entertainment Ltd shape format, the .s file. All shapes and objects within the game are .s files, the .s file contains all information related to a shape including distance levels, textures, animations, smoothing groups and more. The file format that is read in by the Conv3ds.exe utility is a .3ds file format only. This seemed the most common file type that almost all 3D packages could export in one way or another., this is also a good format to export with as it retains texture coordinates and hierarchies.

When constructing a shape within the 3D package, material names must be assigned. This is so that the converter can pick up the correct texture, lighting effects and type of texture effect. There are lots of different types of material options that can be applied to textures to obtain lots of different texture effects within the game environment. The following list is the list of material names that are to be applied but represent all the different types of texture effects:
Name SolidBright TransBright AlphBrightAlphBright AlphBright+ SolidHlfBrt TransHlfBrt AlphHlfBrtAlphHlfBrt AlphHlfBrt+ SolidNorm TransNorm AlphNormAlphNorm AlphNorm+ SolidLoShine TransLoShine AlphLoShineAlphLoShine AlphLoShine+ SolidHiShine TransHiShine AlphHiShineAlphHiShine AlphHiShine+ Gloss SolidCrcfrm TransCrcfrm AlphCrcfrmAlphCrcfrm AlphCrcfrm+ SolidDrkShd TransDrkShd AlphDrkShdAlphDrkShd AlphDrkShd+ Description Solid texture, fully lit, very bright. Transparent texture, fully lit, very bright. Alpha texture, fully lit, very bright, lowest priority in relation to other alpha. Alpha texture, fully lit, very bright, middle priority in relation to other alpha. Alpha texture, fully lit, very bright, highest priority in relation to other alpha. Solid texture, half lit, half bright. Transparent texture, half lit, half bright. Alpha texture, half lit, half bright, lowest priority in relation to other alpha. Alpha texture, half lit, half bright, middle priority in relation to other alpha. Alpha texture, half lit, half bright, highest priority in relation to other alpha. Solid texture, no specularity. Transparent texture, no specularity. Alpha texture, no specularity, lowest priority in relation to other alpha. Alpha texture, no specularity, middle priority in relation to other alpha. Alpha texture, no specularity, highest priority in relation to other alpha. Solid texture, low specularity. Transparent texture, low specularity. Alpha texture, low specularity, lowest priority in relation to other alpha. Alpha texture, low specularity, middle priority in relation to other alpha. Alpha texture, low specularity, highest priority in relation to other alpha. Solid texture, high specularity. Transparent texture, high specularity. Alpha texture, high specularity, lowest priority in relation to other alpha. Alpha texture, high specularity, middle priority in relation to other alpha. Alpha texture, high specularity, highest priority in relation to other alpha. Gloss texture. Solid cruciform texture. Transparent cruciform texture. Alpha cruciform texture, lowest priority in relation to other alpha. Alpha cruciform texture, middle priority in relation to other alpha. Alpha cruciform texture, highest priority in relation to other alpha. Solid texture, dark shading. Transparent texture, dark shading. Alpha texture, dark shading, lowest priority in relation to other alpha. Alpha texture, dark shading, middle priority in relation to other alpha. Alpha texture, dark shading, highest priority in relation to other alpha.

The list above is the strict naming convention on the shapes that are created. They are constructed as {Type}[{sub object id}][user defined}]. Where type is one of the names like AlphDrkShd, sub object id is an optional number between 0 and 31 so that other sub objects can be assigned, s can be added onto the end of this if the sub object is to be sorted. The user defined section allows different materials to be created, if one is created it must begin with a _ character. For example: SolidDrkShd_1 Key to above table: Solid A material that is using an opaque texture only.

Trans A material that is using a transparent texture only. Alpha A material that is using a semi-transparent texture only. Specularity A lighting highlight effect that gives the illusion of shine. Gloss A material that is using a glossmap, which is an artificially created reflection. Cruciform A tree shape that requires its own material so that it can prioritise with the terrain and the surrounding objects. FullBright A material usually assigned to the inside of trains so they never get dark. HalfBright The same as full bright but at half the intensity. Dark Shade The opposite to full bright, it reduces the overall intensity of light. Priority in relation to other alpha This is how alpha prioritisation is done. When calculating the drawing in the game through an alpha texture, the environment must be displayed behind it, but if there is another alpha texture behind that, prioritisation must be done. The general rule of thumb is if an alpha texture is near you then it requires a higher prioritisation than an alpha texture behind it. The best example of this is looking through carriages, if you looked from the outside, to the inside and then out the other window then the outside polygons would need to flagged with a higher alpha prioritisation than the inside polygons, therefore, the outside polygons would get (for example) AlphNorm+ and the inside polygons would get AlphNorm-. The middle value is for when there are other polygons with alpha on within the shape like looking through a carriage to internal cabins and then out the other side. Once the material names are assigned to the shape, the shape is classified as one object (i.e. it can have sub objects but they must be linked to a parent (see documentation)), the texture it is using are in 8.3 format and all modelling guidelines have been followed then the shape is ready to export. Export the shape as a .3ds file only and make sure it preserves the texture coordinates and that on the export the distance in which it is intending to draw is put into the filename on export (for distance levels). Once the .3ds file is created, we need to convert it to a .s file. We do this by using the Conv3ds.exe utility. This is done as follows: Conv3ds.exe <outputfilename>.s <inputfilename with first distance levels set>.3ds For example: Conv3ds.exe Dash9.s Dash9200.3ds (this will create the Dash9.s file for the game but make it viewable up to 200 metres) or Conv3ds.exe Dash9.s Dash9200.3ds Dash9500.3ds Dash91000.3ds Dash92000.3ds which will create one Dash9.s file but with four distance levels built into it at 200, 500, 1000 and 2000 metres. This of course means that there must be four .3ds files created which should be the same shape all along but with lowering amounts of polygons to make it more efficient on lower specification computers, and to allow polygons to be saved from processing at distances. This will then convert the newly created .3ds file into a Kuju Entertainment Ltd shape file for Microsoft Train Simulator. The texture or textures and shape will need to be put into all the appropriate files for loading and placement and directories.

You might also like