3d
Studio Max Shiny tutorial
In
this tutorial you will learn how to create an axle add the textures,
map the textures and apply a shiny texture to the bogey wheels suitable
for rolling stock. The methods used to create the object and apply
the shiny textures can be adapted to any Trainz object.
Note. To complete this tutorial you will
need to have the texture files which can be downloaded here. 3DStudio Max will be referred to as 3ds.
|
To complete these tutorials with the dimensions listed herein you will
need the following setup
1. Open the "Units Setup.." dialog from the "Customize" menu and select the
"System Units Setup" button. In the "System Units Scale", use the system
unit scale of 1.0 units = 1m
2. In the "Units Setup set "Display Units Scale" to Metric
Meters.
|
|
1. Create cylinders.
The
first thing you need to do is create 3 cylinders. At this point it
does not matter what size they are.
|

Figure 1 Cylinder
tool

Figure 2 Cylinders
|
|
2. Resize cylinders
Once
you have created three cylinders we need to resize them. You will need
to select a cylinder and then switch to the "Modify" panel.
|

Figure 3 Modify menu
with one cylinder selected
|
|
For
each of the three cylinder you will need to enter the following dimensions
NOTE Dimensions will give a 36" wheel with a 4 3/4" axle.
| Parameter
|
Cylinder 1(Axle) |
Cylinder 2 (Wheel)
|
Cylinder
3 (Flange) |
| Radius
|
.06 |
.457
|
.497
|
| Height |
2.2 |
.1 |
.04
|
| Height Segments
|
1
|
1
|
1
|
| Cap Segments
|
1 |
1 |
1 |
| Sides
|
12
|
18
|
18
|
|

Figure
4 Results after resizing
|
For the axle I have
used 12 sides as this gives a reasonably low poly count without looking
too squarish. The same with the wheel and flange which is set at 18 sides.
The more sides the more polygons required and more processing power to
display it in Trainz.
|
3. Converting to mesh
The
next step is to convert the wheel to an editable mesh object we do
this by selecting the object and right clicking which then opens
a context menu as shown in figure 5. Select the "Convert to
Editable Mesh" entry.
|

Figure 5 Converting
to Editable Mesh
|
Now we can remove
some unnecessary polygons. Select the wheel and then on the modifier
list
expand the "Editable Mesh" entry and select "Polygon".
Then click on the top of the wheel and the entire top should be highlighted
red. Hit the delete button A message box will appear asking if you
want to "Delete Isolated Vertices?" Select "Yes"
|

Figure 6 Expanded
Menu

Figure
7 Polygons selected ready for deletion
|
After you have deleted
the polys it will appear that the side of the cylinder is also partly
gone and the base of the cylinder has been deleted. This is because
the polygons for the sides and bases are one sided and when viewing
from behind they appear to be invisible.
4. Rotating
and moving
Select
one of the cylinders and then select
the rotate tool from the main tool button menu and type 90 into the
Y co-ordinate which is 90º. Do this for all the cylinders.
|

Figure 8 Rotate
tool
|
Now before we move
the cylinders into location we need to reset the pivot point to the
center of each object to do this we go to the "Hierarchy" menu
and select the "Affect Pivot Only" Then select an object
and click on "Center to Object". This moves the pivot point
for the object to the center of the object. Do this for all the objects.
Deselect the "Affect Pivot Only" when you are finished.
|

Figure 9 Hierarchy
tab

Figure 10 Reset
pivot point

Figure 11 Highlighted
UCS icon.
|
|
Now
we can position the cylinders. Select the move tool from the main tool
button menu. Type in the following
co-ordinates for each object:
| Co-ordinates
|
Cylinder 1(Axle)
|
Cylinder 2 (Wheel)
|
Cylinder
3 (Flange) |
| X
|
0 |
-.755
|
-.705 |
| Y
|
0 |
0
|
0 |
| Z
|
0 |
0
|
0 |
|

Figure
12 Move tool
|
|
5.Applying
Textures
Now
that we have everything positioned correctly we need to attach the
wheel and the flange together. To do this we select the flange and under
the "Edit Geometry" section you will see "Attach".
Select it and then click on the flange and then deselect the "Attach" item.
Do not attach the axle yet. We can now apply the textures to the wheel
and axle. To do this we need to open the "Material Editor".
Select the Material editor icon and the "Material Editor" will
appear. Select the first globe and then expand the "Maps" menu.
Find the entry "Diffuse Color" click on the corresponding "None" item.
A new window will open called the "Material/Map Browser".
You will see a list of items with a green parallelogram icon Double
click the "Bitmap" entry. This will open a "Select Bitmap
Image File" dialog box. You will need to find and select the "BogeyTextures.tga" file.
(You may need to change the file type to view tga files)
|
| |

Figure 13 Material
Editor Icon

Figure
14 Material Editor
|
Now
select the second globe and apply the "wheels.tga" texture to the "Diffuse
Color" slot and the "env_metal.bmp to the "Reflection" slot.
Change the value for the "Reflection" to 70. When you have
completed the texture loading select the first globe and drag it to
both the wheel and the axle. In order for the textures to show up in
the window select the blue and white cube in the "Material Editor".
Now that we have applied a texture to the entire wheel we need to change
it so that the bogey texture is only shown on the front and rear of
the wheel and the outside rim and the shiny textures to the wheel's
running surface and the flanges face. To do this we need to add an "Edit
Mesh" modifier to the stack.
|

Figure 15 Applying
an Edit Mesh Modifier
|
We
now have to select the individual faces that we want the shiny texture
applied to. The easiest way to do this is to expand the "Edit Mesh"
modifier and then select element. Select the wheel then change the "Edit
Mesh" to polygon. Hold down the control button and select the front
face of the wheel. This should deselect the wheel face. Hold down the
control key and select the face of the flange, you should have the result
shown in figure 16. With the polys selected open the "Material
Editor" and drag the second globe onto the selected area. Make sure
you drop the texture onto the selected area only. Deselect the polys and
you should have a result similar to figure 17.
|

Figure 16 Poly's
selected for texturing

Figure 17
Result after applying the shiny texture
|
At this
stage the textures on the wheel don't appear to be shiny. This is
because texture
effect
such a reflection do not show up in the view port. If you want to
check if the textures are shiny then the scene will need to be rendered.
To do this select "Render" from the "Rendering" menu
and in the window that appears click "Render" again. Leave
all the setting at the default.
6.
Adding an "Unwrap UVW" modifier
Now
that we have applied the texture to the wheel and axle we need to map
the texture to the correct location. To do this we need to add an "Unwrap
UVW" modifier to both the axle and the wheel. To add the modifier
you need to select an object and then go to the modify list in the
modify menu. You may have to scroll down to find the "Unwrap UVW" modifier
|

Figure
17 Applying the Unwrap
UVW modifier
|
After
you have applied the modifier expand the "Unwrap UVW" in the
"Modifier List" and select the "Select Face" entry.
Then select the front face of the wheel and click on "Edit"
in the "Parameters" section of the "Unwrap UVW". A
new window will appear called the "Edit UVW"
|

Figure 18 Select
face

Figure
19 Face selected ready for mapping.
|
Now that we have
a face selected and the "Edit UVW" window open you will
see the screen in Figure 20. If the texture in the background is
wrong then
you will need to change the map. To do this select the correct map
from the drop down box on the top tool button bar.
|

Figure 20 Face
map ready for aligning.

Figure 21 Changing
Maps
|
To make the it easier
to align the textures to the wheel correctly we need to change the size
of the map. To do this select "Show Options" in the bottom right
of the Mapping window. Then under "Bitmap Options" select the
"Use Custom Bitmap Size" option and change the width and height
to the size of the file which in this case is 256 x 256.
|

Figure 22 Using
custom map size.
|
While the face of
the wheel is still selected we need to normalise the map. To do this
select
the "Normal Mapping..." from the "Mapping" menu.
When the "Normal Mapping" box appears select the "Top/Bottom
Mapping" from the drop down box and click OK. This will allow
us to detach the front face of the wheel from the rest of the mapping.
|

Figure 23 Normal
mapping from the Mapping menu

Figure
24 Normal mapping dialog box.

Figure
25 Freeform Mode.
|
Before proceeding
any further we need to make sure the "Freeform Mode" icon
is selected. Place the cursor over the selected map and move it to
one
side. Then select the rest of the mapping and move it to one side.
You can also use the "Filter Selected Faces" icon to hide
the other mapping but I prefer to leave all maps visible that way you
don't apply the same texture area to two different mesh areas. Now
we need to adjust the mapping to suit the texture. To resize the map
place the cursor over the corner of the map and a triangle shaped cursor
should appear. You can now drag the corner of the map down or up to
the correct size. Place the texture as shown in figure 27. Continue
selecting faces and moving resizing maps until you are happy with the
locations and you have a result similar to figure 28. When changing
the size/location of the mapping for the shiny texture you will need
to change the map again.
|

Figure 26 Filter
selected faces.

Figure
27 Adjusting and relocating maps

Figure
28 Final mapping results.
|
|
7. Creating the second wheel.
Now
that we have mapped all the textures to the correct location we can
now create the second wheel. Before we do this we need to convert both
items to "Editable Mesh". This will allow us to attach everything
together without upsetting the mapping. Next we need to mirror the
wheel from one side to the other. To do this select the "Mirror
Selected Objects" icon from the main toolbar. The "Mirror
World Coordinates" dialog box will appear. Select the X mirror
axis and type 1.51 into the "Offset" coordinate box and select "Copy" from
the "Clone Selection" section
|

Figure 29
Mirror tool.

Figure 30
Mirror dialog box.
|
| Now we can attach all
the items together. Select the axle and attach the wheels. When the
dialog box appears asking for "Attach options" select the "Match
Material ID's To Material" and click "OK". Then
give the object a meaningful name. If you selected a wheel and attached
the rest to it then you will need to reset the pivot point. At this
stage we also need to use the "Reset Xform" modifier. Select
the axle/wheel unit and select "XForm" from the modifier
list. You can also do the same by selecting "Reset XForm" from
the utilities menu and then clicking the "Reset Selected" button.
You will notice after applying the "Reset Xform" that the
rotation coordinates are reset to zero. There are other modifiers such
as smooth and mesh weights that can be added but this tutorial does
not cover their use. Once you have added the "Reset XForm" right
click on the axle/wheel and select "Convert to Editable Mesh" again. |

Figure 31 End result
|
|
8. Exporting
Once
you have completed the mesh then we need to export it to the Trainz
format. Deselect everything and select "Export" from the file menu.
Type in a name with the .im extension.
Then select the "Trainz format
[*.IM,*.KIN,*.PM]" entry from the file type drop box and click "Save".
If you have animations on the scene then select "Export" again and
this time type anim.kin as the file name. When the "Export Animation" dialog
box appears click on the "OK" button.
Was this tutorial helpful?
Not enough or too much detail? Points not explained properly? Suggest
any improvements? Please let me know what you think here.
Download this tutorial here as
a PDF document.
|