Search Unity

My second camera no longer renders properly after applying LW Rendering Pipeline

Discussion in 'General Graphics' started by bakuganvlad, Feb 3, 2019.

  1. bakuganvlad

    bakuganvlad

    Joined:
    Dec 2, 2017
    Posts:
    104
    I am working on an FPS that has a second camera that renders the object you are holding to avoid clipping through other meshes. The camera was set to Depth Only, with a Depth set higher than the regular one, and the Culling Mask set to the layer of the item. Everything was fine until I installed the LWRP. Now, instead of rendering just the item, it also render a solid color, so you can't see that is behind the held item. I have tried adding the LW Additional Camera Data script, but there is nothing in its dropdown and and it doesn't solve anything. How can I fix this?
     
    kustom likes this.
  2. mingwai

    mingwai

    Small Graphics Potato Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    21
    Not sure if I'm simulating your problem correctly, but the second camera works for me in LWRP. See if there's any difference with yours..
     

    Attached Files:

  3. bakuganvlad

    bakuganvlad

    Joined:
    Dec 2, 2017
    Posts:
    104
    upload_2019-2-3_15-29-30.png
    Without the post processing part, we have pretty much the exact same settings, yet in my case, there is a solid color rendered in empty areas

    EDIT: Created a new camera, without any post processing, coped your settings, same result: solid color rendered instead of empty area
     
  4. bakuganvlad

    bakuganvlad

    Joined:
    Dec 2, 2017
    Posts:
    104
    I give up at this point. I have searched everywhere on google, restarted unity 5 times and tried all the possible settings for the camera. I'm pretty sure this is a bug, since Solid Color, Depth Only and Don't Clear all produce the exact same effect.

    UPDATE: I have created a new project and creating a new camera with depth only works fine. I trully don't understand why my in my current project it is not working.
     
    Last edited: Feb 3, 2019
  5. mingwai

    mingwai

    Small Graphics Potato Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    21
    I can reproduce your issue with LWRP version 4.9.0 & 4.8.0. I'll report to LWRP team.
    During the time you might downgrade the LWRP back to 4.6.0 (I've tested this problem doesn't happen in 4.6.0 or below).

    To downgrade, go to top menu > Window > Package Manager > Select Lightweight RP and there you can select a version and then click "Upgrade to".
     
    richardkettlewell likes this.
  6. bakuganvlad

    bakuganvlad

    Joined:
    Dec 2, 2017
    Posts:
    104
    Wow, you posted right when I was typing the same thing. Yeah, just figured out it's a problem with the newer versions. Thanks a lot for the help!
     
    richardkettlewell likes this.
  7. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    6,129
    Isn't it by design? I remember reading that since "depth only" and "don't clear" have potential hidden costs that they are no longer supported and eventually another way will be introduced to be able to something like this.
     
  8. mingwai

    mingwai

    Small Graphics Potato Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    21
    Just confirmed with LWRP team. Yes you are right, and the new approach is coming very soon.
     
  9. LukWol

    LukWol

    Joined:
    Nov 12, 2015
    Posts:
    12
    Hi @mingwai, do you have any insights about upcoming new approach? Do you know when will it become available?
     
  10. Alejandro-Martinez-Chacin

    Alejandro-Martinez-Chacin

    Joined:
    Oct 15, 2013
    Posts:
    38
    For FPS games, a lot of the times a two camera setup is used, one for the gun and 'FPS' elements and another for the rest.
    Any news on this front? I can't seem to make a camera just pass through and render on top of whatever another camera rendered.
    In fact, I can't even put UI on top with an "UI Camera", only Screen Space - Overlay is the one that seems to work, is there a work-around?
     
    LukWol likes this.
  11. Ghosthowl

    Ghosthowl

    Joined:
    Feb 2, 2014
    Posts:
    178
    I'm interested in this as well. I am having the same issue with the HDRP.
     
  12. Albarnie

    Albarnie

    Joined:
    Oct 24, 2015
    Posts:
    6
    Would love to be updated when the new method becomes available. I need this for my 2d project.
     
  13. EdBoon

    EdBoon

    Joined:
    Nov 24, 2014
    Posts:
    114
    @mingwai Any update on a method to achieve this? I've read on a few posts that a new method is being looked into. Thanks!
     
  14. mingwai

    mingwai

    Small Graphics Potato Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    21
    Hi guys, the new camera stacking system is under active development right now, it's definitely coming but cannot guarantee when..
     
    Matt-Cranktrain likes this.
  15. Matt-Cranktrain

    Matt-Cranktrain

    Joined:
    Sep 10, 2013
    Posts:
    31
    Thanks @mingwai, that's great to hear! I imagine there are lots of people like me just quietly waiting for more updates to Universal, like camera stacking, like multiple directional lights, etc
     
  16. kustom

    kustom

    Joined:
    May 11, 2012
    Posts:
    91
    meanwhile just downgrading to 4.6 seems ok to fix, hope to see it working soon :)