Search Unity

Normal map vanished after light bake!

Discussion in 'Global Illumination' started by EliasCyborn, May 22, 2019.

  1. EliasCyborn

    EliasCyborn

    Joined:
    Jan 11, 2017
    Posts:
    9
    Hi,

    I'm having an issue (using LWRP) where normal map intensity is decreased by a lot when lighting is baked.
    I found in some thread that this is because of Unity's decision to remove Directional Specular baked lighting after Unity 5.6?? Don't know if this is outdated info..
    Thus the lighting in my project looks very flat when going from real time to baked resulting in a lesser quality end product.
    I have the same problem when using a HDRP project.
    Is there any way i can solve it/ work arround it without using real time lighting (since my project needs to stay optimized for mobile purposes).

    Here are some results and my settings:
     

    Attached Files:

  2. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    This is one of limitations of our current directionality encoding. A better approach would be to use mixed lighting, so that you would benefit from realtime indirect (resulting in a more accurate normals representation) and baked indirect.
     
  3. uy3d

    uy3d

    Unity Technologies

    Joined:
    Aug 16, 2016
    Posts:
    187
    You can't expect the same result with your current settings between realtime and baked lights. In your second screenshot your object is also lit by the environment, that's where the blue hue is coming from. Also, as light is bouncing around, the previously dark parts of your mesh now also see lighting and brighten up, which will soften the look compared to realtime only. Reducing the bounce count will provide harsher results. You may also want to try Baked indirect instead of subtractive, or modify the Realtime Shadow color to try to change the look of the scene.
     
  4. EliasCyborn

    EliasCyborn

    Joined:
    Jan 11, 2017
    Posts:
    9
    I tried setting bounce light to 1 etc, but minimal effect so it doesn't solve the problem
    I also tried setting my directional light to mixed with varying settings like lightmapper/lightmap size/...
    subtractive is the only option available :/

    And i know i can't expect the same results realtime/baked, but i would expect baked to look better and that my normal maps are still present.
    (Why does UE4 not have this problem? when i bake there everything just looks more realistic with softer shadows and a bit of bounce light in shadows but normal maps stay untouched)
    Also bounce light should only give softer cast shadows and add a bit in darker areas. Now the mesh has almost the same value in highlighted areas and the darkest areas. This can't be the intention...
     

    Attached Files:

    Last edited: May 24, 2019
  5. EliasCyborn

    EliasCyborn

    Joined:
    Jan 11, 2017
    Posts:
    9
    Yes, i tried setting my directional to mixed, but after baking with varying settings like lightmapper/lightmap size/bounce/...
    I still have the same flat result.
    (The only "solution" i found was baking the shadow of the mesh and then setting the same mesh as real time but disabling the cast shadow so I have the nice baked shadow from the mesh when it used to be static and having the nice normals from realtime because the mesh is now real time with cast shadows turned off, but this defeats the purpose a bit and it's a very messy way to work)
     
  6. uy3d

    uy3d

    Unity Technologies

    Joined:
    Aug 16, 2016
    Posts:
    187
    Baked Indirect should be available with the latest LWRP package (probably 5.10+). Subtractive mode will bake the directional light, so you're also missing all specular lighting effects from it.