0% found this document useful (0 votes)
125 views5 pages

Conversion of Shapes and Textures 1.01

Uploaded by

Orosz János
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
125 views5 pages

Conversion of Shapes and Textures 1.01

Uploaded by

Orosz János
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 5

This document replaces the document "Conversion of Shapes and Textures" included in the

TechDocs folder on Microsoft Train Simulator Disc 1.

Converting a Shape and Texture


Presuming that you have read or followed the other modeling documents (included in the
TechDocs folder on Microsoft Train Simulator Disc 1) prior to this final stage of shape creation,
you’re ready to convert the shapes and textures to the Kuju Entertainment Ltd. shape format.

For a 3D object to be used within the Microsoft Train Simulator game environment, the object
must be converted to a compatible .s and .ace file format. The .s format is the shape and the .ace
format is the texture. Both files must be put into the correct directories for the route or train they
are associated with. For more information, in the Train Simulator Editor Help file (press F1
when working with any editor) see the topics The Route Editor/ Working with Route Files and
The Cab Editor/ Working with Graphics.

Texture Conversion
The texture conversion utility is called MakeAce.exe. It converts only two file formats: .tga
and .bmp. The .tga format is used for any texture with transparency or alpha, and the .bmp
format is for solid textures without any extra channels.

Names of textures must follow the 8.3-filename format.

The MakeAce utility and the 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 only one extra channel.

Also remember that all textures used on models must be square (64x64, 128x128, 256x256 or
512x512 pixels only). Other textures, like those used for cab views, only have to have a square
canvas, as discussed in "How to Make Cab Bitmaps" (the updated version of which is included in
the same download as this document).

Once the texture is created and saved in the 8.3 filename format, it can be converted to a .ace file
format. Use one of the following commands:

· For a standard .bmp format texture that has no transparency or alpha:


MakeAce.exe <inputfilename>.bmp <outputfilename>.ace

1 For an alpha .tga filename format texture:


MakeAce.exe <inputfilename>.tga <outputfilename>.ace

2 For a transparent .tga filename format texture (-trans on command):


MakeAce.exe <inputfilename>.tga <outputfilename>.ace -trans

3 For a transparent .tga filename format texture to be used on cabs (probably a control
where no width or height has been defined):
MakeAce.exe <inputfilename>.tga <outputfilename>.ace -trans -bmp
4 For a transparent .tga filename format texture to be used as a cab overlay (defined as 640
x 480 resolution image):
MakeAce.exe <inputfilename>.tga <outputfilename>.ace -trans -bmp -width:640 -
height:480

5 For a transparent .tga filename format texture to be used as a cab overlay (defined as
1024 x 768 resolution image):
MakeAce.exe <inputfilename>.tga <outputfilename>.ace -trans -bmp -width:1024 -
height:768

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 it is related to.

Shape Conversion
The shape conversion utility is called Conv3ds.exe. It converts .3ds files to .s files.

.s files are used for all shapes and objects within the game. A .s file contains all information
related to a shape including distance levels, textures, animations, smoothing groups, and more.

The only file format read by the Conv3ds.exe utility is .3ds. The .3ds format is the most common
file type exported by 3D modeling packages. The .3ds format retains texture coordinates and
hierarchies.

There is a strict naming convention for shapes:


MaterialName[sub object id][_user defined].

· MaterialName is one of the names listed in the table below, such as AlphDrkShd.
· Sub object id is an optional number between 0 and 31 so that other sub objects can be
assigned, appended with an "s" 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: AlphDrkShd9_1

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. The
table below lists the material names that represent all the different types of texture effects:

Name Attributes
AlphBright Alpha texture, fully lit, very bright, middle priority in relation to other alpha.
AlphBright- Alpha texture, fully lit, very bright, lowest priority in relation to other alpha.
AlphBright+ Alpha texture, fully lit, very bright, highest priority in relation to other alpha.
AlphCrcfrm Alpha cruciform texture, middle priority in relation to other alpha.
AlphCrcfrm- Alpha cruciform texture, lowest priority in relation to other alpha.
AlphCrcfrm+ Alpha cruciform texture, highest priority in relation to other alpha.
AlphDrkShd Alpha texture, dark shading, middle priority in relation to other alpha.
AlphDrkShd- Alpha texture, dark shading, lowest priority in relation to other alpha.
AlphDrkShd+ Alpha texture, dark shading, highest priority in relation to other alpha.
AlphHiShine Alpha texture, high specularity, middle priority in relation to other alpha.
AlphHiShine- Alpha texture, high specularity, lowest priority in relation to other alpha.
AlphHiShine+ Alpha texture, high specularity, highest priority in relation to other alpha.
AlphHlfBrt Alpha texture, half lit, half bright, middle priority in relation to other alpha.
AlphHlfBrt- Alpha texture, half lit, half bright, lowest priority in relation to other alpha.
AlphHlfBrt+ Alpha texture, half lit, half bright, highest priority in relation to other alpha.
AlphLoShine Alpha texture, low specularity, middle priority in relation to other alpha.
AlphLoShine- Alpha texture, low specularity, lowest priority in relation to other alpha.
AlphLoShine+ Alpha texture, low specularity, highest priority in relation to other alpha.
AlphNorm Alpha texture, no specularity, middle priority in relation to other alpha.
AlphNorm- Alpha texture, no specularity, lowest priority in relation to other alpha.
AlphNorm+ Alpha texture, no specularity, highest priority in relation to other alpha.
Gloss Gloss texture.
SolidBright Solid texture, fully lit, very bright.
SolidCrcfrm Solid cruciform texture.
SolidDrkShd Solid texture with dark shading.
SolidHiShine Solid texture, high specularity.
SolidHlfBrt Solid texture, half lit, half bright.
SolidLoShine Solid texture, low specularity.
SolidNorm Solid texture, no specularity.
TransBright Transparent texture, fully lit, very bright.
TransCrcfrm Transparent cruciform texture.
TransDrkShd Transparent texture with dark shading.
TransHiShine Transparent texture, high specularity.
TransHlfBrt Transparent texture, half lit, half bright.
TransLoShine Transparent texture, low specularity.
TransNorm Transparent texture, no specularity.

Here’s a key to the attributes in the 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 prioritize 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 of full bright, it reduces the overall intensity of light.
· Priority in relation to other alpha - This is how alpha prioritization is done. Objects
with alpha textures must allow the environment behind them to be displayed but if the
background is another alpha, you will need to prioritize one over the other. A general rule
of thumb is that near alpha textures get a higher prioritization than distant alpha textures.
The best example of this is looking through passenger cars, 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 prioritization than the inside polygons, therefore, the
outside polygons would get (for example) AlphNorm+ and the inside polygons would get
AlphNorm-. The middle value is used when other alpha polygons are within the shape
like passenger car interior partitions.

The shape is ready to export when 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), the
texture it is using is in 8.3 filename format, and all modeling guidelines have been followed.
Export the shape as a .3ds file and make sure it preserves the texture coordinates. Include the
object’s drawing distance (in meters) in the filename on export (for distance levels).

Once the .3ds file is created, you need to convert it to a .s file. Do this by using the Conv3ds.exe
utility as follows:

Conv3ds.exe <outputfilename>.s <inputfilename with distance levels>.3ds

For example:
· Conv3ds.exe Dash9.s Dash9200.3ds will create the Dash9.s file for the game and make it
viewable up to 200 meters.

· Conv3ds.exe Dash9.s Dash9200.3ds Dash9500.3ds Dash91000.3ds Dash92000.3ds will


create one Dash9.s file with four distance levels built into it at 200, 500, 1000, and 2000
meters. This of course means that there must be four .3ds files created using the same
shape but with reduced polygons to make rendering more efficient on slower computers,
and reduce rendering on distant objects.

The .s file created by Conv3ds.exe is an ASCII text file. The game engine, however, requires
either a Unicode text or binary file. To convert the .s file to Unicode, run it through the
Txt2Uni.exe converter, supplied in the same folder as MakeAce. Do this using the following
command:

Txt2Uni.exe <filename.s>

The new .s file overwrites the old one.

To make the .s file even smaller, you can convert it into a binary file. See the document "How to
Convert Files to Binary Format" (included in the TechDocs folder on Microsoft Train Simulator
Disc 1) for more details.

Creating a .sd File


The .sd file is a required file and includes bounding box info, alternative texture info, and quality
level (i.e. at what quality level does the shape not load by default) The .sd file is created by hand
in an ASCII text editor such as Notepad.

Here’s what the Dash9 .sd file looks like:


SIMISA@@@@@@@@@@JINX0t1t______

shape ( dash9.s
ESD_Detail_Level ( 0 )
ESD_Alternative_Texture ( 0 )
ESD_Bounding_Box ( -1.548 1.2654 -10.3332 1.5505 4.7030 10.2357 )
)

The easiest way to create a .sd file is to copy an existing .sd file from the type of object you’re
creating into the same folder as the new object’s .s file and then edit the .sd file. For more details
on Shape Data files, see "How to Write Shape Data Files" (included in the TechDocs folder on
Microsoft Train Simulator Disc 1).

Saving the Files


It’s important that the completed texture and shape files be saved to the appropriate folders in the
Microsoft Train Simulator game folder.

For example, the .s, .sd, and .ace files for the BNSF Dash 9 are in the Train Simulator\TRAINS\
TRAINSET\DASH9 folder in the location where you installed Train Simulator on your hard
disk.

Adding the new or updated shape to the Train Simulator world


If you have created a new .s file for a locomotive or piece of rolling stock, don’t forget to make
sure the .eng and .wag files reference the correct .s file.

If you are adding a new object to be placed in the Route Editor, you must add that object to
the .ref file for the route you want to add the object to. For more information, see "How to Write
a .Ref File" (included in the TechDocs folder on Microsoft Train Simulator Disc 1).

You might also like