Search Unity

Static batching problem with light probes

Discussion in 'Global Illumination' started by Blodorag, Aug 11, 2020.

  1. Blodorag

    Blodorag

    Joined:
    Jul 16, 2013
    Posts:
    33
    Hi everyone !

    I have a problem with lightprobes and static batching.
    In my scene I have several little objects (books on shelves, furnitures...) on static for performance purpose, but not lighmapped, just using lightprobes, to save time and texture size on baked lighting.

    upload_2020-8-11_17-38-34.png
    upload_2020-8-11_17-31-43.png


    But it seems Unity doesn't want to batch these objects (I specify that I have only one Light Probe Group)

    upload_2020-8-11_17-30-48.png


    Do you have a solution or maybe any advices to achieve that ?

    A good day to everyone
     
  2. Blodorag

    Blodorag

    Joined:
    Jul 16, 2013
    Posts:
    33
    After many tries I realize that associate static object (even not-lightmapped) with lightprobes is a mistake.

    If anyone want to achieve an environment with fixed little objects not lighmapped (like books, pebbles...) you have to uncheck "Static" and check "Enabled GPU Instancing" on your objects material.

    upload_2020-8-13_9-17-56.png


    Have a good day everyone.
     
  3. FiveFingerStudios

    FiveFingerStudios

    Joined:
    Apr 22, 2016
    Posts:
    510
    You can use "Anchor Overide" to force objects to use the same light probe.
     
  4. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
  5. MDADigital

    MDADigital

    Joined:
    Apr 18, 2020
    Posts:
    2,198
  6. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Yes, we are aiming to make this automatic in a future release.
     
    sirleto and MDADigital like this.
  7. FiveFingerStudios

    FiveFingerStudios

    Joined:
    Apr 22, 2016
    Posts:
    510
    How is your solution different than just using anchor overrides for the light probes? Would it give a more accurate result?
     
  8. BuzzKirill

    BuzzKirill

    Joined:
    Nov 14, 2017
    Posts:
    48
    I get this effect ("Objects are affected by different light probes") on my bushes (added via Terrain) that have both Light probes and Reflection probes set of Off. I wonder how I can make them be batched.
     
  9. sirleto

    sirleto

    Joined:
    Sep 9, 2019
    Posts:
    146
    Question:

    Could this Problem of batched objects be solved, by adding them to a parent, setting up 1 LPPV (Light Probe Proxy Volume 3d texture) for that parent and then using that LPPV for all objects.

    my hope would be that the static batch ("one big mesh") gets then drawn with that 1 LPPV.

    will this work?