Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Camera ignores the "Culling Mask" settings

Discussion in '2017.3 Beta' started by Rouf, Oct 9, 2017.

  1. Rouf

    Rouf

    Joined:
    Sep 15, 2009
    Posts:
    13
    Main Camera ignores the Culling Mask settings - If the checkbox "Dynamic Occluded" (on the GameObject material) is disabled.

    How to reproduce -
    1. Create a new scene
    2. Point Camera at the Cube
    3. Check off "Dynamic Occluded" on the Cube material
    4. Set any Layer on the Cube
    5. Exclude this Layer in the camera Culling Mask

    And you will see that the Cube is still rendering by the Camera
     
    martinasenovdev and SAM-tak like this.
  2. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,589
    If you think you found a bug in Unity, I recommend to submit a bug-report following the advice in this document.

    Using the bug-reporter seems to be an important step, because it makes sure the report is in Unity Technologies bug-tracking pipeline and has to be processed at some point. Using the forum is often used to add to a little more attention to a bug-report, but does not replace submitting the bug-report.

    It's from advantage to attach a project to the bug-report that UT can use to reproduce the issue and test their fix against. The easier an issue can be reproduced by QA, the more likely it is to get forwarded to a developer, who might or might not work on a bug-fix for that at some point.

    After you submitted the bug-report, you receive a confirmation email with a Case number. UT often asks us to post the Case number in the forum thread, which allows them to find that bug-report if they look at your post.

    Following these steps will increase the chance that UT is looking at your issue tremendously.
     
  3. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,132
    Hi Rouf,
    Thanks for reporting this issue! This has been fixed internally and will hopefuly make it into b5.
     
    SAM-tak and charlesb_rm like this.
  4. greg-harding

    greg-harding

    Joined:
    Apr 11, 2013
    Posts:
    523
    @LeonhardP I've just hit this issue in 2017.2.0f3 as well. Cameras completely ignore the layers/culling masks when the 'dynamic occluded' flag is set. Unfortunately, with 'dynamic occluded' enabled (which it seems to be by default) our normal rendering is having things get culled/disappear without any reason which is why I toggled the setting in the first place. Basically, multiple cameras being composited with different layers is broken. Is your fix being ported back to 2017.2.x?
     
    Last edited: Oct 19, 2017
  5. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,132
    Hi Greg,
    Yes, unfortunately 2017.2 was affected as well. The fix will probably make it into the second patch release for 2017.2.
     
  6. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Is this issue in Unity 5.6?
     
  7. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,132
    No, this bug was introduced in 2017.2.
     
  8. greg-harding

    greg-harding

    Joined:
    Apr 11, 2013
    Posts:
    523
    Thanks for the update. I searched the issue tracker but couldn't immediately find any reference to it. Unfortunately 2017.1.x and 2017.2.0 have had quite a few bugs for us which has made for a frustrating last six months. A couple of big ones and quite a few small ones adding up to a bit of pain and waiting for a patch or next release to fix things again.
     
  9. hungrybelome

    hungrybelome

    Joined:
    Dec 31, 2014
    Posts:
    336
    Just ran into this confusing bug and setting "Dynamic Occluded" did indeed fix it. Thanks!
     
  10. martinasenovdev

    martinasenovdev

    Joined:
    May 7, 2017
    Posts:
    67
    guys this problem makes our game render 60k triangles every frame no matter there are just 30k total. 3 cameras and they're for whatever reason ignoring the layers set. Please fix asap
     
  11. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,132
    Sounds like a different issue. Could you please file a bug report with a reproduction case?
     
  12. martinasenovdev

    martinasenovdev

    Joined:
    May 7, 2017
    Posts:
    67
    I already switched to the latest beta, 2017.3.f011 and it is not present there. Thanks
     
    charlesb_rm likes this.