![]() |
![]() |
Home > Tutorials > TRS2006 Gmax Alpha Number and Backlit Alpha Numberboard Tutorial Backlit Alpha Numberboard Tutorial In this tutorial you will learn how to illuminate the numbers on a numberboard for a locomotive and create transparent windows. Note. To complete this tutorial you will need to have available a model that has already been textured and has an unwrap UVW modifier applied to it. You can get the demonstration files here. |
||||
|
|
||||
Alpha
Numbers |
||||
1. Planes The first thing that you need to do is create 4 planes 1 segment x 1 segment. This will be where the numbers will be displayed on the locomotive. Create as many planes as required up to a maximum of six. For this tutorial I have created four numbers each 125 wide by 100 long. You will need to rotate the planes 90 degrees in the "X" co-ordinates. Once rotated then you can move the planes next to each other.
2. Alpha number digit textures and mapping Once
you have the planes in location then we can add the textures for the
alpha numbers to the planes. You will need to create suitable sized
digit textures
for each number you have on the locomotive. In this tutorial I have
used 32 x32 pixel tga images. They need to be suitably named using
digit_x.tga or digit_xx.tga. For example if you have six numbersin
one set then you will need to have digit_1.tga to digit_6.tga (Six
numbers is the maximum allowed in Trainz) . If you
have
more
than one set of numbers on the locomotive that are not identical then
you will need to have digit_1a.tga to digit_6a.tga for the first set
and digit_1b.tga to digit_6b.tga for the second set etc.
|
||||
Figure 5 Correctly mapped alpha numbers
|
||||
When I created the textures for the numbers I used a number that represented the actual size of the numbers that I wanted displayed on the numberboard. That way I could see how the numbers would look and check the alignment before I exported the mesh. Number 1 is digit_3.tga The digit_x.tga's are never used within Trainz but for TRS2004 you will need to include them in the package as missing textures can cause problems. Once you have all the mesh and mapping complete you can then export the mesh.
|
||||
3. Alpha number files Now you need to create the actual alphanumbers. These can be any size as long as they match the digi_x.tga's size. For example if you have 32 x 32 pixel tga digits on the cab side and 16 x 16 pixel tga digits on the numberboards then the alphanumbers will need to match these dimensions. For each different alpha number set you will need ten alpha numbers 0 - 9. For example if you have three different number sets on the locomotive then you will need thirty alphanumbers. 0 - 9 for each different size or color. The alpha numbers will need an alpha channel so that they blend in with the surrounding textures on the locomotive. The alpha numbers need to be located in the correct directory. If your asset-filename is tutorial then the folder for the alpha numbers needs to be called tutorial_alpha_numbers.
|
||||
4. Config entries The final task required to get the alpha number setup to work is to edit the config.txt file.You will need to add the following to the config file either using CMP or manually with a text editor
|
||||
![]()
1. Planes The first thing that you need to do is create a plane 1 segment x 1 segment with a small 5mm wide lip all around the edge as shown in figure 1. To do this I used another plane 5mm wide and 200mm long with four length segments. I then converted it to editable mesh and used vertex move to position it in the correct location. Make sure the visible face of the plane is facing outwards also make sure that you weld the vertexes when you have the plane in location. This helps prevent the light from showing through. Repeat the procedure for all the alpha numbers on the numberboard.
|
||||
Figure 1 Alpha number showing outside lip |
||||
2. Number cutout The next thing you need to do is cutout an area the size of the number planes from the actual numberboard. To do this I created a box the size of the (In this case) four numbers and placed it in location with the numberboard. I then selected the numberboard and then added a Boolean to the object. Make sure you set the "Operation" to "Cut" as I have found this is the only method that does not remove any faces on less complex objects. Select the "Pick Operand B" and select the new box. There should now be a new line on the numberboard. Convert the numberboard to editable mesh and then select polygon and the center area should be hi lighted, if it isn't then you will need to select it. Once you have it hi-lighted press the delete button to delete the polygons.
|
||||
Figure 2 Box in the correct location
|
||||
| Now we need to add a lip around the new cutout area similar to the number planes only this time the visible face needs to be facing towards the center. | ||||
3. Lights Now that we have the cutout in the numberboard and all the lips installed we need to add a light to the numberboard. Once again a plane is used for this purpose. Create a plane one length segment x one width segment the size of the cutout and move it to the rear of the lip on the numberboard. (You will need to rotate it)
|
||||
Figure 3 Light in location
|
||||
4. Light texturing Once you have all the meshes edited and located correctly we need to texture the numbers and the light. To texture the light we need to setup a reflective texture. Using the textures included in the demonstration files add them to a material editor globe using the settings as shown in figure 4. This will give us a light or reflective texture. Drag the texture to the light and add an Unwrap UVW to the stack for the light.
|
||||
Figure 4 Light texture settings
|
||||
|
||||
Figure 5 Correctly mapped alpha numbers
|
||||
When I created the textures for the numbers I used a number that represented the actual size of the numbers that I wanted displayed on the numberboard.That way I could see how the numbers would look and check the alignment before I exported the mesh. Number 1 is digit_3.tga The digit_x.tga's are never used within Trainz but for TRS2004 you will need to include them in the package as missing textures can cause problems. Once you have all the mesh and mapping complete you can then export the mesh.
|
||||
5. Alpha number files Now you need to create the actual alphanumbers. These can be any size as long as they match the digi_x.tga's size. For example if you have 32 x 32 pixel tga digits on the cab side and only 16 x 16 pixel tga digits on the numberboards then the alphanumbers will need to match these dimensions. For each different alpha number set you will need ten alpha numbers 0 - 9. For example if you have three different numbers on the locomotive then you will need thirty alphanumbers. 0 - 9 for each different size or color. The alpha numbers will need an alpha channel showing the area that you want lit up. For the numbers above it is the actual numbers that are lit up therefore the black area of the alpha channel will be the same as the numbers however if you want the area around the numbers to be lit up then the white area of the alpha channel will be the same as the numbers.
|
||||
6. Config entries The final task required to get the alpha number setup to work is to edit the config.txt file.You will need to add the following to the config file either using CMP or manually with a text editor
Although this method adds a few extra polygons to the mesh I think that it is worth it to be able to select your own running number from within surveyor. This method also allows you to only have one version instead of several for each running number you require. Was this tutorial helpful? Not enough or too much detail? Points not explained properly? Suggest any improvements? Please use the Tutorial Enquiry Form
|
Trainz and Trainz Railroad Simulator are trademarks of AuranBest viewed at 1024 x 768 or higher Pages best viewed with Cooper and Cooper Black font installed. Copyright © 2007
P. Campbell. All rights reserved. Revised:
June 13, 2007
|