Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Occlusion Culling in 4.3

Discussion in 'Editor & General Support' started by Brenden-Frank, Nov 13, 2013.

  1. Brenden-Frank

    Brenden-Frank

    Joined:
    Aug 5, 2012
    Posts:
    110
    As of 4.3, Occlusion Culling seems to be generating false positives when it comes to culling lights.

    Our character has a flashlight, and depending on the angle of the character, the spot light simply flickers on and off as if its being culled.



    Any help or advice on integrating occlusion culling to 4.3 would be greatly appreciated.

    Thanks!
     
    Last edited: Dec 19, 2013
  2. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    I'm having light problems too. They'll suddenly turn on or off, depending on how close the player is to them. Any help would be greatly appreciated.

    EDIT:
    Turning all the light's GO's off, then turning them back on seemed to fix it. For now.

    EDIT2: Nope. Still broken.
     
    Last edited: Nov 13, 2013
  3. Luca4b

    Luca4b

    Joined:
    Oct 25, 2013
    Posts:
    1
    Same problem. Objects seem to appear and disappear depending on the distance, even if they are supposed to be hidden. Visibility lines seem to cross objects strangely
     
  4. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,044
    Water4 reflections disappear and reappear when the camera starts to point upwards... :(
     
  5. bigzer

    bigzer

    Joined:
    May 31, 2011
    Posts:
    160
    Computing the occlusion data here sometimes never ends and stops at 'computing occlusion' with the blue bar to 100%. For some reason I hear my HDD running non stop.
    If I click cancel unity will just freeze, same when I tried to change scene.
    Stragely enough I managed to bake data just before.
     
  6. roxIndie

    roxIndie

    Joined:
    Oct 14, 2012
    Posts:
    27
    Same here, some strange light behaviour going on. I upped the Smallest Occluder size and that imrpoved things, but its still not perfect.
     
  7. mindfarm

    mindfarm

    Joined:
    Mar 25, 2013
    Posts:
    4
    Well.. same here. Lights are heavily flickering even while within FOV and not set to static..
     
  8. Robert-Acksel

    Robert-Acksel

    Joined:
    Aug 7, 2012
    Posts:
    17
    Same. Lights are turning on and off. I have an animation on my camera which is slightly moving it. The lights are turning on and of depending on my animations state.

    Edit:
    It seem to have something to do with the main camera and how it is placed at baking time or at game start time. I observed that the occlusion only fails for objects, which have been visible at baking time from my main camera. For the rest of the scene the occlusion works perfectly.
     
    Last edited: Nov 21, 2013
  9. roka

    roka

    Joined:
    Sep 12, 2010
    Posts:
    478
    I have the same problem, sometime a dynamic character don't appear when it's visible. I move a little bit my controler and i can see it appear.
    Dynamic object appear and disappear for me.
     
  10. FabioZ84

    FabioZ84

    Joined:
    Dec 9, 2012
    Posts:
    2
  11. fluxist8070

    fluxist8070

    Joined:
    Sep 6, 2010
    Posts:
    46
    I've had the same problem where the blue bar finishes, but the process never stops and then I hit cancel and Unity crashes. I had the smallest occluder set to 50 and the smallest hole set to 1 and the same thing happened. It takes no time to bake, but it never finishes....
     
  12. Brenden-Frank

    Brenden-Frank

    Joined:
    Aug 5, 2012
    Posts:
    110
    Lights are still randomly culling despite reading that article and playing with any values. I have attached a video, hopefully this can be resolved soon.

     
    Last edited: Dec 10, 2013
  13. Novaesky

    Novaesky

    Joined:
    Nov 4, 2013
    Posts:
    12
    We have the same problem here. We tried deleting the lights, baking, then putting the lights back in, which seems to work, but it's not really a viable solution if you have lights inside prefabs. Hoping for a fix soon.
     
  14. Novaesky

    Novaesky

    Joined:
    Nov 4, 2013
    Posts:
    12
    Did some more testing on this; removing the lights before the occlusion baking, doesn't work, nor does baking, then removing the lights and adding them back.
     
  15. Brenden-Frank

    Brenden-Frank

    Joined:
    Aug 5, 2012
    Posts:
    110
    I also tried this workaround to no avail. We're unfortunately forced to stay on 4.2 unless this is fixed.
     
  16. Brenden-Frank

    Brenden-Frank

    Joined:
    Aug 5, 2012
    Posts:
    110
    Can I get confirmation that this has been seen? It is not on the known issues list so either this thread has not been read or we are doing something wrong.
     
  17. Brenden-Frank

    Brenden-Frank

    Joined:
    Aug 5, 2012
    Posts:
    110
  18. Millipede

    Millipede

    Joined:
    Feb 28, 2013
    Posts:
    23
    how are you guys even using Umbra OC anyway? do you just happen to be creating a game where you can have all of your Unity scenes in one massive master scene in order to bake all OC data?
     
  19. Brenden-Frank

    Brenden-Frank

    Joined:
    Aug 5, 2012
    Posts:
    110
    Our game is divided into levels. Some of them have interior sections where OC is very useful for reducing overdraw. OC bakes just fine on a scene by scene basis.
     
    Last edited: Dec 19, 2013
  20. NLSC-E-MS

    NLSC-E-MS

    Joined:
    Jul 22, 2010
    Posts:
    593
    Do you switch scene completely? How do you handle scene composition?
     
  21. Brenden-Frank

    Brenden-Frank

    Joined:
    Aug 5, 2012
    Posts:
    110
    Yes it is a complete switch via Application.LoadLevel. We have a single persistent object that does basic things such as drawing a load screen and containing level loading logic.

    I don't think that should be relevant, but I'd be happy to answer any further questions. This problem occurs if I work directly in any level, build the OC and play that level straight up from the editor (no level loading). I'm not sure what you mean by scene composition.

    The problem here is that OC is generating false positives when it comes to culling lights. This is a new feature of 4.3 since OC has been entirely rebuilt. The controls on setting up OC are very limited, and I have tried every combination. Only my main camera has occlusion culling checked.
     
  22. DSebJ

    DSebJ

    Joined:
    Mar 30, 2013
    Posts:
    101
    Have you tried moving the spot light a bit more forward, so that the emitter is always just in view of the camera? Do you get the same culling in that setup?
     
  23. Brenden-Frank

    Brenden-Frank

    Joined:
    Aug 5, 2012
    Posts:
    110
    Hi DSebJ, --Yes I have tried that, you'll notice in the video that the point lights on the house are flickering as well.
     
  24. bigzer

    bigzer

    Joined:
    May 31, 2011
    Posts:
    160
    I'm also facing the blinking lights here, tried many different baking combinations but nothing fixed it besides removing the culling data alltogether eh.

    Here's a GIF showing my issue;



    Has anyone already reported the bug?

    *edit*
    Well I just did though I don't have time to make a repro project so right now I only have that GIF attached to the case.
     
    Last edited: Dec 22, 2013
  25. cjow

    cjow

    Joined:
    Feb 29, 2012
    Posts:
    132
    Having exactly the same issues at the minute with lights being culled. Clearing the occlusion data fixes it but obviously that's not an acceptable fix. Using 4.3.2f1.
     
  26. Brenden-Frank

    Brenden-Frank

    Joined:
    Aug 5, 2012
    Posts:
    110
    I would love to hear some sort of official response on this. The issue has been present for a long time now without so much as an acknowledgement.
     
  27. Desktopdaydreams

    Desktopdaydreams

    Joined:
    Nov 20, 2010
    Posts:
    152
    We're having the same issues as you Brenden, would be good to hear the offical stand on this and if they suggest any work arounds/fixes.

    We're currently taken all OC out, luckily we at a point we're we can but thats not going to last much longer as development continues :)
     
  28. bigzer

    bigzer

    Joined:
    May 31, 2011
    Posts:
    160
    Following my bug report I've got a message from Unity asking for a repro project. I haven't had time to prepare it but I hope I can next week.

    Submit a bug report with a project on your end too, the more they get the faster it can get resolved.

    My case is #582516
     
  29. Desktopdaydreams

    Desktopdaydreams

    Joined:
    Nov 20, 2010
    Posts:
    152
    @bigzer sounds like the best approach, I'll have to prepare a project too, rebake the occulsion data and submit.
     
  30. anborn

    anborn

    Joined:
    Nov 15, 2012
    Posts:
    2
    Hi, I sent yesterday a bug report with a scene attached with this OC lighting issue and I got a response from Unity saying that they managed to reproduce the bug and that they are taking a look into it. My case is #584968
     
  31. Desktopdaydreams

    Desktopdaydreams

    Joined:
    Nov 20, 2010
    Posts:
    152
    @anborn awesome! look forward to hearing what they come up with....
     
  32. anborn

    anborn

    Joined:
    Nov 15, 2012
    Posts:
    2
  33. Desktopdaydreams

    Desktopdaydreams

    Joined:
    Nov 20, 2010
    Posts:
    152
    @anborn

    awesome! i wonder if this has made it to 4.3.3 - can't seem to see it in the release notes. Might be in the next release.

    Thanks for the update :)
     
  34. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
  35. mindfarm

    mindfarm

    Joined:
    Mar 25, 2013
    Posts:
    4
    I'm almost sure it's not, but haven't checked since 4.3.1 to be honest. Since it's not listed in the current notes and if they say major release.. maybe 4.4?! Whatever, hopefully pretty soon, it is so annoying though I really appreciate the new culling system. At least it has been recognized. Thanks to anyone who took the time to recreate and report..
     
  36. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,085
    Please try with 4.3.3 i believe it has fixed this issue.
     
  37. AlessioLid

    AlessioLid

    Joined:
    Jul 27, 2013
    Posts:
    1
    We have the same problem with the unity 4.3.3
    Now with or without OC... it's very strange, and we can't find any solution :/

    Someone has the same problem?!
     
  38. gazbushell

    gazbushell

    Joined:
    Feb 5, 2009
    Posts:
    48
    nothing but problems here with occlusion culling
    on 4.3.3. In fact ever since 4.1 seems pretty broken to me. it used to work so well before, i mean really well... and now its terrible.
    Its just unpredictable.
    It ignores all the static marking of occludee and occluder and everything is occluded
    makes sunshine shader go wrong
    I have had to implement a different culling method in my game.
    I fear updating unity these days something always seems to break.
     
  39. bluescrn

    bluescrn

    Joined:
    Feb 25, 2013
    Posts:
    524
    Still wishing we had the old 4.2 PVS system back for our mobile project.

    That gave us at least a small performance boost. The new system can eat a *lot* of CPU time, so it's only likely to be a performance gain if it manages to cull a lot of geometry. But our levels are fairly small, and in some cases turning the new system on can result in a significant overall drop in performance.
     
  40. Deleted User

    Deleted User

    Guest

    I'd highly recommend building your own culling solution. Or get something like InstantOC off the asset store..
     
  41. gazbushell

    gazbushell

    Joined:
    Feb 5, 2009
    Posts:
    48
    problem with instant OC is its too processor intensive with all the ray casting for our uses.

    i have cut out occlusion completely, for now, in favour of another approach to maximise performance... meh
     
  42. Griautis

    Griautis

    AI & Physics STE Unity Technologies

    Joined:
    Jan 26, 2013
    Posts:
    63
    Hello there,

    I'd like to clear up, that the issue has indeed been fixed. However, the fix is not included in 4.3.3. It will be included in the next 4.X release.

    Best wishes,
    Ugnius
    QA Team
     
  43. Brenden-Frank

    Brenden-Frank

    Joined:
    Aug 5, 2012
    Posts:
    110
    Much appreciated on the official response.
     
  44. Desktopdaydreams

    Desktopdaydreams

    Joined:
    Nov 20, 2010
    Posts:
    152
    Awesome, thanks for that, will look forward to 4.4! Time for a coffee then?
     
  45. Brenden-Frank

    Brenden-Frank

    Joined:
    Aug 5, 2012
    Posts:
    110
    Just saw that 4.4 is out, but it appears to only fix 2 issues.

    This one could be undocumented -Anyone seen if the issue is fixed?
    I'll report back when I get a chance to try it out.
     
  46. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,044
    I think that's 4.3.4 that's just released. I'm sure the fix is in 4.4.x ?
     
  47. Brenden-Frank

    Brenden-Frank

    Joined:
    Aug 5, 2012
    Posts:
    110
    Oh, that's right. Thanks for stopping me before I wasted my time!
     
  48. Desktopdaydreams

    Desktopdaydreams

    Joined:
    Nov 20, 2010
    Posts:
    152
    I was just gonna say, i can't find 4.4! Phew! Hopefully wont be too long now...
     
  49. gazbushell

    gazbushell

    Joined:
    Feb 5, 2009
    Posts:
    48
    did I miss something ? are we still waiting on this? it wasn't in 4.3.4 right? or at least thats what I understand

    I'll keep checking
    :)
     
  50. cjow

    cjow

    Joined:
    Feb 29, 2012
    Posts:
    132
    Still waiting for 4.4, yea. When that will be, though, nobody knows.
     
unityunity