Search Unity

Occlusion Culling not working on Gear VR build

Discussion in 'AR/VR (XR) Discussion' started by scottb9239, Mar 31, 2015.

  1. scottb9239

    scottb9239

    Joined:
    Jan 5, 2013
    Posts:
    107
    Hi all, I am a Unity Pro/Android Pro user (using 4.6.3f1) and have been using occlusion culling successfully on several PC projects. Recently I have been working on two Gear VR projects using the OVRCameraRig (with Occlusion Culling enabled on both cameras) and have noticed that Occlusion Culling does not seem to work on the actual Gear VR build itself but does work in the editor.

    I noticed this on one project as the draw calls did not drop after baking and that far away objects would not disappear between the small gaps in close objects (intentional test) that I was seeing in the editor, which worked as expected.

    On the newer project I made a large cube with an invisible shader assigned to it and set to Occluder Static and baked the scene. In the editor the far objects do not draw behind where the invisible cube is as if the cube was there, exactly what I wanted. In Gear VR the draw calls did not drop (are 5x what is showing the editor) and the far objects behind the cube still all show.

    Anyone else having issues with Occlusion Culling on Gear VR builds?

    Many thanks,
    Scott
     
  2. JDMulti

    JDMulti

    Joined:
    Jan 4, 2012
    Posts:
    384
    Haven't tested it, but if you're right, this is some serious issue I think. Do you have a test project available for download?
     
  3. scottb9239

    scottb9239

    Joined:
    Jan 5, 2013
    Posts:
    107
    Hi, I sent the project to Unity for testing, so hope to hear back soon.
     
  4. stan4u

    stan4u

    Joined:
    Dec 20, 2012
    Posts:
    19
    Hi, have you got any progress on this? do you know if it's fixed in 4.6.4? we are having same issues on gear and note in 4.6.3
     
  5. scottb9239

    scottb9239

    Joined:
    Jan 5, 2013
    Posts:
    107
    I tested it with 4.6.4 and the new SDK 0.5.0 but it wasn't fixed.

    I have contacted Oculus support (as well as submitting a bug with Unity) and I sent them a test scene to show the issue. They are currently looking into it and I also got an email from one of the heads of the Oculus support department assuring me that this and many other bugs will be fixed in an upcoming update soon.

    My feeling is that this will be fixed (hopefully) in the coming weeks.
     
    Todd-Wasson likes this.
  6. stan4u

    stan4u

    Joined:
    Dec 20, 2012
    Posts:
    19
    Actually we upgraded meantime to Oculus mobile SDK 0.5.0 , still on 4.6.3 unity and it seems to be working now. we are getting pretty much the same geometry rendered in editor and mobile now.
     
  7. scottb9239

    scottb9239

    Joined:
    Jan 5, 2013
    Posts:
    107
    I've tried my game on Unity 5.1.1 and with the 0.6.0.1 Oculus plugin and occlusion culling STILL does not work on Gear VR. I have a simple test scene with a large cube in the middle of the room and smaller cubes around it. I bake the occlusion, test it in the editor (which works fine), set the large middle cube to use a transparent shader, test it again (still culls the smaller cubes behind it, but now you can see them cull as the large cube is transparent. Then run it on the Gear VR and it does not cull at all!

    The bug I submitted back in April is still not closed (I also submitted this with Oculus too), can't believe it's taking them this long to fix this glaring issue, the performance would be SO greatly enhanced if this was fixed!

    Frustrated
     
  8. williamj

    williamj

    Unity Technologies

    Joined:
    May 26, 2015
    Posts:
    94
    Hi @scottb9239,

    I am looking into your bug report now. Once I get it reproduced, I will pass it onto the dev team. Then they will provide a timeline for fixing the issue. Thanks for your patience, and I apologize we haven't jumped on this sooner.

    -Will
     
    Last edited: Jun 30, 2015
    vicator and scottb9239 like this.
  9. scottb9239

    scottb9239

    Joined:
    Jan 5, 2013
    Posts:
    107
    Thank you Will, super appreciate it! :)

    Scott
     
  10. dustinwish

    dustinwish

    Joined:
    Jul 16, 2015
    Posts:
    1
    Any updates on this issue? I had a student ask about this issue before the patch p4?
     
  11. williamj

    williamj

    Unity Technologies

    Joined:
    May 26, 2015
    Posts:
    94
    Culling should work with integrated VR on P4; however, GearVR/android are experiencing some performance drawbacks that are making culling (and other functionalities) ineffective. The team is working hard to address these performance drawbacks for the next update.

    -Will
     
    vicator likes this.
  12. scottb9239

    scottb9239

    Joined:
    Jan 5, 2013
    Posts:
    107
    Thanks for the update Will, appreciate it. Can't wait to see my game running at full steam with the performance updates coming down the pipe. Have been seeing everything from 0.5ms to 20ms just for the culling calculations (with optimal settings)! :)
     
    Last edited: Jul 16, 2015
  13. scottb9239

    scottb9239

    Joined:
    Jan 5, 2013
    Posts:
    107
    Hi Will, any update on the fix for the occlusion culling performance issue on Gear VR?

    Thanks,
    Scott
     
  14. williamj

    williamj

    Unity Technologies

    Joined:
    May 26, 2015
    Posts:
    94
    @scottb9239, the devs have found the cause of the problem but do not have a definite timeline on the fix. That might not sound so good but I know that this is a priority for us right now. I will let you know when I get an estimate on the timeline for these fixes.

    -Will
     
    scottb9239 likes this.
  15. scottb9239

    scottb9239

    Joined:
    Jan 5, 2013
    Posts:
    107
    Thanks Will, appreciate it. :)
     
  16. vicator

    vicator

    Joined:
    Oct 12, 2014
    Posts:
    30
    Will thanks for reporting it to them. Recently the problem with 4.6.7f gave me audio problems (playing too fast) why I was forced to upgrade to Unity 5. Now I'm getting rendering performance issues with the mobile shaders again (as before the VR Jam). Annoying to say the least to upgrade and get worse performance.
     
  17. mpgholden

    mpgholden

    Joined:
    Aug 21, 2014
    Posts:
    38
    We're encountering this issue as well - it's the only thing preventing us from shipping, so waiting eagerly for the fix. :)
     
    vicator and scottb9239 like this.
  18. scottb9239

    scottb9239

    Joined:
    Jan 5, 2013
    Posts:
    107
    Same here, have a project on hold because of this, it's a room based game that really requires culling to keep it to per room performance for the most part, with the occlusion culling performance as it is the frame rate is really bad in a lot of areas.
     
    Last edited: Aug 6, 2015
  19. vicator

    vicator

    Joined:
    Oct 12, 2014
    Posts:
    30
    Any progress?
     
  20. scottb9239

    scottb9239

    Joined:
    Jan 5, 2013
    Posts:
    107
    Hi vicator, the occlusion culling works on the latest Unity with native VR, but it is very slow, almost unusable, as in it doesn't save much draw time because the calculation is slow. They are looking into it.
     
  21. scottb9239

    scottb9239

    Joined:
    Jan 5, 2013
    Posts:
    107
    UPDATE: I just tried 5.1.3P1 and the occlusion culling seems a bit faster now, give it a try. :)
     
    Last edited: Aug 30, 2015
    olavrv likes this.
  22. vicator

    vicator

    Joined:
    Oct 12, 2014
    Posts:
    30
    Great reply. Do you know if the updated calculation is only for the native vr?
     
    scottb9239 likes this.
  23. scottb9239

    scottb9239

    Joined:
    Jan 5, 2013
    Posts:
    107
    I'm not sure sorry, I moved over to the native VR some time ago (sorry for the late reply).
     
  24. barcode802

    barcode802

    Joined:
    Apr 6, 2014
    Posts:
    36
    Does anyone know if this is still an issue? We are finding with 5.2.1 and Gear VR on S6 that turning occlusion culling on doesn't appear to make any difference for frame rate.
     
  25. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Try 5.3.2 patch 2, under patch releases.
     
  26. scottb9239

    scottb9239

    Joined:
    Jan 5, 2013
    Posts:
    107
    Occlusion Culling has been working well for a while now, since 5.1.3P1 (as mentioned above) and maybe a bit faster since then too. :)