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

CPU lighbaking in HDRP

Discussion in 'High Definition Render Pipeline' started by Adam_Streck, Jan 7, 2021.

  1. Adam_Streck

    Adam_Streck

    Joined:
    Jul 31, 2013
    Posts:
    26
    I'm trying to start with HDRP and see how to convert over workflows from SRP. I got stuck very quickly with lightbaking which seems not to work but for the simplest examples.

    I have tested the following with Unity 2020.1/2020.2, HDRP 8.2/10.2, and the default HDRP template project (I have not reconfigured anything on the HDRP or lighting). The bake was CPU (unchanged from default)

    Consider the following example with 4 static cuboids and a single baked directional light. These are correctly lit:
    Correct.png

    Now I flip the normals on the yellow cuboid and get the following
    Incorrect.png
    Not only is the yellow cube not correctly lit, but also the visible side of the red and green cuboid are badly baked.

    Here's the same situation but the light is real-time and works as expected:
    Realtime.png

    I really have no clue why does this behave like this, I've tried some more cases and they work or don't work without much of visible logic to me.

    Here's the lightmap:
    upload_2021-1-7_15-18-39.png
     
    Last edited: Jan 7, 2021
  2. Adam_Streck

    Adam_Streck

    Joined:
    Jul 31, 2013
    Posts:
    26
    Similarly:

    a point light inside a cuboid with only internal faces
    Correct2.png

    the same, but the cuboid has internal and external faces (double the geometry)
    Incorrect2.png