Search Unity

Question Help with baked lighting

Discussion in 'Global Illumination' started by acandael, Sep 5, 2022.

  1. acandael

    acandael

    Joined:
    Apr 7, 2021
    Posts:
    74
    Hello,

    Could you help me figure this out: I have a few spot lights, all of type 'baked', with intensity and indirect multiplier of 1. They cast light onto a device that lies on a plane.

    Lighting settings are set to "Baked GI" (and Realtime GI is not enabled).

    When I bake the lights, only the ground plane gets lighting, and gets a lightmap. I don't understand why the device on the ground doesn't get light at all (it remains all black).
    Both the plane and the device are set "Static" (for everything), they have the same material, and they both have "Contribute GI" ticked + receive GI from lightmaps.

    They obviously are both in range of the spots, since the plane is further from the spots than the device, and the plane gets light.

    What am I missing??

    This uses the built-in rendering pipeline. Materials use Standard shader.

    upload_2022-9-5_16-59-34.png

    Thanks a lot!
    Arnaud.
     
  2. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    Does the material assigned to the object have high smoothness and metallic values? If so, you might need to place a reflection probe in the scene.
    Could you check how does the Baked Lightmap scene view mode look like after baking?
     
  3. acandael

    acandael

    Joined:
    Apr 7, 2021
    Posts:
    74
    Hello,

    Thanks for your answer and sorry for my late reply..
    So the assigned material has values of 0 and 0.5 for Metallic and Smoothness, respectively. So, basically, what you get if you just create a new Material.

    The Baked Lightmap scene view mode looks like this after baking:

    upload_2022-9-20_10-50-26.png

    Thanks again,
    Arnaud
     
  4. acandael

    acandael

    Joined:
    Apr 7, 2021
    Posts:
    74
    Hi again,

    I just realized.. It seems there's no UV mapping on that geometry (is that possible?).
    If I change the scene view to 'UV Charts', the device doesn't appear.. I guess that would be the explanation?

    Thanks a lot!
    Arnaud.
     
  5. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    In that case, you would need to either author lightmap UVs yourself, or have Unity generate them for you. Select your model in the Project tab, and in the Inspector, check the Generate Lightmap UVs toggle. More info about it here: https://docs.unity3d.com/Manual/Lig...ghtmappingUVs.html#automatically-generate-uvs

    Also, if the unlit object has multiple objects nested underneath, make sure that every sub-object is a GI contributor.
     
    acandael likes this.
  6. acandael

    acandael

    Joined:
    Apr 7, 2021
    Posts:
    74
    Perfect, thank you!