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.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Feature Request Post Processing with multiple cameras is currently very problematic

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

  1. nirufekriarnold

    nirufekriarnold

    Joined:
    Apr 23, 2015
    Posts:
    1
    Would love to get updates on this as well, at present world space elements that pass in front of UI (which is the majority of our game setup) cannot take post processing
     
  2. webik150

    webik150

    Joined:
    Mar 23, 2013
    Posts:
    53
    It's great this has received some attention. +1
     
  3. MMeyers23

    MMeyers23

    Joined:
    Dec 29, 2019
    Posts:
    97
  4. Riffar

    Riffar

    Joined:
    Jan 17, 2022
    Posts:
    2
    +11111
     
  5. nikescar

    nikescar

    Joined:
    Nov 16, 2011
    Posts:
    157
    +1

    3 years in and the problem is just now on the radar
     
  6. JerryKies

    JerryKies

    Joined:
    Apr 1, 2019
    Posts:
    2
  7. rengel

    rengel

    Joined:
    Mar 30, 2015
    Posts:
    2
  8. morebj1000

    morebj1000

    Joined:
    Feb 25, 2020
    Posts:
    3
    +1
    please fix this ;-;
     
  9. morebj1000

    morebj1000

    Joined:
    Feb 25, 2020
    Posts:
    3
    I fixed this by using the camera stacking and volume masking on the cameras.
     
  10. eoson00

    eoson00

    Joined:
    Jul 16, 2020
    Posts:
    1
    Could you elaborate more specifically on this please?
     
  11. morebj1000

    morebj1000

    Joined:
    Feb 25, 2020
    Posts:
    3
    For camera one, I set it the render type to overlay
    For camera two , which is what I have as my background (camera one focuses and culls something while I have the second camera have the depth of field aspect)
    I have it's render type at base and then at the very bottom there's a foldout labeled "Stack" and I add camera 1 to it,
    Both cameras are set to output render textures and they layer anything that isn't culled transparent, and it looks great! I'm able to use the "Environment" Foldout I use the volume mask to give each one different volume visuals with post processing.
    If you need a more in depth explanation I'll do my best. I hope I haven't misunderstood the purpose of what this thread was trying to achieve so if I was wrong sorry in advance.
     
    xiaofan1228 likes this.
  12. Lepisto3D

    Lepisto3D

    Joined:
    Oct 6, 2019
    Posts:
    25
    Really need this too. How is it not something done yet?
     
  13. NotaNaN

    NotaNaN

    Joined:
    Dec 14, 2018
    Posts:
    313
    Hey, @ali_mohebali.
    How are things going?
    Is there any news you can share with us?
     
  14. EstebanVernet

    EstebanVernet

    Joined:
    Sep 12, 2020
    Posts:
    7
  15. vignitres

    vignitres

    Joined:
    Jan 26, 2021
    Posts:
    1
    Still nothing?
     
  16. tonytopper

    tonytopper

    Joined:
    Jun 25, 2018
    Posts:
    118
    +1

    Wish I could use PP for some blurring effects. Guess I'll be writing a bunch of blur shaders instead.
     
    Last edited: Apr 28, 2022
  17. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,426
    After years, totally disappointed that this is still going on... It is just beyond my understanding that such important stuff gets handled so late and so... painfully.

    Let's say you have situation where you used some post processing to set some mood by using color grading. And then you want to display say a particle effect that wants some bloom effects on it. You will get both on the fx and everything else... so then you get double of everything!

    It does not matter if you use layer masking, because as soon as you make the Renderer Data to use post processing, it will just use the same one again. The global volume (or any other volume) does not seem to make use of layers.

    This is just rendering 101 in my opinion. And if URP claims to be replacement for legacy renderer, it needs to do far better job than this ( years of ). Ironic thing is that more URP try to be better, it just feels like it is going back to legacy to be honest, ( or just trying to match up ) After years and years, not sure if the time spent on URP, HDRP was really worth it, or at least was efficient at trying to be.
     
    elias_t and Noisecrime like this.
  18. RU_YE

    RU_YE

    Joined:
    Jul 22, 2020
    Posts:
    2
    A year ago, I encountered this problem and searched for a solution to no avail, and as a result, it has not been solved until now.We need the following features:
    1. Individual Overlay Camera PostProcessing
    2. Keep Alpha while Post Processing
     
  19. waferltd

    waferltd

    Joined:
    Mar 26, 2018
    Posts:
    1
  20. suraim1013

    suraim1013

    Joined:
    Apr 26, 2021
    Posts:
    7
  21. avoxrotex

    avoxrotex

    Joined:
    Jun 2, 2021
    Posts:
    1
  22. AndrewCzarnietzki

    AndrewCzarnietzki

    Joined:
    Jul 23, 2013
    Posts:
    178
    +1

    The overlay camera system is really powerful, but having an overlay camera's post process render over the base camera's image really limits what you can do with this...
     
  23. 4s4

    4s4

    Joined:
    May 15, 2012
    Posts:
    73
    Just stumbled on this issue or missing feature myself as i wanted to add some blur to foreground objects only to emulate some depth of field... Any progress on this on the Unity side?
     
  24. Antoniusaft

    Antoniusaft

    Joined:
    Feb 28, 2013
    Posts:
    10
  25. tartaros

    tartaros

    Joined:
    Dec 9, 2013
    Posts:
    2
    +1 For URP individual camera post processing.
     
  26. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    706
  27. rochmich

    rochmich

    Joined:
    Jul 29, 2017
    Posts:
    1
    Hello! We've been using the setup for a while in Unity 2020.3.14f1 to make sure post processing is not applied on UI elements, but now we tried to upgrade to 2021 LTS and it stopped working. It seems like even though the post processing is turned off on these cameras, the post processing effects are applied either way.

    We tried to use the volume masks as you would in a 3D pipeline, but it only worked for selected effects (we assume for those that are supported in 2D). Does anyone know what happened that this is no longer working?

    We found a new workaround by defining a separate 2D renderer which has post processing disabled, and have those cameras use the different renderer. This is slightly less performant I assume since the rendering calls are now separated but it seems to work.

     
    nicmarxp likes this.
  28. nicmarxp

    nicmarxp

    Joined:
    Dec 3, 2017
    Posts:
    399
    Wow, very interesting. We have the exact same versions and problems. I will try to use a separate 2d renderer. Did you check performance/frame rates after changing to this setup or does it feel slower in any way?
     
  29. nicmarxp

    nicmarxp

    Joined:
    Dec 3, 2017
    Posts:
    399
    Here's a demo of the issue in Unity 2021.3.3. It didn't add post processing to the overlay cameras in 2020.3.14.
    It's also crazy how it multiplies the post processing by the amount of cameras.
    The post processing button doesn't do anything to cameras of Render Type: Overlay.



    However, the trick from rochmich with a separate 2d renderer seems to have worked and I couldn't see any performance degradation just by looking at that stats window. 2021 gives a lot of boost to our project anyways.

    If you're confused how to do it, find your UniversalRenderPipelineAsset (Project settings > Graphics) and then click the + button to add a new 2d renderer. Duplicate your first, and disable post processing.
     
  30. Twixcard

    Twixcard

    Joined:
    Jan 30, 2021
    Posts:
    4
    Trying to add post processing to my main camera (game view) and ui effect camera (ui particles), but enabling post processing on multiple cameras in a stack multiplied the post processing.

    Keeping post processing on in only one of the cameras inside the stack (the overlay camera) fixed the issue, but my UI is also getting post processed (very noticeable bloom).

    If post processing is not ticked I would very much like that post processing is not applied on the overlay camera OR allow us to create individual post processing per overlay camera.

    EDIT: Not only can you not exclude post processing from a specific overlay camera, you also cannot exclude anti aliasing which completely destroys my font on build.
     
    Last edited: Jul 8, 2022
  31. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,426
    I wonder if this is even being considered in Unity at the moment...
     
  32. Wolvman92

    Wolvman92

    Joined:
    Oct 31, 2021
    Posts:
    6
    +1
     
    Last edited: Jul 25, 2022
  33. MrDizzle26

    MrDizzle26

    Joined:
    Feb 8, 2015
    Posts:
    23
  34. VitruvianStickFigure

    VitruvianStickFigure

    Joined:
    Jun 28, 2017
    Posts:
    25
    Yeah... +1. This basically disables an overlay I've been looking to implement with post proc, on account of creating an infinite feedback loop in the color. This is a serious issue.
     
  35. ali_mohebali

    ali_mohebali

    Unity Technologies

    Joined:
    Apr 8, 2020
    Posts:
    97
    Hi everyone,

    I just wanted to confirm again that this request has been on our radar; it has been on our backlog to investigate and address. We understand the use cases, the complexity of solving this through a custom solution on the user side and the fact that it's impossible without URP source code modification in specific cases. e.g. when a separate post-processing configuration is needed on the overlay camera since our built-in post-processing shaders kill alpha.

    We are now starting an investigation to figure out and design an optimal solution, and we will engage in this thread if we have questions for you or require further feedback.

    We understand that this thread and the relevant feedback have been active for quite a while now. We have been focusing on higher priority items addressing a higher number of users' feedback and requests. At the same time, while this might look quick and easy to solve for a very particular use case, we can't provide patchy solutions that only work for specific circumstances. That's not what the users want. We also need to make sure providing this option doesn't break, incur performance cost or add workflow complexity for other user projects that don't really have a use for it. So while not all our user requests can be addressed simultaneously, I can assure you we keep track of all incoming feedback and make sure valid requests are in queue to be addressed. Based on priority and in due time. And we do appreciate your patience :).
     
    Kirsche, Barliesque, LuxUnity and 5 others like this.
  36. drallcom3

    drallcom3

    Joined:
    Feb 12, 2017
    Posts:
    140
    I'd really love to apply bloom to the fireball object in my game, but not to any other objects. Currently it's not possible due to the way URP post processing and camera stacking works.
     
  37. william_feilangyue

    william_feilangyue

    Joined:
    Nov 2, 2021
    Posts:
    7
    Last edited: Aug 8, 2022
  38. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    706
    It would be awesome to be able to use the output of a second camera in black and white as a mask to apply to the post effects, so you can have fine control over where the effects are applyed.
     
  39. RabberDakk

    RabberDakk

    Joined:
    Feb 23, 2019
    Posts:
    1
    Camera Stacking cannot apply a separate PP for each camera.
    Please do not lie in official videos...

     
  40. Jakermake

    Jakermake

    Joined:
    Nov 10, 2021
    Posts:
    6

    I'm having the exact same issue. Updated from 2020.3.25 to 2021.3.8 and now the postprocessing toggle in the camera component is bugged. If you enable it in any of the cameras (doesn't matter if it is the main cam or the overlay ones), it applies pp to all of them. Layers and culling masks doesn´t matter anymore.

    @ali_mohebali is the team aware of this bug? I don't know if I should report this somewhere else

    And I'm using only two cameras, one nopost (UI), and the maincam with pp. I gave up on any fancy pp long ago seeing the nightmare it was.

    PD: Thanks @rochmich, the workaround of using two different renderer assets "fixes" it.
     
    Last edited: Aug 18, 2022
  41. helen515he

    helen515he

    Joined:
    Jan 4, 2022
    Posts:
    1
  42. warde

    warde

    Joined:
    Sep 10, 2012
    Posts:
    6
  43. dev_34Disorder

    dev_34Disorder

    Joined:
    Aug 7, 2018
    Posts:
    43
    Hi, op here.

    I'm glad the issue is being worked on, wanted to take the chance to bring up a similar problem, hopefully one that's easier to fix:
    The 'Camera Opaque Texture', which gives you a texture with all the opaques rendered for use with the shader graph, only ever renders out the Base Camera in a stack, and nothing from the overlay cameras is visible. This can make fullscreen effects with distortion super annoying to make, like rain or glitch effects.
    Here's some other threads with the same issue:
    https://forum.unity.com/threads/camera-stacking-urp-opaque-texture.1018444/
    https://forum.unity.com/threads/urp-camera-stacking-with-opaque-texture.1222794/
    https://forum.unity.com/threads/sam...ra-opaque-when-using-camera-stacking.1020112/
    Hope you can fix this together with the post processing issue.
     
  44. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    561
    Download the project it doesn't work the way you might think it does.

    But also how post processing works with camera stacking has changed at least once since this video since I had to redo my setup in the past after updating unity versions.
     
  45. WakandianEngineer

    WakandianEngineer

    Joined:
    Dec 24, 2020
    Posts:
    1
    i mean guys Unity team... this is one of the biggest turn off i ever ever experienced in my entire life, i mean COME ON!
    this is such an important feature! if you want to keep up with the competitor you NEED to adress it ASAP!
     
    RoyBarina likes this.
  46. JigOfficial

    JigOfficial

    Joined:
    Mar 17, 2021
    Posts:
    1
    I have a problem with this related to VR that makes this even more complicated. The UI Camera in VR has to render the UI in world Space and if we use the camera stack with the workaround of having the PP only in the base and an overlay Camera that renders the UI with no PP at all, the UI is render always over the hands of the player even if they are behind in the world space, something that breaks inmersion totally in VR.
     
  47. YESTON

    YESTON

    Joined:
    Mar 11, 2022
    Posts:
    1
  48. andorix

    andorix

    Joined:
    Mar 30, 2020
    Posts:
    9
    +1

    There's seriously no way to have post processing on my overlay camera without affecting the entire base camera?

    I understand that other problems might have a higher solve priority, but this is an issue I've run into on a number of separate projects. It makes working with 3D object UI elements all the more difficult (which I'd rather render through an overlay camera, rather than parent to the main camera).

    Hope we get a fix!
     
  49. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,699
    Have any Unity people had any breakthroughs?
    It'd be great to know if there's something on the horizon or are we looking at years in the future? On the radar sounds pretty bleak to me and it's a huge limitation.
     
  50. edsludden

    edsludden

    Joined:
    Nov 6, 2018
    Posts:
    6
    Just wanted to chime in and say that I also was working in a Scene today and expected that an Overlay Camera Post Processing (stacked Camera) would work. Looking forward to seeing a solution from Unity! I'm currently using this technique to dim the backgrounds but keep the characters unaffected, but I would prefer to make the characters pop and leave the background unaffected.