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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Resolved Mask Map - ambient occlusion shiny ground workaround?

Discussion in 'High Definition Render Pipeline' started by mikeohc, Jul 1, 2021.

  1. mikeohc

    mikeohc

    Joined:
    Jul 1, 2020
    Posts:
    215
    In the HDRP manual - it says that ambient occlusion in the mask map is used to calculate specular occlusion as well.

    I applied a black mask to tweak the values of each channel (metallic, smoothness, etc) through remapping the values. AO also needs a texture to tweak the values.

    Is there a way to get around this specular reflection in dark areas while keeping the indirect lightings from lightmaps? If I set AO to 0, then I lose all indirect, but if I set anything higher, I'll get shiny ground when looking at an angle.

    Screenshot (241).png Screenshot (242).png

    Losing indirect light when setting AO to 0.

    Screenshot (244).png

    Screenshot (243).png
     
  2. tuinal

    tuinal

    Joined:
    Dec 14, 2012
    Posts:
    17
    The problem looks more like the floor is reflecting the light from the skybox. The AO in the mask map is meant for small details that have no geometric depth and are instead faked by the normal map, since AO won't touch them by default. If you try to use it for large areas like a lightmap you'll end up with massive textures eating memory.

    What I think you want to do is bake a reflection probe inside the building so the reflection is of the black surroundings, rather than the skybox.
     
    mikeohc likes this.
  3. mikeohc

    mikeohc

    Joined:
    Jul 1, 2020
    Posts:
    215
    The specular is gone after baking a reflection probe. Thank you
     
  4. mikeohc

    mikeohc

    Joined:
    Jul 1, 2020
    Posts:
    215
    Do I have to bake reflection probe everywhere to not reflect the sky? Is it possible to disable environment reflection on a specific shader like URP can?