Search Unity

  1. Check out the Unite LA keynote for updates on the Visual Effect Editor, the FPS Sample, ECS, Unity for Film and more! Watch it now!
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  4. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

HDRP Lit Shader detail map issue

Discussion in 'Graphics Experimental Previews' started by Koach, Jul 14, 2018.

  1. Koach

    Koach

    Joined:
    Feb 14, 2018
    Posts:
    3
    I've been trying to figure out how the detail map inputs work on the new lit shader, and so far I'm extremely confused. I followed the documentation here:

    https://github.com/Unity-Technologies/ScriptableRenderPipeline/wiki/lit-shader

    And created a test image, creating black and white values directly on the red, green and blue channels, and erasing half the image as well to test the effects of extremes in all the different channels, and the results are...extremely confusing. Is there a more detailed guide on how to make detail maps for the new lit shader?
    detail map test.png
    issue with detail map.jpg
     
  2. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    165
    There is no guide currently, but I will try to compare it to how the Built-In standard detail maps works :
    Basically, detail maps contain surface informations (albedo, normal, smoothness) that are added to the base surface information, in ordre to be used with a high tilling value.
    In the Built-In standard shader, the detail maps are Albedo and Normal. In HDRP, we wanted to optimize the number of texture samplers in a material, and that's why there is only one map used for detail, where :
    • The red channel contains the albedo variation. It is applied to the underlying material in an "Overlay" blend mode, similar to photoshop. You can create this channel by simply desaturating the built-in detail albedo.
    • The green channel contains the normal Y value. Simply use the green channel of the built-in detail normal.
    • The blue channel contains the smoothness variation. One again, it is applied with an "Overlay" blending, and this can either be done by using the smoothness map of your detail material if you have one, or creating is from the albedo, or leaving it to a mid-gray value to keep the underlying smoothness unchanged.
    • The alpha channel contains the normal X. Like for the blue channel, you can simply use the red channel of the built-in detail normal.
    I hope this was clear enough and that it helped you.
     
    KUDr likes this.
  3. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    391
    @Remy_Unity I understand what a detail normal map is, it's an overlay for fine details.
    But what is an "albedo variation"?
     
  4. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    165
    Imagine that your base albedo is ... let say red.
    The albedo variation in the detail map will keep the red information, but lighten or darken it. If the detail is mid gray, the final albedo is unchanged. It it is white, the final albedo will be white. And if it is black, the final albedo will be dark.
    The behavior is similar for the smoothness.