Is it possible to exclude Menu UI from in depth of field image effect?
I have attached a screenshot to show you my issue, the menu /canvas is blurred in places, I’d like to use the DOF image effect but ignore the UI in the effect, I cannot find much information about this yet in my searches.
Thanks for the info, I tried this but did not have much luck, is this true for the newer Canvas style GUI stuff too, which is rendering to world space?
Sorry ill add since this helped me get my UI to render without post processing
(I’m using one camera to render the scene and had my canvas attached to this camera)
Remove the Main Camera object under Render Camera when you’re in Screen Space - Camera.
It now renders the canvas without the effects Hope it helps another person
So no way to only exclude some effects from UI?
Lets say my environment has PP effects DOF and Bloom, on my UI I want to keep the bloom but exclude the DOF.
Not possible
If you’re following the advice in this thread and creating a second camera you simply need to create a second post process effect (as well as all of the requirements that come with post processing like a second volume).
Alright I see I need to be much more specific here.
Lets take a specific scenario where there’s a scene with 3d game objects such as a character and a terrain and a canvas for UI.
On the character and terrain I want to add DOF, bloom and motion blur effects.
On the UI I want a separated bloom, nothing else.
So what I need to do is to make 2 separated volumes, right? 1 for game objects (set to the default layer for instance) and a second one for the UI (set to the UI layer).
I also need 2 cameras with PP enabled;
1 set to “Overlay” as render type and set to draw nothing but UI and UI layer is selected in the volume mask under environment (so this camera will only be affected by volumes from this layer).
2 base camera to draw all layers but UI and set the volume mask to default layer. here we also need to stack the other camera.
Is this correct?
So now I have a stack of 2 cameras with PP enabled with TWO bloom effect stacking on top of each other.
This is weird right? I kinda wanted 2 bloom effects… but the UI bloom is affecting my character and terrain which aren’t on the UI layer.
So the UI PP is “leaking” into the base PP and you can see artifacts…
This is maybe miniscule on this specific scenario but I think when using HDR the first bloom doesn’t take it into account and you’ll get unwanted effect.
Now imagine using other effects like two “separated” tonemapping or color correction. you’ll get horrible effects.
SO. one cannot simply make two separated pp’s that have some similarities like 2 bloom effect and without “leaking”.
The overlayed PP will also affect the base.
At least with this approach… if you have another way of doing this that’s actually works I’ll be glad to hear.
No. If your UI bloom is affecting your character and terrain then its not set up properly. Unity’s post processing only affects the layer that it is assigned to. All other layers will be ignored except for the purposes of alpha (ie if the UI is set to blur and is semi-transparent it will blur the any results that came before it).
Bypassing the alpha limitations is done by first rendering to a texture and then applying that texture on screen.
I briefly skimmed through the thread you linked and it appears that the URP is currently not playing nice but that doesn’t change that this is the way you’re supposed to be able to do it. URP and HDRP are limited compared to built-in. If you were on built-in this would work just fine which is why some games still use it.