.
Page 8 of 8 FirstFirst ... 678
Results 106 to 119 of 119

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

  1. #106
    Join Date
    Feb 2009
    Location
    United States of America, Arkansas, Harrison
    Posts
    2,588
     

    Default

    For those who are familiar with procedural track in a PBR environment, I would appreciate your help. Please go to this forum post made by someone else regarding my TRS19 PBR procedural track:

    https://forums.auran.com/trainz/show...allast-contour

    Bob
    Master Sergeant/E8, U.S. Army, Retired (1972-1993)

  2. #107
    Join Date
    Nov 2006
    Location
    Canberra, Australia
    Posts
    8,474
    Blog Entries
    30
     

    Default

    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


  3. #108
    Join Date
    Jan 2009
    Location
    Canada
    Posts
    604
     

    Default 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.



    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:



    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:



    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).



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

    Parameter:



    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.



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



    Cayden


  4. #109
    Join Date
    Feb 2009
    Location
    United States of America, Arkansas, Harrison
    Posts
    2,588
     

    Default

    Quote Originally Posted by pcas1986 View Post
    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 by MSGSapper; February 14th, 2020 at 11:26 AM.
    Master Sergeant/E8, U.S. Army, Retired (1972-1993)

  5. #110
    Join Date
    Nov 2006
    Location
    Canberra, Australia
    Posts
    8,474
    Blog Entries
    30
     

    Default

    No ultra. These were my settings:



    And this is what I got:



    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.



    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.

    Paul


  6. #111
    Join Date
    Nov 2006
    Location
    Canberra, Australia
    Posts
    8,474
    Blog Entries
    30
     

    Default

    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?


    Paul


  7. #112
    Join Date
    Feb 2009
    Location
    United States of America, Arkansas, Harrison
    Posts
    2,588
     

    Default

    Quote Originally Posted by pcas1986 View Post
    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
    Master Sergeant/E8, U.S. Army, Retired (1972-1993)

  8. #113
    Join Date
    Jan 2009
    Location
    Canada
    Posts
    604
     

    Default

    Quote Originally Posted by pcas1986 View Post
    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.


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


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

    Cayden


  9. #114
    Join Date
    Nov 2006
    Location
    Canberra, Australia
    Posts
    8,474
    Blog Entries
    30
     

    Default

    Quote Originally Posted by MSGSapper View Post
    ...
    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.

    Paul


  10. #115
    Join Date
    Nov 2006
    Location
    New Zealand
    Posts
    3,043
     

    Default

    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).

  11. #116
    Join Date
    Feb 2009
    Location
    United States of America, Arkansas, Harrison
    Posts
    2,588
     

    Default

    Quote Originally Posted by pcas1986 View Post
    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/show...P-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
    Master Sergeant/E8, U.S. Army, Retired (1972-1993)

  12. #117
    Join Date
    Feb 2009
    Location
    United States of America, Arkansas, Harrison
    Posts
    2,588
     

    Default

    Quote Originally Posted by PC_Ace View Post
    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
    Master Sergeant/E8, U.S. Army, Retired (1972-1993)

  13. #118
    Join Date
    Nov 2006
    Location
    Canberra, Australia
    Posts
    8,474
    Blog Entries
    30
     

    Default

    Quote Originally Posted by MSGSapper View Post
    I have moved this track conversation to it's own new forum thread at:

    https://forums.auran.com/trainz/show...P-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.

    Paul


  14. #119
    Join Date
    Jan 2009
    Location
    Canada
    Posts
    604
     

    Default 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.


    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.



    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.



    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.








    Cayden
    Last edited by Cayden; February 15th, 2020 at 06:52 PM.


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •