Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Feature Request Post Processing with multiple cameras is currently very problematic

Discussion in 'Universal Render Pipeline' started by dev_34Disorder, Dec 26, 2020.

  1. sambahadori

    sambahadori

    Joined:
    May 3, 2018
    Posts:
    1
  2. cmdexecutor

    cmdexecutor

    Joined:
    Sep 30, 2014
    Posts:
    14
    I was just playing around with the most trivial approach: rendering a weapon with overlay camera to prevent wall clipping, the weapon looks like it exists in the separate universe as it has to stay without any postprocessing because of the issue
    Let's say we use a water volume, when you dive in the underwater effects are having to not be applied for the weapon camera
     
  3. eyalfx

    eyalfx

    Joined:
    Oct 8, 2010
    Posts:
    105
  4. cmdexecutor

    cmdexecutor

    Joined:
    Sep 30, 2014
    Posts:
    14
    For my simple case I've found a lazy workaround with 3 cameras:
    1. main cam, no post processing at all, renders all except weapon & UI layer
    2. weapon cam, applies post processing, renders only weapon layer
    3. UI cam, no post processing, UI layer
    that way UI camera still can't do postprocessing because it will be applied for all the underlying cameras but at least it won't multiply the effects for the main camera
     
  5. 1000Nettles

    1000Nettles

    Joined:
    Aug 25, 2013
    Posts:
    2
  6. dnomn8r

    dnomn8r

    Joined:
    Nov 15, 2012
    Posts:
    11
    I did get postprocessing working with multiple compositional cameras using semething similar to this.

    https://github.com/sugi-cho/Unity-URP-PostProcessing-With-Alpha

    The code there is for an older version of Unity, and you need to change the texture names it uses. But it IS possible to get it to work. Why it doesn't work out of the box? No idea.
     
  7. termway

    termway

    Joined:
    Jul 5, 2012
    Posts:
    11
  8. PercyParache-I3

    PercyParache-I3

    Joined:
    Sep 8, 2022
    Posts:
    1
  9. hurleybird

    hurleybird

    Joined:
    Mar 4, 2013
    Posts:
    115
  10. Veuch

    Veuch

    Joined:
    Feb 4, 2020
    Posts:
    1
  11. MrLW

    MrLW

    Joined:
    Jun 4, 2013
    Posts:
    1
  12. RuslanVI

    RuslanVI

    Joined:
    Oct 18, 2019
    Posts:
    3
  13. creativecookie9

    creativecookie9

    Joined:
    Jan 22, 2014
    Posts:
    1
    I'm honestly shocked such an essential feature as different post processing for different cameras for URP still hasn't been solved after all these years. This is so frustrating with barely any communication from Unity other than they're looking into it. Is a solution coming soon or are we going to have to wait 3 more years? Please update us Unity!
     
  14. SertanC

    SertanC

    Joined:
    May 8, 2020
    Posts:
    1
    The first time I encountered the problem, I used Google to find a solution.
    I was first reassured to find a thread that had reported this problem almost 2 years ago. I jumped to the last page of the thread and was shocked to find it still not working..

    .. +1
     
  15. altugs

    altugs

    Joined:
    Jan 14, 2017
    Posts:
    17
  16. cficara

    cficara

    Joined:
    Sep 27, 2017
    Posts:
    31
  17. DrydenMeints

    DrydenMeints

    Joined:
    Sep 26, 2021
    Posts:
    3
  18. Raffin

    Raffin

    Joined:
    Aug 11, 2015
    Posts:
    2
  19. frotagonist

    frotagonist

    Joined:
    May 15, 2020
    Posts:
    3
    Has this been fixed yet? Anyone found a solution?

    Edit - In my case I found the solution was to only apply post processing to the overlay camera. This prevents it from double stacking the post processing.
     
    Last edited: Dec 30, 2022
  20. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    1,019
    +1
     
    Last edited: Jan 6, 2023
  21. Pedrooou

    Pedrooou

    Joined:
    Mar 7, 2022
    Posts:
    1
    Hi! I was having trouble with this too, and found a way to solve this :)
    First of all, set up 2 cameras, one with the (in this example) map, and another one with the character hand or gun (still in the example.)
    upload_2023-1-6_14-40-44.png
    in the right, i put the main camera, with the default layer;
    in the left, i put the character gun/hand camera, in the same position of the main one and as child of it.

    As you can see, the guns camera have the priority of 0 (zero), and the main camera have the priority of -1, this is
    important for the guns camera appear over the main one on the game view.

    upload_2023-1-6_14-43-12.png
    Now, in the Environment settings, set the main camera to whatever you're using (skybox, etc) and set the "guns" camera to uninitialized.

    note: the twos cameras are in base rendering mode upload_2023-1-6_14-45-3.png

    And that's all!
    This worked really well for me in my fps game, i hope this works for you too :)
     
  22. dedemonn

    dedemonn

    Joined:
    Oct 6, 2020
    Posts:
    5
    +1

    Can't believe I won't be able to have bloom effect on my UI camera. :(
     
  23. eterlan

    eterlan

    Joined:
    Sep 29, 2018
    Posts:
    146
    I guess for any serious use case when you lack of acknowledge about computer graphics, URP it's simply unusable.
    Unity is great for tutorial or small project to show-off or to find a job, which is what official do all days, not making serious game but advertise and prosperous in economy. It's not even suitable for prototype because lack of hot-reload or script language support unlike other engines.
    Every new package they release recently is broken toy.
    So disappointed to realize this after many years.
     
    dev_34Disorder and RoyBarina like this.
  24. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    1,019
    I rather think it's the opposite. Any team large enough to have a graphics engineer can work around these issues. Multiple people with the required skills already have demonstrated various workarounds for the many URP issues.

    I see it as Unity moving past their indie roots, their new tooling is increasingly aimed at large studio workflows and it's likely why these issues go unaddressed for years because it's not a problem for the studios that make Unity the most money.
     
  25. AlundraFlint

    AlundraFlint

    Joined:
    May 3, 2016
    Posts:
    6
    +1
    It would've worked with camera stacking if you could choose a custom renderer for your overlay camera
     
  26. F4bs

    F4bs

    Joined:
    Apr 23, 2019
    Posts:
    15
    i dont think they give a S*** enough honestly. would have been long done by now
     
  27. guitarguruu

    guitarguruu

    Joined:
    Jun 6, 2020
    Posts:
    6
    How is this still an issue?
     
  28. Hanh-DungSBE

    Hanh-DungSBE

    Joined:
    Oct 18, 2022
    Posts:
    1
  29. skylinx

    skylinx

    Joined:
    Nov 1, 2012
    Posts:
    3
    Hey is this still not possible? All I want is Bloom to apply on my UI but Color Grading and Depth of Field not to.
    Why is it so difficult to do this in URP?
     
    Claytonious likes this.
  30. d0dler

    d0dler

    Joined:
    Mar 31, 2020
    Posts:
    1
    +1
    We REALY need this feature. It's a shame that it is still not implemented.

    My use case:
    I'm developing a 2D Side-Scroller game and I wanted to blur the background with the depth of field Post Processing effect. The problem is that I have another Layer even further in the background for the Sun and Clouds which is also affected by the Post Processing effect.
    Sun and Clouds are captured by the base camera.
    The background (some mountains) is captered by an overlay camera with the wanted Post Processing effect.
    The foreground where the player walks on is captured by a second overlay camera.
    The Post Processing effect of the first overlay camera is also affecting the base camera, which should not happen.
     
  31. doseon

    doseon

    Joined:
    Mar 17, 2021
    Posts:
    22
  32. musicdeveloper

    musicdeveloper

    Joined:
    Oct 16, 2019
    Posts:
    65