3. Simple Construction - A Diesel Loco - Part two


Version 1.0 - 23.June 2002

Colouring

Gmax with the MSTS-plugin is the only software capable of exporting models into MSTS without any texture. The models would be shown in white colours only. Therefore we ought to paint our model. This means to put parts of images or drawings onto each face or polygon. This is called texturing. The texture in conjunction with other properties, such as lighting parameters, make the material which is put to the faces.

The images have to fulfill certain requirements in order to be used in MSTS:

  • They have to be sqare shaped rather than rectangle shaped.
  • Its size has to be 32x32 or multiplied by two. (64x64, 128x128 and so on)
  • Maximum size is 512x512 pixel (Yes, 1024x1024 works, but is not recommended)
  • only the MSTS-Kuju .ACE-format is allowed
  • Transparency map (one Alpha-channel) is allowed

The image we are using, is 512x512 pixel (Picture-Element = Pixel) size and looks like this:

The image file can be downloaded here. It has to be unzipped and copied into our gtd1 folder.

The dark grey conic shape below the loco's side view shall now be mapped onto the sides of the chassis.


Creating a material

First, we have to create a new material. Thus, we open the material tool with the according symbol:

The material tool window:


A click on the New button, and we can give the new material's setting.


In the Name field, we type in Material1. Then we click Texture open.


Here we change into the gtd1 folder and choose the image gtd1.ace.

The texture image file is now loaded, and we leave all other settings as they are.


Putting a material to an object

Now, we select the chassis and in the material tool window we click Put! once. The image has now applied to all sides of the chassis.

very colourful indeed...


...but not really what we wanted. GMax puts the image with all its extents to each side of the chassis. What we need is only a selection of the image rather than the whole one.

To apply only a part of an image to a face or a selection of faces or polygones, is called mapping. Gmax allows to map a number of polygones at one time, provided, they belong to the same object. We use this by mapping the left and the right side of the chassis at the same time.


Mapping

To do so, we close the material tool window and select the chassis in the Left viewport. In the Modify tab of the toolbox, we choose the selection Polygon...

...and draw a box within the limits of the chassis. The side polygones are now selected indicated by their red edges. The small arrows show the direction of the normals.

The german text in the image below reads: Drag box from here - to here.


In the toolox we open the listbox Modifier List and choose UVW Map.


The mapping tool opens. The parameter section in the toolbox can be dragged up and down with the mouse.


We push upwards until the parameter Alignment appears. There we click X and the button Fit. The image should now fit into the side if the chassis.

The thin orange frame shows the direction the image ist mapped.


Having a closer look, we see, that the image has to be rotated by 90 degree. We also want to map a part of the image only. Therefore, in the Modifier List we choose Unwrap UVW. The parameter field changes:


Here, we click the Edit button and the Mapping Editor shows up.


In the image above, I marked the vertices with yellow arrows. It seems as if one polygon is shown, but as we selected both side polygons, the editor shows both sides as well.

The chassis' conical shape can be seen, rotated by 90 degrees and with distorted proportions. First, we have to rotate the coordinate points 90 degrees counterclockwise. To do that, we switch the Angle Snap Toggle (Magneto with angle symbol) on.


Then we select all vertices by dragging a box around them, and activate the rotate symbol. Selected vertices are shown red.


We grab the selection with the mouse and rotate it 90 degrees counterclockwise. The angle snap toggle makes shure to only rotate in 15 degrees steps. The result should look like this:


Now, we have ho align the selection with the right image section, which is the dark grey polygon underneath the sideview. We grab the vertices of each of the corners and drag them to the right positions.

Caution!

Do not select the vertices by clicking on them. Doing this, will select only one vertex of two (Remember, vertices of the left and right side of the chassis are on the same position when viewed from the side) and the result will look like this:


When all vertex pairs are draws correctly, it should look like shown in the next image.


Once all points are aligned properly, the editor can be closed.


The side of the chassis is mapped and we have to collapse the modifier stack.

To do this, we rightclick into the grey field right underneath the Text Editable Mesh. In the context menu we choose Collapse All


A warning appears where we click Yes...

...and the side of the chassis is mapped.


Mapping front and rear

First we select the front and rear planes by drawing a box within the borders of the chassis. The german text reads: Draw the box here.


Because the texture having already the right orientation and size, we don't have to use the UVW Map function. From the Modifier List we choose Unwrap UVW and click Edit again.


With the Scale tool, we make the selected rectangle as small as shown. To do so, we draw the mouse with pressed mousebutton to the inside of the rectangle until it has the right size.

Then, we move the selection onto the small dark grey rectangle at the lower left of the image.


After closing the editor, we rightclick inside the modifier stack and choose Collapse all. The front and rear polygones of the chassis are now done.


Top and bottom

Now, the top and bottom of the chassis is left to be textured. First, we select the chassis object and in Top viewport and Polygon select mode, we select the top and bottom polygones the same way we did with the other polygones. We have to take care, not to select one of the side or front or rear polygones by accident. Then we choose UVW Map from the Modifier List, select the option Z and press Fit.


In the Modifier List, we select Unwrap UVW and press the Edit button. In the editor, we can see that the bottom polygon is smaller then the top polygon.


As we did with the front and rear planes, we scale and move the points to the lower left dark grey rectangle.

We close the editor and collapse the modificator stack as we did before. Top and bottom polygones are mapped.


The chassis is now textured. We may now deselect the object and open the file - save as menu. Clicking on the plus button, increases the filename count by one. The file has now be saved with the filename gtd1_02.gmax.


Congratulation

The first object is finished


back to the table of content

to part 3