Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Glitching with multiple cameras LWRP

Discussion in 'Graphics Experimental Previews' started by RecursiveRuby, Dec 4, 2018.

  1. Flindt

    Flindt

    Joined:
    Dec 28, 2016
    Posts:
    78
    So just to make sure that i understand the "outcome" of this thread - if I have an World space canvas - in the LWRP - in 2019.2 - there is no nice/clean way for that to be hold out of the Post processing - so it is not affected by the depth of field etc?
     
  2. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,554
    So we end up with two camera's stacked if you wanted post processing not messing up the UI right?
     
  3. shiena

    shiena

    Joined:
    May 19, 2017
    Posts:
    44

    Attached Files:

    cxode, Taurdenga, Dla_ha and 3 others like this.
  4. cxode

    cxode

    Joined:
    Jun 7, 2017
    Posts:
    269
    I am unable to get this to work. The UI shows up when the event is set to "Before Rendering Post Processing", but it has post processing applied to it. The UI is invisible when the event is set to "After Rendering Post Processing"

    I'm using post-processing v2, does that affect things?
     
  5. cxode

    cxode

    Joined:
    Jun 7, 2017
    Posts:
    269
    After further testing, it looks like this is unfortunately not compatible with post-processing v2 :(
     
  6. kenvink

    kenvink

    Joined:
    Sep 13, 2017
    Posts:
    15
    For VR, Adding/removing camera overlay to OVRCamera's center eye camera breaks the OVRCamera.
    Tracking still work well, I can see the visual of the transform in editor got updated but the frustum of the camera did not get updated. Any code that need to use frustum to check for visibility would failed.
    The repro step is simple, just open trivial example in Oculus\VR and add an overlay camera, then disable the overlay camera or add/remove the overlay camera. The main camera's frustum will not be updated.
    Bug report: http://fogbugz.unity3d.com/default.asp?1226135_e8u9h8us8pev23hn
     
  7. elhongo

    elhongo

    Joined:
    Aug 13, 2015
    Posts:
    48
    Hi, seeing this thread has the most of the activity for URP and Camera Stacking issues...

    I am using Unity 2019.3.5f1 + URP 7.2.0 + ARFoundation 3.0.0 for an AR project on Android/iOS
    I am using PostProcessing for some 3D objects, and I want the postprocessing not affecting the camera feed from ARFoundation. How would I accomplish that?
    Suggestions here didn't resulted to me: https://forum.unity.com/threads/urp...essing-exclude-the-arcamerabackground.811254/

    Thanks!
    Pablo
     
    Last edited: Apr 8, 2020
  8. Korolev

    Korolev

    Joined:
    Sep 20, 2012
    Posts:
    22
    Hello.
    Can you tell me how to use RenderTexture with LWRP?
    I'm using Canvas render mode is set to screen space overlay.
    And I use the second camera to render a 3D character in render texture.
    I use RenderTexture in canvas.
    As a result, everything works well in the editor, but on mobile devices it works like this:

    unity 2019.2.17
     
  9. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    982
    I'd use RawImage to display a RenderTexture to a canvas, not an Image without a sprite attached. We use that setup quite heavily and it works fine.
     
  10. Korolev

    Korolev

    Joined:
    Sep 20, 2012
    Posts:
    22
    I tried rawImage, the result is the same. Can you send screenshots of the renderTexture and rawImage settings?
     
  11. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    982
    Odd. Literally none, settings-wise.

    upload_2020-4-28_14-58-19.png

    We do have a script that assigns the assigns the RT and does some stuff that is bespoke to our use, such as setting the RT size to be the size of the RectTransform and the camera's pixelRect to the be rect of the RectTransform. I cannot share that, as it is property of my employer and quite specific to our use case, but it is exactly as simple as it sounds.
     
  12. Meepo0

    Meepo0

    Joined:
    Nov 24, 2017
    Posts:
    31
    When is camera stacking coming for URP 2D renderer!?
     
  13. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    It's been supported since URP 7.4.0 (so just use 7.4.1).
    I don't think there's yet 8.x release that includes this but it will be included on all future URP versions.
     
  14. temresen

    temresen

    Joined:
    Jul 9, 2018
    Posts:
    29
    Having exactly the same issue on 2019.2.21. Did you found a solution to that?
     
  15. Franckitou

    Franckitou

    Joined:
    Jun 3, 2015
    Posts:
    16
    This does not work in unity 2019.4.8 LWRP 7.5.1 with 3D objects or particles system
     
    shibi2017 likes this.
  16. MadboyJames

    MadboyJames

    Joined:
    Oct 28, 2017
    Posts:
    262
    I recently ran into this issue as I was figuring out lighting in my project. I found this https://docs.unity3d.com/Packages/c...nes.universal@7.2/manual/camera-stacking.html which mentions that it is not yet supported in 2D as of URP 7.2.1. I am using UPR 8.2.0 and following the docs worked with 2D! which is a relief because I do not want to refactor Corgi-Engine UI and MoreMountains PlayerFeedbacks any more than I have to.
     
  17. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,493
    I just switched to URP, now depth only option in camera disappears, so I can't use UI elements showing on top of other 3d models?

    Are there no way of this? Then how to show UI?
     
    HuldaGnodima and marcin_unity326 like this.
  18. HuldaGnodima

    HuldaGnodima

    Joined:
    Oct 10, 2016
    Posts:
    110
    I just encountered this problem now. Has anyone found a way to solve it?
     
  19. Garrettec

    Garrettec

    Joined:
    Nov 26, 2012
    Posts:
    98
    Camera stacking should address this now.
     
  20. HuldaGnodima

    HuldaGnodima

    Joined:
    Oct 10, 2016
    Posts:
    110
    Thank you! Yes with the updated version it worked, my bad!
    I couldn't find the depth-option, but you can just reorder overlayed cameras in the Stack in the Editor (on the base-camera), to get them to render in the order you want.
    Thank you :)
     
  21. faysalfdt

    faysalfdt

    Joined:
    Jul 11, 2023
    Posts:
    5
    I'm trying to do the same, is there a straight forward way to do this?