Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Solution for large static object GI bug (stuck at 5/11 Clustering)

Discussion in 'Global Illumination' started by chrisbwallace, Jul 23, 2015.

  1. chrisbwallace

    chrisbwallace

    Joined:
    Jul 23, 2015
    Posts:
    7
    Hey everybody! So, as many of you know, Enlighten doesn't like "large" meshes (in terms of world units, not polycount). If you have one in your scene, it's likely to cause light mapping to get stuck at "5/11 Clustering." So, what to do?

    Here's my solution:
    Turn off auto baking
    Create an empty game object with 0,0,0 world coordinates (call it something like, "Scaler")
    Put your entire scene into the new scaler game object
    Set the scale of your "scaler" object to something like 0.1,0.1,0.1
    Now, manually bake your light maps
    When done, reset the scaler game object to a scale of 1,1,1.

    That should get you going until unity can fix this (very annoying) bug. Remember: you'll have you adjust your light map resolution up to reflect the amount that you had to scale everything down. i.e., if your light map resolution before scaling was 40, and you scale your meshes down to 0.1 scale, your light map resolution will need to be turned up to 400.
     
    LaserWzzrd and idurvesh like this.
  2. pahe

    pahe

    Joined:
    May 10, 2011
    Posts:
    541
    Very interesting. I thought about that solution, but can you confirm that it really works? I'm afraid that the quality of the lightmap may later be blurred or has artifacts.
     
  3. idurvesh

    idurvesh

    Joined:
    Jun 9, 2014
    Posts:
    495
    Very good idea, will increasing resolution to that high cause any downside on mobile devices?
     
  4. TanselAltinel

    TanselAltinel

    Joined:
    Jan 7, 2015
    Posts:
    190
  5. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Did you try using the Scale in lightmap parameter in the Lighting window -> Object tab?
     
  6. pahe

    pahe

    Joined:
    May 10, 2011
    Posts:
    541
    @KEngelstoft
    I tried that solution but it didn't fixed my GI baking. It still hung up at 5/11, as well as spamming: "Clustering job failed for system: <some kind of memory adress?>".

    Overall I haven't achieved one single lightmap baking aside from a test project with a single cube :)
     
    LaserWzzrd and idurvesh like this.