Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Roughness and AO maps for HDRP

Discussion in 'High Definition Render Pipeline' started by Clydey2Times, Dec 15, 2021.

  1. Clydey2Times

    Clydey2Times

    Joined:
    Oct 24, 2017
    Posts:
    232
    I've upgraded my project to HDRP, but I'm having trouble finding where to put my AO and roughness maps. I've read something about using various channels of the mask map, but I have no idea what that means. I don't see any channels for the mask map. I just see a space where I'm supposed to put my texture.

    If I put either my AO or roughness texture in there, the material simply goes black. Also, how am I supposed to use both roughness and AO maps on one slot? Can anyone tell me what I'm doing wrong? Any help is appreciated.
    roughness_ao.png roughness_ao2.png
     
    CYCLE-6 likes this.
  2. olavrv

    olavrv

    Joined:
    May 26, 2015
    Posts:
    502
    HDRP lit material uses a mask map, where the Red, Green, Blue & alpha channel represent the following:
    • Red (R) = Metallic (white is 100% metallic, black = 0% metallic)
    • Green (G) = Ambient occlusion
    • Blue (B) = detail map mask (masks in the detail map)
    • Alpha = glossiness
    Hope this helps. Mask map is much better than individual maps for metallic, AO & glossiness, because it takes up less memory and has quicker access for rendering engine / hardware (access one map instead of 3)
     
    HeliosRuling, ybbobsille and WimB like this.
  3. Clydey2Times

    Clydey2Times

    Joined:
    Oct 24, 2017
    Posts:
    232
    I appreciate you trying, but I have no idea how to implement what you are telling me based on the screenshots I uploaded. I have multiple textures (AO and roughness) and one mask map slot. Where do the RGBA channels come into it? I don't see any RGBA channels, nor do I have any idea how to apply maps to them. What am I missing?
     
  4. Passeridae

    Passeridae

    Joined:
    Jun 16, 2019
    Posts:
    395
    And each texture has multiple channels. Red, Green, Blue and Alpha (If you're using .png, for instance). Therefore you can put up to four grayscale maps (one per channel) in a single texture.
     
  5. Clydey2Times

    Clydey2Times

    Joined:
    Oct 24, 2017
    Posts:
    232
    Yes, I get that. But I'm not sure how to make use of those channels in Unity. How do I put those textures into each channel? I don't even see those channels within Unity.

    Are you saying I need to put those textures into each channel within an image editing program?
     
  6. Passeridae

    Passeridae

    Joined:
    Jun 16, 2019
    Posts:
    395
    Yes. Unity has nothing to do with this process. The shader you're talking about just expects this kind of packing within a texture. How this packing is done - is up to you. There are numerous third-party assets and scripts that can help you with that. Can't recommend anything in particular, just try searching "texture packing" on the asset store or in Google and pick what looks best for you. Personally I use some free script I stumbled upon on reddit long time ago. If you're more familiar with Photoshop - you can just do it there as well.
     
    Last edited: Dec 15, 2021
  7. Clydey2Times

    Clydey2Times

    Joined:
    Oct 24, 2017
    Posts:
    232
    Ah, I see. That makes more sense. Appreciate the help.
     
  8. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,785
    CYCLE-6 and LumaPxxx like this.