Search Unity

Question Objects pick wrong light probes

Discussion in 'Global Illumination' started by LottaCG, Sep 4, 2020.

  1. LottaCG

    LottaCG

    Joined:
    Aug 19, 2019
    Posts:
    4
    This is driving me crazy. My scene has some complex shadows that I try to trace with light probes. But then objects just pick three random probes that are not close at all, and I end up with wild lighting results. I'm new to light baking and GI and I have no idea how to fix this. Can anyone point me in the right direction?

    upload_2020-9-4_16-31-54.png
     
  2. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    It's because you have a degenerate tetrahedron as the probe aren't aligned, so it create a flat concavity shape below your group, check the top right image. I would say try to make all lightprobe on the same height, actually the same height.
     
  3. LottaCG

    LottaCG

    Joined:
    Aug 19, 2019
    Posts:
    4
    Thanks for the response! Does this mean I'm screwed when the terrain has height differences? Do you know if there's any way around this? (other than flattening the terrain, that's not an option unfortunately)
     
  4. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    If teh terrain has height difference, so will active object poaching from the lightprobe, ie they won't get into the degenerate tetra. The ground is flat, the light probe should be too.
     
  5. LottaCG

    LottaCG

    Joined:
    Aug 19, 2019
    Posts:
    4
    Hmm that's not my experience.
     
  6. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    I'm saying, place the probe so you can't have the active gameobject position out of the proper tetra
     
  7. LottaCG

    LottaCG

    Joined:
    Aug 19, 2019
    Posts:
    4
    Unfortunately I would have to place, my probes underneath the terrain for that, since I have a lot of rocks that are submerged. I'm starting to get a better feel of where unwanted tetrahedons might emerge but if it keeps giving me trouble I might just ask someone to write me a new probe system haha. Thanks for the input!
     
  8. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    It's probably because the objects sample the lightmap from their root position, and that root is too low. Try with objectsvwhere the root isn't that low or find a way to shift the root sampling.