PBR - Road / curb shader questions

Discussion in 'Track Modding' started by McNolo, Sep 14, 2020.

  1. McNolo

    McNolo Registered

    Joined:
    Oct 5, 2010
    Messages:
    476
    Likes Received:
    945
    @Alex Sawczuk, I would like to ask some questions about this shader, how it works and the techniques needed to use it.

    - Alpha channel of Albedo textures. Based on the suggested nomenclature "_Alba" and "_Albr", I don't really understand the difference of the Alpha channel between the two. Also, would it be possible to have a little tutorial or indication to create each of these alpha channels? I have tried to invert the original albedo texture and then play with the levels, but the result, although it looks similar, is not the same.

    - Alpha channel "_ova" texture. I assume this alpha channel is the "wear" that is painted in blue in RoadDetailsMap, is that correct ?. Any technical suggestions for creating the alpha image?

    - RoadDetailsMap. I need clarification on this bold line of the instructions to create this map (it confuses me as it is explained, probably because of the language barrier, sorry):
    "Remove all UVW data, and then acquire a UVW map modifier in channel 1 with the same mapping as the RoadDetailMap uses"
    You mean a mapping that covers the entire track, as explained in the old documentation about creating puddles?

    - RoadDetailsMap's alpha channel is now the puddle map, but I have noticed that it is much "lighter" than before. Any suggestion or basic rule to create it? Something that we should avoid or do?

    - About vertex paint, as I think I have understood in the documentation, what is painted green would be the "default rubber"?

    Thank you.
     
    Corti likes this.
  2. Alex Sawczuk

    Alex Sawczuk Administrator Staff Member

    Joined:
    Oct 4, 2010
    Messages:
    851
    Likes Received:
    971
    In case anyone is wondering, this is in relation to these two pages of documentation:
    With regards to the questions:
    • The recommended naming of textures is explained here: https://docs.studio-397.com/developers-guide/track-development/general-tracks/naming-conventions
    • The difference between "alba" and "albr" is just for your own information purposes. Alba means the alpha channel is used for opacity, where as Albr means we have put the roughness map in to this texture. You can configure the standard shader to use the alpha channel as opacity or just pack the roughness in, if you don't need map input for metallic values.
    • The overlay map, with alpha channel, the RGB channels are typically applied to the albedo, and the Alpha channel is typically applied to the roughness map (it is on the Road Shader, it can be configured various ways in Standard Blend shader). Both using overlay function where 0.5 or 128 values do not change the output, but higher or lower make it brighter or darker.
    • On the Road shader the blue channel in the Road Detail Maps is used in addition to the red channel of the Blend Wet Mask to vary the strength of the overlay effect across the road.
    • Typically we used the road detail map to cover the entire road yes, we use the same mapping as the old puddle map.
    • The puddle input you need to eye ball and check that it looks correct. You can manually set different levels of wetness in the Scene Viewer or ModDev to ensure it produces good looking output. In general 100% should NOT flood the entire circuit.
    • Vertex Painting in the documentation is for baking to texture, not for export.
     
    Wizzo58 and Emery like this.
  3. McNolo

    McNolo Registered

    Joined:
    Oct 5, 2010
    Messages:
    476
    Likes Received:
    945
    Sorry but I need to break this down to a more basic level in order to understand it. Let's go by parts.

    Focusing on the albedo texture of the track and those two types of alpha channel ("_alba" and "_albr", to understand us). "_alba" uses alpha channel for opacity, does it mean it is used when the track is wet ?. This is how it worked in the previous shader (RealRoad shader), right?

    Regarding the roughness alpha channel, I don't understand what the roughness is exactly, how it looks in the game or how it acts on the albedo texture. Could you explain this a bit?

    Thanks.
     
  4. Alex Sawczuk

    Alex Sawczuk Administrator Staff Member

    Joined:
    Oct 4, 2010
    Messages:
    851
    Likes Received:
    971
    Last edited: Sep 14, 2020
  5. McNolo

    McNolo Registered

    Joined:
    Oct 5, 2010
    Messages:
    476
    Likes Received:
    945
    Ok, sorry for the inconvenience.

    I saw a texture in Loch Drummond called "Track_RoadA_Alba.dds" and this led me to wonder these questions.

    Thanks.
     
  6. Alex Sawczuk

    Alex Sawczuk Administrator Staff Member

    Joined:
    Oct 4, 2010
    Messages:
    851
    Likes Received:
    971
    Sorry, that's a mistake, the texture isn't used and should be removed. That's a left over from before we used "albr"
     
    Emery likes this.
  7. McNolo

    McNolo Registered

    Joined:
    Oct 5, 2010
    Messages:
    476
    Likes Received:
    945

    Understood, thanks for this link, here's what I wanted to know.
     
  8. McNolo

    McNolo Registered

    Joined:
    Oct 5, 2010
    Messages:
    476
    Likes Received:
    945
    Ok, I was a bit confused on that. :)
     
  9. Alex Sawczuk

    Alex Sawczuk Administrator Staff Member

    Joined:
    Oct 4, 2010
    Messages:
    851
    Likes Received:
    971
    Also
    High Frequency = Maps tiled a lot
    Low Frequency = Maps tiled much less.
     
  10. McNolo

    McNolo Registered

    Joined:
    Oct 5, 2010
    Messages:
    476
    Likes Received:
    945
    Ok, thanks, that clears up a few things. It seems that I have some problems with the terminology, I will try to improve that.

    Reading the previous link that you have given me (I had overlooked it when I read the documentation, sorry) I'm understanding some things, but to be frank, it is not easy, it is a lot of new things to understand and the change is important, or al less that is seeming to me.

    Modding is getting really serious. :)
     
  11. McNolo

    McNolo Registered

    Joined:
    Oct 5, 2010
    Messages:
    476
    Likes Received:
    945
    Ok, now I have a much clearer idea of the process, I already understand more clearly how it works and the steps to follow. I would like to ask a question about this line of the instructions in particular:

    "Use separate Red, Green and Blue vertex color modifiers with add blending mode on the 2nd and 3rd ones"

    You mean that we have to add a fourth vertex color modifier where the areas of intermixed color between green and blue (rubber and wear) are painted?

    Thanks.
     
  12. Alex Sawczuk

    Alex Sawczuk Administrator Staff Member

    Joined:
    Oct 4, 2010
    Messages:
    851
    Likes Received:
    971
    You are basically painting to Vertex Colour the areas you want to prebake details. We will output these details into a texture which is mapped onto the surface. (The Vertex Colour is NOT exported to GMT mesh) By using separate modifiers with additive blending, you can modify each channel independently.
     
  13. McNolo

    McNolo Registered

    Joined:
    Oct 5, 2010
    Messages:
    476
    Likes Received:
    945
    Yes, I understand that, I know how it works and for what it is done, what I need to clarify is if the "additive blending" is a separate vertex color modifier where we mix both colors.
     
  14. Alex Sawczuk

    Alex Sawczuk Administrator Staff Member

    Joined:
    Oct 4, 2010
    Messages:
    851
    Likes Received:
    971
    Yeah you have 3 vertex colour modifiers
     
  15. McNolo

    McNolo Registered

    Joined:
    Oct 5, 2010
    Messages:
    476
    Likes Received:
    945
    I have a doubt. Decal objects painted on the asphalt, such as lines or advertising should use this shader as well, or which one do you think would be the most appropriate?

    Thanks.
     
  16. Alex Sawczuk

    Alex Sawczuk Administrator Staff Member

    Joined:
    Oct 4, 2010
    Messages:
    851
    Likes Received:
    971
    for now we just use IBL Standard and model them above the surface for road lines.
    For large areas of painted asphalt (such as yellow and blue areas at Le Mans), we use IBL Road with a different albedo map
     
  17. McNolo

    McNolo Registered

    Joined:
    Oct 5, 2010
    Messages:
    476
    Likes Received:
    945
    About IBL Standard, any indication or advice of how we can create the "Metal Rough" map?

    Thanks.
     
  18. TTM

    TTM Registered

    Joined:
    Dec 20, 2012
    Messages:
    68
    Likes Received:
    34
    Correct me Alex if i'm wrong, but example with Substance B2M3 (Steam) you can do all necessary "maps".
     
    Last edited: Sep 21, 2020
  19. Alex Sawczuk

    Alex Sawczuk Administrator Staff Member

    Joined:
    Oct 4, 2010
    Messages:
    851
    Likes Received:
    971
  20. TTM

    TTM Registered

    Joined:
    Dec 20, 2012
    Messages:
    68
    Likes Received:
    34
    But is it a little bit hit or miss, if you try to do with photoshop example roughness map to achieve a realistic looking material?
     
    Last edited: Sep 22, 2020

Share This Page