Search Unity

Possible FIX suggestion for GI getting stuck at 5/11 Clustering or 7/11 Lighting

Discussion in 'Global Illumination' started by Matthew Scott, Mar 11, 2015.

  1. StreetConferenceStudios

    StreetConferenceStudios

    Joined:
    Aug 30, 2013
    Posts:
    21
    I know this thread is old, however I thought that any knowledge intended to help is valid until the bug is fixed.
    I was working on a more basic project and my build was taking longer than usual to build maybe 5-10 mins, but I never waited because it was abnormal.
    I went and clicked on the terrains in all the scenes and changed material to built in legacy diffuse and the build took less than a minute.
     
  2. Nihil688

    Nihil688

    Joined:
    Mar 12, 2013
    Posts:
    395
    This is back in 5.3.0 and 5.3.1
     
  3. Taorcb

    Taorcb

    Joined:
    Mar 15, 2015
    Posts:
    39
    My issue was with a supermassive terrain (almost two square kilometers, I've since broken it up into three scenes with the new scene manager). Unity actually gives you a warning telling you to raise the lightmap parameters. I created a new lightmap parameter and set "Resolution" to 25 and the clustering issue went away. I'm not sure if this approach is terrain-specific, but you may want to try it on large grass planes or background meshes.
     
  4. Nihil688

    Nihil688

    Joined:
    Mar 12, 2013
    Posts:
    395
    A quick solution that I've found is to reduce the scale of the level, bake and return the size to it's normal size, I find that the shadows don't lose their quality and the bake is a lot of times faster ( originally 12h needed for my bake but with this trick it takes 5 minutes ).
     
    samurai926 likes this.
  5. badgerCopter

    badgerCopter

    Joined:
    Sep 3, 2015
    Posts:
    6
    As per the LARGE static object causing the hang, it MIGHT have something to do with your rendering path.

    IIRC the docs state that Forward is better for few lights, large areas, while Deferred is better for a buttload of lights, since itsbased on affected pixels, or some such thing. Anyhoo, had same problem as others, switched off static. Might explain the whole 'scaling my object makes it work,' thing, then again, I may be dumb
     
  6. benjamin7006

    benjamin7006

    Joined:
    Nov 12, 2015
    Posts:
    38
    If You Get Stuck On Lighting Go To Window > Lighting, And Change Some Settings
     
  7. j2l2

    j2l2

    Joined:
    Mar 14, 2016
    Posts:
    14
    AFAIU, lightmap bakes only static models based on their size in the scene.
    For a big model, I put everything static under same gameobject, scale it to 0.1, then change scale back to 1. Shadows and AO are good enough for me.
     
    laurachen likes this.
  8. Savikain

    Savikain

    Joined:
    May 21, 2016
    Posts:
    1
    Thanks so much. I knew it had to be a simple mistake. One of my project teammates had clicked static on the terrain.
     
  9. samurai926

    samurai926

    Joined:
    Jun 30, 2014
    Posts:
    14
    Thanks this actually works!
     
    Nihil688 likes this.
  10. aaabejero

    aaabejero

    Joined:
    Sep 15, 2016
    Posts:
    1
    problem solved in my case! all imported files should have albedo UVs. just click the imported mesh each and click on materials then check albedo is blank, click the small dot beside albedo and browse to the existing materials! hope it helps! also set the proper uvw map before export
     
    Last edited: Sep 15, 2016
  11. Zihaben

    Zihaben

    Joined:
    Apr 6, 2015
    Posts:
    4
    In my case, that was caused by STATIC GAMEOBJECT WITH SHADOW CASTING TURNED OFF. So I turned on shadows for all the gameobjects, and everything is OK.
     
  12. Hazneliel

    Hazneliel

    Joined:
    Nov 14, 2013
    Posts:
    165
    THis is happening to me when I scale up a GameObject, if I try to bake it at normal scale it is very fast, once I upscale it tp 60 it starts to be horribly slow.

    I cannot do the trick to bake it at lower scale because once I upscale it, all the shadows look bad.
     
  13. mon06

    mon06

    Joined:
    Feb 9, 2017
    Posts:
    1
    I think just like you
     
  14. Bip901

    Bip901

    Joined:
    May 18, 2017
    Posts:
    49
    Go to Window->Lighting->Settings->scroll all the way down-->untick "auto".
    Problem solved :D
     
    The_MAnimal and Daerst like this.
  15. Daerst

    Daerst

    Joined:
    Jun 16, 2016
    Posts:
    210
    I can't believe this worked. Thanks! :D
     
  16. Bip901

    Bip901

    Joined:
    May 18, 2017
    Posts:
    49
    You are welcome :D
     
  17. AnupamSahu

    AnupamSahu

    Joined:
    May 16, 2015
    Posts:
    8
    select a static mesh (the ones that are baked) -> mesh renderer -> lighting -> check if unity displays any warning like - exceeds max lightmap atlas size, if it does, decrease the lightmap scale setting (expand lightmap settings in the mesh renderer tab) to values of 0.9 or 0.5 or 0.1 or even 0.01, until the warning disappears , present in that tab.

    do this check for all your static meshes.

    This will hopefully speed up the clustering process.

    Unchecking auto just stops the automatic GI baking process. If you need GI you would have to bake manually anyway, and if you didn't follow the above steps you would probably get stuck in clustering again.

    Only other solution is to not have GI and compromise for a less realistic scene.

    If you are stuck at visibilty or light transport, try lowering the lightmap resolution.

    I hope this helps. :)
     
    Last edited: Aug 19, 2017
  18. RockingGameDeveloper

    RockingGameDeveloper

    Joined:
    May 28, 2015
    Posts:
    12
    I am having trouble baking the lighting in my scene. I am using Tenkuko SkyBox. I don't know why but I have thick shadows all over my terrain and on the objects. It looks great in the editor scene, but not in run time. I don't know what to do, please help. :)
     
  19. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,053
    My lighting window look completely diffferent... I cant find Baked GI or Precomputed GI or the click down bar where i can change the Atlas size?

    Edit : Using Unity 5.6.2f1

    Haha, nevermind :) I saw the atlas statement further up here.. to scale it down for my terrain :)
     
    Last edited: Nov 2, 2017
  20. TsvetanTsankov

    TsvetanTsankov

    Joined:
    Dec 14, 2015
    Posts:
    3
    You can try tweaking the Lightmap Parameters (change to Default-LowResolution for example)
     
  21. HDBroYT

    HDBroYT

    Joined:
    Aug 7, 2017
    Posts:
    1
    thx, it works!
     
  22. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,591
    I still have that question :). It should be off by default.