Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  3. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Bent normals confusion

Discussion in 'Graphics Experimental Previews' started by EricFFG, Apr 23, 2022.

  1. EricFFG

    EricFFG

    Joined:
    May 10, 2021
    Posts:
    189
    TLDR: Does unity create me a bent normal automatically if I have a normal and an AO map?

    Ive been reading this thread about specular occlusion https://forum.unity.com/threads/specular-occlusion.963929/

    But now im noticing that if I just turn on Specular Occlusion from AO and Bent normal in the shader,
    I am getting a bent normal generated somehow from unity and it works as if I had added a baked bent normal

    I cant find anything about that


    From AO:
    FromAO.png

    From Bent and AO:
    Clearly a big improvement here and I dont have a bent normal texture
    BentAndAO.png

    Is this really how it works?

    Btw Custom ones can also work well:

    Custom.png

    Based on light direction
    upload_2022-4-23_1-15-0.png

    Anyone seeing this, really turn on the setting for AO and Bent normal
     
  2. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    upload_2022-4-23_16-55-33.png

    Which mode are you using for without the maps? Perhaps it's a UI thing...
     
  3. adrien-de-tocqueville

    adrien-de-tocqueville

    Unity Technologies

    Joined:
    Mar 16, 2020
    Posts:
    304
    On a shadergrah, if no bent normal is provided the normal is used instead.
    Then it uses a different algorithm than the "From AO" option, which may result in a better result if the mesh normal is pointing somewhat towards the light (ie. if it's close to the bent normal)
     
  4. EricFFG

    EricFFG

    Joined:
    May 10, 2021
    Posts:
    189
    Ah I see, thats a good deed

    Id definitely recommend for people to use that when having baked normal meshes
    This should be in the documentation however
     
  5. adrien-de-tocqueville

    adrien-de-tocqueville

    Unity Technologies

    Joined:
    Mar 16, 2020
    Posts:
    304
    Yes and actually it's weird that this behavior isn't consistent with our Lit shader. I'll make a note to add that in the documentation and unify the behaviors. Thanks for reporting it !