Sunday, July 26, 2020

Every thing you need to know about plans

Every thing you need to know about plans

 
First off any plan you find can have errors on it. I was given a job to scan in a box full of odd size plans to put on an internal web, it was all changes made to a new diesel engine that was all made on a computer. That I remember was move a hole to a better place and a parts maker made 50 covers with the two logos in the wrong order. Things like this happen all the time and correction plans are made and put with the other plans.
 
The maker plans are also very big, 40" wide by what ever and a scale of 3/8" or 1/2" to the foot.
Most of what you can find are reduced by photo or scanner. New plans that are made by computer can output to any size, a big help, but if it was made before 1970 it was not made on a computer, after 2000 all most all would be computer made.
 
The following is for U.S. locomotive and rolling stock.
 
Original  plans:
 
You can find but costly and very big to work with.
 
Steam locomotives - normally shown with wheels and valve gear as center lines and diameter, no detail on side view. A lot of the piping is not shown as the pipe-fitters new what went where. Lots of sub-plans.
 
Diesel/electric locomotives - may or may not have bogeys.
 
Bogeys -  side views for most can be found, top and front views very hard to find.
 
Freight cars - makers plans only show what they made not all the parts that they put on. So you find the body but no doors, brake gears, and all the other parts.
 
Passenger cars - the same as freight cars but always with a top view of the interior.
 
Railway Service cars (non-revenue and MoY} - same as freight cars but harder to find.
 
All cars show the bottom view as seen from the TOP, look out for this as it can get confusing.
 
You will find a lot of cutaways and cross sections.
 
Copy's  of originals :
 
Found in Cyclopedias and trade magazines.
 

All printed copies can have have up to a 2% error, that's around one foot for a 85' car. You can also get the size wrong in ether X or Y direction.

Railroad Cyclopedias cab be found on-line, CD's and used books. Note, most do not show lettering or color.

Model Railway Magazines: First model railroad magazine came out in the 1930's and there have been a lot of them so I will only cover Model Railroader and Railroad Model Craftsman.

Both used plans made by users and staff and a lot of them from cyclopedias but they look better as the cut-a-ways are not there. Most printed after 1960 are good but the older ones can be missing things you need like the wheels.

All the newer ones normally all lettering, running numbers, and colors.

Size: Most are to model scales, S, HO, and O. RMC did try to use N but only for one year, to small to use. S scale fit better so most common.

Here is an old plane and you can see why you can not make a detailed model with just them.


Newer one.

 
I made this in TANE and is on the DLS.

Classification books: Your bigger railroad had them and I do not know just how they used them but you can find scanned ones on the internet. Most look hand drawn and do have good info. I have used them to make content.



Other: You can find plans in train books and on the internet. Look out for things that never got made, I know of a 4-8-6 plan to replace the 4-8-4 (Lima I think).










Friday, July 17, 2020

Going from Blender 2.79 to 2.83.2

 
So I made the jump from Blender 2.79 to 2.83.2 a bit ago. The first jump, 2.80, normally has bugs and it had a new GUI. Did not take to long get the hang of it.
 
Things you need to know: You can only export FBX not XML so you can not make a .im mesh.
 
Exporting FBX: this is the setup that works
 
 
If you give it a name it will save it but not as default.
 
Setup for PBR name.m.pbrmetal
 

Setup for PBR name.M.glass and name.m.pbrmetalmasked



 


Saturday, March 14, 2020

Using PBR and UVmaping

You now need to assign a PBR material to your mesh. How you assign depends on what program you use, so you will have to look that part up.
 
Trainz has only 5 material types but for roiling stock I have never used more than 3.
 
TRS19 only uses PBR all older content get converted to PBR, this takes up very little room, one common normal map, one common pbr map per old texture type, and one green and white texture used for all missing textures, this is why you get green/white mesh from FBX. Note that if you have a missing texture in your PBR it will get replaced with the green/white one (had this on last car with ARN as I missed one normal file and got numbers with a checker board look).
 
All PBR used for Trainz are metal/roughness and are ether a set of 10 or 11 data files used to color a mesh. The data is saved as 3 textures in RGB or RGBA as ether name.tga or name.png. At a power of 2, can be square or 1:8, max size is 2048x2048 aka 2K, a 4K will not give an error but will be downsized to 2K by CM.
 
Most used one. name.m.pbrmetal used for most things, metal, wood, plastic, rock and so on all on one material.
 
Name.m.pbrmetalmasked used the same as m.pbrmetal but has a Alpha channel used as a mask, has to be used to make ARN.
 
Name.m.glass used to make glass or other transparent things.
 
Name.m.pbrmetaldetail used to make finer detail, I have not used it as most of what I make dose not have finer detail, painted steel and painted wood.
 
Name.m.clutter only used to make clutter mesh, I have not used,
 
Good place to go to:http://online.ts2009.com/mediaWiki/index.php/Material_Types
 
Each texture has to have texture.txt with it, the Blender FBX exporter will make them but not right. best way to make is to copy a known working one, edit it and "save as".
what it look like:
 
File name: normalskin.tga
 
inside:
 
Primary=normalskin.tga
Tile=
 
File name: pbr.tga
 
inside:
 
Primary=pbr.tga
Alpha=pbr.tga
Tile=
 

My car has PBR textures set up just use skin.tga, normalskin.tga, and pbr.tga. This way you do not need to make the PBR textures yet, just edit them for now.
 
Next you need to make a UVmap, there are programs just for that and most 3D programs also have it built in. What it dose is flatten your mesh out, like unfolding a cardboard box so it is flat. This way you do not have the same data used for more than one pixel, very bad with PBR, did not mater in old way. Some times you can overlap where you can not see it from the out side. The size should be the same for all faces but you can be off up to about 2x.
 
What this looks like:
UVmap
 
skin.tga
 
skin with UVmap on top
 
As you can see this makes lettering a lot easer.
 
 
 
 
 
 
 
 

Wednesday, March 11, 2020

Making the Mesh

 
Some basic things about Trainz meshes.
Scale: Trainz uses a scale of 1:1, that's 1ft.=1ft.
3D space: +Z is up and -Y is the front and the "ground" base board is at Z=0 (note that no mater what shape the base board has it is always Z=0, this is why you can place a box on a hill side and have a gap at the bottom.
 
First thing that you need to make are some attachment points. All kind "traincar" have to have 5 attachment points, 4 of them you make and 1 is a default that you do not make, it's X=0,Y=0,Z=0, Trainz will use it as a fallback for some things others must have the right name.
So in order you must make  and name a.limfront, a.bog0, a.bog1, and a.limback. If the order is wrong you will get an Error it use to be a derail.
 
The two a.lim ones are the coupling bounding boxes that Trainz adds and the two a.bog are the bogeys and how the car/loco fallows the track. You can have any number of bogeys but the body will turn and fallow a,bog0 and a.bog1. (a.bog3, a.bog0, a.bog1, a.bog4) is good and (a.bog3, a.bog1, a.bog0, a.bog4) is not.
 
In Blender you add an Empty for FBX and name it.
 
Here are the names and xyz in feet/inches:
 
a.limfront  X=0, Y=-21'11", Z=2'9.6"
 
a.bog0      X=0, Y=-15'4", Z=1'4"
 
a.bog1      X=0, Y=15'4", Z=1'4"
 
a.limback X=0, Y=21'11", Z=2'9.6"
 
Note that all have X=0 as in Trainz the trains only "see" the center line of the track and the bogeys fallow that. My bogeys are set up so that the center of the wheels is at Z=0 so the attachment point is one half the diameter of the wheel, 33"/2=16.5" rounded off to 16".

Next make a box, size about 10'x10'x40' centered at X=0, Y=0 and the bottom at Z=3'4.94".
You can now export the box and the 4 attachments as FBX into your work folder saved as 40ft_boxcar_body.fbx. You can then import into CM, "submit edit" and it should be a working boxcar, the top will be green and white.
 
 

Monday, March 9, 2020

Setup
 
I am going to show how to simplify the config and the work file.
 
Blue is what was done in last post, RED is to be deleted.
 
 
username                                "40ft PRR X31b boxcar"
kind                                    "traincar"
mass                                    20657
engine                                  0
enginespec                              <kuid:-1:42004201>
category-class                          "XB"
description                             " 40ft 50ton boxcar as used by Pennsylvania RR, Class X31b, built 1939.This car has seaeon snow."
author                                  "Whitepass"
contact-email                           "
whitepasstrainz@gmail.com"
license                                 "n/a"
category-region                         "CA;US"
category-era                            "1930s;1940s;1950s;1960s"
trainz-build                            4.6
fonts                                   1
fonts-path                              "car"

use-coupler-sounds                      1
mesh-table-lod-transition-distances 

season-selector
{
  season-range                          0.25,0.75
 
  branch-true
  {
    season-range                        0.25,0.5
   
    branch-true
    {
      output-season                     0
    }
   
    branch-false
    {
      output-season                     1
    }
  }
 
  branch-false
  {
    output-season                       0
  }
}
vehicle-running-numbers
{
  running-numbers                       "61100-62770"
}
thumbnails
{
  0
  {
    image                               "boxcarprr.jpg"
    width                               240
    height                              180
  }
 
  1
  {
    image                               "40ft_boxcar_art/40ft_boxcar_art_icon.tga"
    width                               128
    height                              64
  }
}
mesh-table
{
  default
  {
    mesh                                "40ft_boxcar_body/40ft_boxcar_body.lm"
    auto-create                         1
  }
 
  fram
  {
    mesh-asset                          <kuid:58422:100060>
    mesh                                "frame.lm"
    auto-create                         1
  }
 
  winter
  {
    mesh                                "winter/snow.lm"
    auto-create                         1
    mesh-season                         1
  }
 

}
queues
{
  load
  {
    size                                7
    initial-count                       0
    product-kuid                        <kuid:-3:10013>
   
    allowed-products
    {
      0                                 <kuid:-3:10013>                                              
      1                                  <kuid2:30671:9040500:1>
      2                                 <kuid2:30671:9040690:1>
      3                                 <kuid2:30671:9080810:1>
      4                                 <kuid2:30671:9080510:1>
      5                                 <kuid2:30671:98702901:1>
      6                                 <kuid2:30671:94805601:1>
    }
  }
}
bogeys
{
  0
  {
    bogey                               <kuid:58422:100464>
    reversed                            0
  }
}

kuid-table
{
  0                                     <kuid:58422:100464>
  1                                     <kuid2:30671:9040500:1>
  2                                     <kuid2:30671:9040690:1>
  3                                     <kuid2:30671:9080810:1>
  4                                     <kuid2:30671:9080510:1>
  5                                     <kuid2:30671:98702901:1>
  6                                     <kuid2:30671:94805601:1>
  7                                     <kuid:-1:42004201>
  8                                     <kuid:-3:10013>
 
  9                                     <kuid:58422:100060>
}
kuid                                    <kuid:58422:100463>
 
 
We will be putting most of this back, why you made a backup.
 
What your work folder should look like:
 
Delete the folder "car_alpha_numbers".
 
Open the folder named "40ft_boxcar_body" shown below and delete all red files.


Next open the file "40ft_boxcar_body.lm.txt" see below.

version 1.0
offset=0.01;
calcPoint=center;
multiplier=1.0;
animationCutOff=0.00;
renderCutOff=0.00;
attachmentCutOff=0.1;

mesh("0.01")
{
name="xx_boxcar_body.trainzmesh";
}
mesh("0.4")
{
name="low40ft_boxcar_body.trainzmesh";
}

mesh("0.8")
{
name="med40ft_boxcar_body.trainzmesh";
}

mesh("1.0")
{
name="40ft_boxcar_body.trainzmesh";
}
 
Delete the red and save.
Last thing is to rename the mesh file "40ft_boxcar_body.trainzmesh" to "40ft_boxcar_body.fbx"
Windows will give you warning about changing file type that is what you are doing.
DO NOT TRY TO IMPORT to CM at this time, you need to make two FBX mesh's first.
 


Sunday, March 8, 2020

Replacing the bogeys.

 
The PRR boxcar has odd bogeys so we will replace with  KUID2:58422:1025:7 the most common kind.
Trainz bogeys are setup two ways, wheel center at Y=0 (what you should do) or Y=-diameter of wheel(rail head), both work the same.
 
All you need to do is edit the config.txt.
 
Old config.txt at the bottom:

bogeys
{
  0
  {
    bogey                               <kuid:58422:100464>
    reversed                            0
  }
}

kuid-table
{
  0                                     <kuid:58422:100464>
  1                                     <kuid2:30671:9040500:1>
  2                                     <kuid2:30671:9040690:1>
  3                                     <kuid2:30671:9080810:1>
  4                                     <kuid2:30671:9080510:1>
  5                                     <kuid2:30671:98702901:1>
  6                                     <kuid2:30671:94805601:1>
  7                                     <kuid:-1:42004201>
  8                                     <kuid:-3:10013>
  9                                      <kuid:58422:100060>
}

Just replace the RED text with <kuid2:58422:1025:7>

To edit you can start CM find the car and do an "Open/ Edit Config File Text". Then do a "Submit Edit". If you do not have that bogey installed CM will download it as it is on the DLS, you get two files.

Every thing in the kuid-table is what the car needs to work and all can be replaced by things on the DLS or Built-in, do not use payware as if you do only ones who can use your content are the ones who have the same payware. Using content from the internet bad as finding it can be a pain and it could end up unavailable. If you plan to us the DLS all content must be on it or Built-in.