Friday, May 31, 2019



Next is delete old material name and add new name.m.pbrmetal and add in the three textures, color, normal, and pbr.


The order is important and the only settings you need color set to color, normal to normal, and pbr to hardness.

I duplicate all the mesh parts to a new layer and join them into one mesh.

Delete old m.onetext it will come back due to joining.

 
Now you make the UVmap, type "U" and use second option.
 
then
Set as above.
 
Go to UVimage/editer and there is your UVmap, you may have to edit the name as Blinder likes to add a .001 at the end, Trainz will see that as a missing texture.
 
 

Thursday, May 30, 2019

How to Update from old Materials to new PBR/FBX

 
Using Photoshop CX6, Blender 2.79, and Substances Painter.
 
You must have the mesh file as you need to re-export it as a FBX and change the material(s) names.
 
The first thing to do is make a new version in CM, edit the config to trainz-build 4.6 and add this line:
 
mesh-table-lod-transition-distances
 
Not having that line will give an Error.
 
Submit edit and fix any Errors now then make a working copy.

Next edit the name.lm.txt and make all .im into .trainzmesh.

Here's the old one:
version 1.0
offset=0.01;
calcPoint=center;
multiplier=1.0;
animationCutOff=0.05;
renderCutOff=0.00;
attachmentCutOff=0.05;


mesh("0.05")
{
name="5004wheel_bogey.im";
}

mesh("0.4")
{
name="4wheel_bogey_low.im";
}
mesh("0.8")
{
name="4wheel_bogey_med.im";
}


mesh("1.0")
{
name="4wheel_bogey.im";
}


and here the new:

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

mesh("0.05")
{
name="5004wheel_bogey.trainzmesh";
}
mesh("0.4")
{
name="4wheel_bogey_low.trainzmesh";
}
mesh("0.8")
{
name="4wheel_bogey_med.trainzmesh";
}

mesh("1.0")
{
name="4wheel_bogey.trainzmesh";
}

Now do the same to the files but go from name.im to name.fbx Windows will give a warning about file type.

Last thing is add in the PBR textures but you have not made them yet so copy in a placeholder set, ether use one from a down load or the samples from N3V on the Wiki, only need the right size.

My sample I am do as I type this needs a name.m.pbrmetal 1024x1024, I have a sidemain.tga, removed the Alpha and made it all red, deleted sidemain-aidemain.texture.txt, due not need, keep sidemain.texture.txt.

Copy over a normal and a pbr.

Make a copy of the Blender file and save as new name.



To be continued.


Wednesday, May 29, 2019

Converting from old textures to new PBR

 
The new PBR textures look much better than the old ones but you can only use them in TRS2019 as it has to be a FBX mesh and Trains Build 4.6 to work.
 
You can not just replace the old textures you need the mesh file as you have to change the Material name and export it as FBX.

You may need to re-do the UVmap(s), PBR dose not like overlapping UV's, you have to bake an AO, you could get away with that in the old textures. Also your RBG numbers must be between 50 and 240, not the full 0 to 255.

PBR has 3 textures vs. old 2. Your old color texture needs the Alpha channel removed and all lighting info, that is remove any AO or shadows.

The Normal textures are the same, do not use an Alpha unless you need parallax. You should set Shader Quality to Ultra to turn on parallax.

The config.txt needs a few changes for FBX, namely Trainz Build 4.6 and your mesh name from name.im to name.trainzmesh and add this "mesh-table-lod-transition-distances".

I will be posting a three part how to.