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

Normal map intensity for baked lighting?

Discussion in 'Universal Render Pipeline' started by darkesco, Oct 27, 2020.

  1. darkesco

    darkesco

    Joined:
    Mar 19, 2015
    Posts:
    61
    Unity 2019.4.13.
    URP Shadergaph created shaders with a SampleTexture 2D set to Normal with normal strength node.

    Whether I use Shadowmask, Indirect, Progressive GPU or CPU my normal maps looks good while baking, until the very final part of the bake, like the last 0.5%. Then the texture just flattens to almost 1% of the normal maps expected "bumpiness".

    If I set the normal strength to 200 then the map shows up a after baking, but my 1 realtime light shows the normal map at 200 and it's really obviously. I would like to have 1 realtime light in my scene, but the exaggerated normal maps around this one light that moves ahead of the player looks ridiculous, while the rest of the scene looks flat like a PS1 game. Is there a normal map intensity/strength for baked point lights. I tried hard shadows and that didn't help.
     
    JesOb likes this.
  2. darkesco

    darkesco

    Joined:
    Mar 19, 2015
    Posts:
    61
    I understand that specular is not baked in, but a roughness should be, and it is, just very faintly. I dug through the pipeline setting and normal bias seems to do nothing. Is this really what we are working with? I'm not trashing Unity and will continue to use it, plus this could be user error, but it seems pretty important and basically means using normal maps and baked lights is pointless. Seems like "use realtime or don't waste memory on normal maps." Unity is amazing and a much better company than Epic. Just wish we could bake normal maps. I don't remember having this issue in LWRP, just in URP.
     
  3. Neto_Kokku

    Neto_Kokku

    Joined:
    Feb 15, 2018
    Posts:
    1,751
    Roughness only affects specular, it has zero effect on diffuse lighting (which is all you get from baked lighting). It would help if you posted screenshots, as it's very hard to recommend a solution for a visual problem with only a text description.
     
  4. darkesco

    darkesco

    Joined:
    Mar 19, 2015
    Posts:
    61
    I just decided to create the extra geometry to fake normals. I deleted all normal textures to finish the project. The problem was I was getting no normal after baking. Imagine a brick pattern. It has groves. Start baking, grooves look good, finalizes bake, result look like a flat picture of bricks with no grooves.
     
  5. Sky77

    Sky77

    Joined:
    Jan 30, 2014
    Posts:
    171
    We’re using bake indirect and normal maps work perfectly.
    Make sure you’re using directional lightmaps.
    If you post a screenshots of your bake and of your settings we can be more helpful.
     
  6. Yenko69

    Yenko69

    Joined:
    Jun 14, 2020
    Posts:
    3
    Here are my screenshots from realtime lit, baked and without normal floor.
    As you can see the intensity of normal map is decreased in baked light and is something between real time lighting and no normal map attached.
    Is there a way of manipulating the lightmapping setting to get a closer result to the real time lighting bump?
    (I've played around with some of the properties in lightmapping setting but I couldn't get a better result than the second image)
     

    Attached Files:

  7. darkesco

    darkesco

    Joined:
    Mar 19, 2015
    Posts:
    61
    I was bad about documenting fixes. At the time, this was an annoying issue and I finally fixed it. I can't remember the fix, but here are my current lighting settings. Progressive GPU with subtractive or baked indirect work fine for me now. I don't use CPU. You can try these just as a test. Obviously make sure your normal maps are good and your material normal settings are high enough to be noticed. In theory, the normals should be seen in baked and realtime, but I had much more pronounced normals in realtime.
    upload_2023-1-7_21-25-27.png
     
  8. Yenko69

    Yenko69

    Joined:
    Jun 14, 2020
    Posts:
    3
    Thanks for sharing. I don't think CPU and GPU lightmapper make a difference in quality (it only affects bake time), but I will test again with the config you sent to see if it works.