Tutorial: Getting the most from PBR and why you should be using it in TRS19

OK people KEEP making excuses that it is "too expensive for a hobby" well I know here in Yuma registering with the community college here was 30 bux. That gets me a student ID. I can get a student version of 3ds from 2015-2020 I believe for free. Now I have a license as part of a business years ago but I have sent many people wanting to learn 3ds the student way. Same for Substance they also have a free student license.

Now some will whine about the DLC and how all assets have to be payware etc. LOOK if YOU are doing it as a hobby and NOT charging for the work WHILE you are learning you will never run afoul of a student license. But people are gonna whine about it and argue it anyway.

I know payware authors using student versions and no I am not gonna out them LOL but if you are gonna pick gnat crap out of pepper to have an EXCUSE NOT to do it, then you just aint gonna do it LOL

If I may interject my own opinion here, I do agree with mrsci to some extent. Being a student of a technical college or community college does give you a discount or free opportunity to get drawing programs. I am in the aviation program and have access to Catia and such. HOWEVER, it is understandable that people not in CC or a technical college don't have it. It does get pricey.

I looked over the previous posts here, and the thread was pointed at those who have access to high end cards that can run Ultra graphics in 2019. Just gonna leave that there.

I'll say I'm happy with T:ANE and won't upgrade to 2019 until it's $20 on steam in 5 years. I can get near 2019 graphics by just altering the colors of the day, and it works great, especially with fog. I appreciate the look of the PBR textures though.
 
Last edited:
I found out that if you have a missing texture PBR TRS19 will use the green/white one. I got the wrong normal texture name in blender but it showed up in game, only found it win I did an edit to the normal and it did not show.
 
I found out that if you have a missing texture PBR TRS19 will use the green/white one. I got the wrong normal texture name in blender but it showed up in game, only found it win I did an edit to the normal and it did not show.

I got bigger fish to fry :) I have been retraining myself how to get assets back into trainz after being away for 8 years....

2020-02-12-180558.jpg


Now I SWEAR the container is 52'11" But at least the PBR textures look good LOL

To be honest I guess I had that in the wrong product slot and it was trying to load 2 on the bottom...

2020-02-13-102057.jpg


There they are in the right slots
 
Last edited:
There is it is called substance painter LOL I import the mesh and texture it using layers and then when I export it makes the 3 files (albedo, perimeter, and normal) lickety split and I do not have to do anything but set the res and hit a button
I was meaning one that will queue up many files , as you can do in photoshop and apply effects to a whole series of files automatically, not just one at a time.

What I am doing currently is basically re-engineering structure, bridges and other key content items for use in upgrading my existing routes. Most of what I have done, but not all, are from original content items from Ben Dorsey, of which there over 6700 on the DLS.

My re-engineering process involves the following:

1. Use the 3D Object Converter application to convert the .IM files to both 3D Studio Binary Mesh (.3ds) and Wavefront (.obj) files. Why both? One provides a text file for attachment point and animation bone identification and coordinates, the other does not, so I need both. The mesh comes across perfectly but the UV mapping and any animation does not come across at all. FYI 3D Object Converter is a non-free low cost shareware program which really does a good job of this and supports converting of Trainz .IM files to whatever else you may need. This program is virtually the only way we can save content items where the author is no longer around or has abandoned it for whatever reason. It is also great for those authors who have lost their original project files for whatever reason and need to recover the meshes. You can get that program here:

http://3doc.i3dconverter.com/



With the exception of non-visible products, almost everything I have done as Build 4.6 includes all my Blender project files for the content item. Why do I do this?

1. I want to ensure that the items continue forever in Trainz, even after I am gone from the scene for whatever reason. Having the source code for the project allows for easy upgrading when needed to accommodate future changes in major Trainz versions.

2. I want to encourage people out there to become Blender content creators. Having real world examples to work with makes that easier as they can see how I did it. I wish I had had that when I first started working with Trainz. I had to learn the hard way by trial and error.

3. I want to encourage re-skinning and content item variants of all types. As an example you can use different parts of my bridges to create bridges of your own or to re-skin the existing ones. Having the Blender project can help that along much quicker since you can see what I did and how I did it instead of having to guess.

So far I have been disappointed in not seeing any variants of what I have done to date, or even re-skins for that matter, come up on the DLS. I can't do everything folks, nor come up with every possible variant. That is what I am hoping you will do to help things along in TRS19.

Someone said earlier it may take 10 years or more to convert a sizable number of older content items on the DLS to the new PBR format and that figure is probably pretty darn close. There is more then enough older items available on the DLS as it is without adding even more to that number that will later have to be converted to PBR by some person like me, if you are no longer around. Content creators are needed to help in the process of converting content older items to PBR ones for TRS19 and future versions of Trainz.

BTW, please no more comments on the merits of PBR, pro or con, in this forum thread which I started. N3V has already made that commercial decision for us and moved everyone who purchased TRS19 to it. If you have a bone to pick over the adoption of PBR, then you need to contact N3V about it to complain. Content creators must follow suit and start supporting PBR for TRS19 based routes, or stay with the older version of Trainz and risk eventually being left behind - its your choice as it always has been. Constructive comments on how we can work with PBR to make Trainz content items better is what is needed here this thread, along with any tips you might have for doing that. Thank you for your cooperation on this matter.

Bob
I'm all for what you are doing Bob, it's admirable. I think the issue is time related, a very talented asset maker who has been helping me out hasn't had time to even make stuff in blender for TANE recently due to work pressures and us older coots , even tho retired , are often time poor ( I babysit one day a week and spending the entire day on the computer is frowned upon by spouses) . Also It takes a toll on the body, I get neck problems and my hands go numb if I do too much , gone are the days where I could stay up until 3am , go to work at 7am and then get stuck into computing again in the evening after work every day. Just can't do it anymore.
So we have to prioritise and I guess making stuff for current projects in TANE is going I take precedent over making new assets or converting old ones to take advantage of 2019 features. If NV3 were a bigger and financially secure company they would get at least one person to work full time on converting items to work in 2019 , as this is their future , they need as many people as possible to be using that platform and the main reason people will switch is if the content is available. That's the main reason I still am making routes in TANE instead of 2019 , lack of content and backwards compatibility .
 
Last edited:
Bob,
I read through the linked thread and it identifies a bunch of issues that may, or may not be, associated with your track. I tried your track in TRS19 SP1 (Trainz Plus edition) and got track with no sleepers/ties whatsoever. No chairs either. Bob Pearson made mention of a hot fix for SP1 that left me wondering if there is a known problem.

It's been a while since I dabbled with procedural track but I dusted off one test version I made for TANE (4.2) and will convert it to 4.6 and PBR. It may take a few days.

There are others playing in this space including ElStoko who has variations of Andi Smith's track. That track seems to be OK or at least the one I tried. Samplaire is also converting his track to PBR but currently it is a mixture of IM and FBX.

If there are no answers in the interim, I'll get back to you when I can.
 
Height and Ambient Occlusion Maps with the Principled_Baker

The free Principled_Baker Blender add-on can facilitate the exporting of PBR texture maps from Blender by exporting the inputs of the Principled BSDF Shader. It can even combine maps, placing the height map in the alpha channel of the normal map, and merging the emission, roughness, ambient occlusion and metallic maps to form the parameter map. However, the Principled BDSF Shader does not have inputs for a height map or an ambient occlusion map. So, how does one generate the diffuse, normal and parameter maps needed for Trainz 2019?

The solution is to make three passed with the Principled_Baker: (1) to output the diffuse (albedo) map, (2) to output the normal map with the height map in the normal’s alpha channel and (3) to output and combine the emission, roughness, ambient occlusion and metallic maps into the parameter map. The reason three passes are needed is that, in addition to the diffuse (albedo) map, only the Principled BSDF Shader base color input can output the height map and the ambient occlusion map, and only one at a time.

Here I will use the Rustic Brick Wall – PBR0314 texture available for free at Texture.com.

e2m25rs.jpg


The texture set is comprised of an albedo map, height and normal maps, and roughness and ambient occlusion (ao) maps. Since there are no emission or metallic maps, but they are still need to generate the parameter map, the slider settings of the Principled BSDF Shader slider can be used. Because the brick wall is non-emissive and non-metallic the sliders are set to 0.000 to produce a black map.

Diffuse:

miKjzI1.jpg


1. The albedo map is connected to the Base Color input of the Principled BSDF Shader.

2. Only the Color map is selected for output.

3. Value Differences is not checked, as slider value will not be be outputted.

4. Connected Inputs is selected so the albedo map will be outputted.

5. For the diffuse map an alpha channel is not needed so the map type is set to RGB.

6. Since the parameter map is not going to be out putted, this is left unchecked. (I have the parameter and the normal plus height maps set as part of my Startup File settings (File Menu > Defaults > Save Startup File.)

7. Since the Normal Plus Height map is not going to be generated, this is also left unchecked.

8. The outputted diffuse file.

Normal Plus Height:

M12cQXc.jpg


1. The height map is connected to the Base Color input of the Principled BSDF Shader.

2. Both Color (height) and Normal maps are selected for output.

3. Value Differences is not checked as slider value will not be outputted. Connected Inputs is selected so the albedo (height) and normal maps will be outputted.

4. RGBA is selected as the map type as an alpha channel is needed for the height information.

5. The Normal plus Height combination is selected.

6. The normal map is selected for the R, G and B channels and the Color (height) map for the alpha channel.

7. Preliminary testing indicated that height map needed to be darkened to reproduce results similar to the original map. This can be achieved by adding a Gamma Node and then increasing the Gamma value (e.g., 1.5).

hTFucI5.jpg


8. The outputted height, normal and normal plus height files.

Parameter:

jAyzDsl.jpg


1. The ambient occlusion map is connected to the Base Color input of the Principled BSDF Shader.

2. The color (ambient occlusion), metallic, roughness and emission maps are selected for output.

3. Value Differences and the Connected Inputs are both selected since the metallic and emission maps will depend on slider settings and the ambient occlusion and roughness maps will depend on Connected Inputs.

4. RGBA is selected as the map type because an alpha channel is needed for the metallic information.

5. The Parameter combination is selected (Normal plus Height combination is deselected).

6. Emission = red channel, roughness = green channel, ambient occlusion = blue channel and metallic = alpha channel.

7. Preliminary testing indicated that ambient occlusion map needed to be darkened to reproduce the original map. Again, this can be achieved by adding a Gamma Node and then increasing the Gamma value (e.g., 2.0).

8. The outputted emission, roughness, ambient occlusion, metallic and parameter files.

Once the diffuse, normal (normal plus height), and parameter (emission, roughness, ambient occlusion and metallic) maps have been generated they are added back to the Blender file so that the .fbx file can be generated.

81yOVUg.jpg


The diffuse, normal, parameter and .fbx files imported into Trainz 2019 to generate an asset.

bbi2iJy.jpg


Cayden
 
Bob,
I read through the linked thread and it identifies a bunch of issues that may, or may not be, associated with your track. I tried your track in TRS19 SP1 (Trainz Plus edition) and got track with no sleepers/ties whatsoever. No chairs either. Bob Pearson made mention of a hot fix for SP1 that left me wondering if there is a known problem.

It's been a while since I dabbled with procedural track but I dusted off one test version I made for TANE (4.2) and will convert it to 4.6 and PBR. It may take a few days.

There are others playing in this space including ElStoko who has variations of Andi Smith's track. That track seems to be OK or at least the one I tried. Samplaire is also converting his track to PBR but currently it is a mixture of IM and FBX.

If there are no answers in the interim, I'll get back to you when I can.

Paul:

Thanks for the response and information.

Frankly, this is a track project I should probably never have undertaken in the first place. My experience level with procedural track was very minimal to begin with and is not that great even now. I only did it because it was the only way I was going to get true U.S. standard gauge track for my route upgrading efforts. BTW all the Blender 2.79 source code for everything I did with that track is included in the build 4.6 track library, which is on the DLS.

BTW did you have your Shader set to Ultra when you tried the track? These are PBR parallax tracks.....

Bob
 
Last edited:
No ultra. These were my settings:

settings_zpsgauwogjm.jpg


And this is what I got:

track_zpslxlepzm9.jpg


I was trying to recreate the issue with the short track section between the two junctions. The bricks are a random PBR ground texture.




This is my test track I intend to rework. The red sections are high poly, yellow the second level and blue the low poly.

colourful-track_zpsgbywelrb.jpg


The colours were used to try and work out optimal distances, including mesh sizes, within the track tree. The mix of colours suggest that not all mesh parts change LOD at the same time.
 
Cayden,

Have you tried connecting your height value to an unused shader input and baking your normal and that input together rather than using the albedo input?
height%20issue_zpssuvdfzqw.jpg


height%20issue_zpssuvdfzqw.jpg
height%20issue_zpssuvdfzqw.jpg
 
No ultra.

What differentiates PBR parallax procedural track from what you may be used to is that their height in the ballast and other textures. This height can only be realized and observed however by the Shader being set to Ultra. It boils down to the height map in the normal file.

The height map is more or less ignored when the Shader is not set to Ultra, at least that is my understanding of the process. This height map pushes everything up as the track, ties, chairs etc are floating above the ballast texture. You see the same thing with 3D PBR ground textures when they pop up through some old YARN roads for instance. When the Shader is not set to Ultra the ties, tracks, chairs, etc become lower then they were meant to be under the Ultra setting which results in the disappearing track, ties, etc because it now falls below what is now a 2D texture.

The built-in TRS19 track by Jarrah compensates for this by unrealistically low, almost non-existent, ballast beds that don't have the same impact as a more prototypical ballast bed which is higher. That is one of the reasons you see the 3D ground textures popping up through his ballast beds in many spots. That was one of the driving forces behind my doing this project: create a more prototypical looking track and ballast bed.

Bob
 
Cayden,

Have you tried connecting your height value to an unused shader input and baking your normal and that input together rather than using the albedo input?

Connecting the height or ambient occlusion map to any input of the Principled BDSF Shader other than the Base Color input does not give a proper map. For example, here I have connected the height map to the Clearcoat input of the Principled BDSF Shader. Different input give different results but only connecting to the Base Color input give the desired result.

SVQzwx2.jpg

Height map connected to the Base Color input of the Principled BSDF Shader

WCt85q2.jpg

Height map connected to the Clearcoat input of the Principled BSDF Shader.

Cayden
 
...
The height map is more or less ignored when the Shader is not set to Ultra, at least that is my understanding of the process. This height map pushes everything up as the track, ties, chairs etc are floating above the ballast texture. You see the same thing with 3D PBR ground textures when they pop up through some old YARN roads for instance. When the Shader is not set to Ultra the ties, tracks, chairs, etc become lower then they were meant to be under the Ultra setting which results in the disappearing track, ties, etc because it now falls below what is now a 2D texture.

The built-in TRS19 track by Jarrah compensates for this by unrealistically low, almost non-existent, ballast beds that don't have the same impact as a more prototypical ballast bed which is higher. That is one of the reasons you see the 3D ground textures popping up through his ballast beds in many spots. That was one of the driving forces behind my doing this project: create a more prototypical looking track and ballast bed.

Bob
OK, I must have missed the point about the need to set the shader to ultra. Haven't found it documented yet but will keep looking.

When I set the shader to ultra the ties/sleepers appeared but the chairs were still AWOL as discussed in the other thread. The ballast tends to move as well as you rotate and one section had incomplete ballast. It was there but the mesh appeared to have tapered so the thin end was completely under the track.

This begs the question of whether parallax is suitable for track parts. I'm a bit puzzled why Blender materials I have seen have a normal node that takes both the height and normal information and blends them together. I assume that height information is included in the RGB channels rather than the alpha. So, would that mean that if you include the height information that way, you get the effect without using a height in the normal alpha? That's something I intend to explore.
 
MSGSapper - Just a wee note to correct a misperception: 'Jarrah' is not a person/ author: Rather it is an Australian hardwood which makes excellent sleepers for railroad tracks.
Accordingly, the name 'jarrah' is used in the same descriptive manner as 'concrete' or "oak' (sleepers).
 
OK, I must have missed the point about the need to set the shader to ultra. Haven't found it documented yet but will keep looking.

When I set the shader to ultra the ties/sleepers appeared but the chairs were still AWOL as discussed in the other thread. The ballast tends to move as well as you rotate and one section had incomplete ballast. It was there but the mesh appeared to have tapered so the thin end was completely under the track.

This begs the question of whether parallax is suitable for track parts. I'm a bit puzzled why Blender materials I have seen have a normal node that takes both the height and normal information and blends them together. I assume that height information is included in the RGB channels rather than the alpha. So, would that mean that if you include the height information that way, you get the effect without using a height in the normal alpha? That's something I intend to explore.

I have moved this track conversation to it's own new forum thread at:

https://forums.auran.com/trainz/sho...lax-SAP-Track-U-S-132LB-SG-FB-TP-track-series

Please keep in mind that I am still learning a lot here and greatly your insights and tips on this matter. I I also hope others with procedural track insights will also join that new conversation as well.

Bob
 
MSGSapper - Just a wee note to correct a misperception: 'Jarrah' is not a person/ author: Rather it is an Australian hardwood which makes excellent sleepers for railroad tracks.
Accordingly, the name 'jarrah' is used in the same descriptive manner as 'concrete' or "oak' (sleepers).

Thanks for that clarification. I was always wondering who Jarrah was. Who was the actual creator of those TRS19 built-in tracks? Was it you?

Bob
 
I have moved this track conversation to it's own new forum thread at:

https://forums.auran.com/trainz/sho...lax-SAP-Track-U-S-132LB-SG-FB-TP-track-series

Please keep in mind that I am still learning a lot here and greatly your insights and tips on this matter. I I also hope others with procedural track insights will also join that new conversation as well.

Bob

Probably a good idea as topics are getting a little mixed in this thread. Interesting though. I will continue with my track version although I did very little today other than set it up.

PC_Ace is correct about the Jarrah wood although I knew what you meant. Most of my outdoor furniture is made of jarrah. Hard as nails, expensive but looks good if you oil it regularly.
 
PBR Texturing Workflows

After noting the darkness of some of my assets (see post #23 in this thread) I decided to have a further look at the workflows I have been using to generate PBR textures. Initially, I had concerns about the use of the Blender add-on Principled_Baker (free). After finding that there are indeed limitations with this add-on when it comes to adding ambient occlusion and height maps (see post #108 in this thread) I decided to go back and have a look at the Blender add-on SimpleBake ($10.00 US).

Principled_Baker Add-on

First let me clarify where I think the Principled_Bake add-on is particularly useful. The maps that most influence PBR texturing are the diffuse (adds colour), normal (adds depth) and the roughness (adds shininess or matte). If one sticks to generating these maps or others such as metallic, for which there are inputs on the Principled_Bake add-on, everything works just fine.

OP8g6e4.jpg

Setup for generating maps for which there are Principled BDSF Shader inputs.

Once you have the individual maps, for example diffuse, metallic, roughness and normal, a parameter map can be generated in GIMP by adding a black map for emission (non-emissive), a white map for ambient occlusion (no ambient occlusion) and a black map for metallic (non-metallic). The height map is left out (see How to Create PBR Ground Texture Using Materialize and GIMP and/or How to use GIMP to Create PBR Materials).

A height map, and/or ambient occlusion map, can only be generated by feeding them into the Base Color input of the Principled BDSF Shader, so three passes are needed to generate and combine maps with the Principled_Baker (see post # 108 in this thread).

SimpleBake

The SimpleBake add-on is capable of outputting all seven maps that can be used for PBR texturing a Trainz 2019 asset; the diffuse, normal plus height and parameter (emission, roughness, ambient occlusion and metallic) maps. One still need GIMP to combine the height and normal maps, and the emission, roughness, ambient occlusion and metallic maps into the parameter map.

I’ll illustrate using the Corrugated Metal Sheets with Cuts and Scratches
(
metal_008_4K_V3PhEP) from TextureCan.

U9aOk5w.jpg


This texture, as do most, comes with diffuse, height (displacement), normal, ambient occlusion and metallic maps. It has particularly prominent height and ambient occlusion maps.

w9jv1cs.jpg


The ambient occlusion can be plugged into the Transmission input of the Principled BDSF Shader and the height (displacement) into the Transmission Rough input. This will affect the display in the 3D Editor’ Window but this doesn’t matter since the display is not being used to adjust the appearance.

(1.) To match the original, the height (displacement) map needs to be lightened by adding a Gamma Node and reducing the Gamma to 0.8. (2.) In the PBR Bake Settings Diffuse, Roughness, Glossy, Metal, Normal, Transmission and Transmission Rough outputs are checked. (3.) The Bake Margin is set to 3 px. (4.) The Blender file must be saved before one can select Export bakes. (5.) Once this is done simply select Bake.

vPlnwli.jpg


dRumAij.jpg


vTAEkHr.jpg



Cayden
 
Last edited:
Back
Top