Thanks for this nice video I don t really get why the layers are not really working. I wanted to blurr only some elements but it seems you have to choose everything or nothing. That makes me a bit sad :/ At least thank you for the help for the canvas to overlay. I was going crazy. Putting it out of the layers and still it was blurring my UI
It is pretty annoying, but I know a way around it (unfortunately the solution is pretty annoying too). Post processing is tied to a camera, so what u can do is make two cameras and only render certain layers for each camera and apply different pp effects to each. Then just have both cameras in the same exact spot and the output will add each camera to your final render. It sounds dumb but that’s generally how you have to do selective post processing effects by layer. That’s actually why this technique works in this video. The canvas elements are rendered by a different camera (you can check this by turning main camera off), so the post processing effects aren’t applied to the canvas elements.
Hello, I have a question. When creating an inventory system, the 'Image' part of my inventory items appears pixelated when adding a Sprite. What could be the reason for this? I use Blender to create a 3D model and then render it or take a screenshot to convert it into a PNG, but I face this issue. I don’t want to use any other method; it’s important to me that the 2D image in my inventory looks exactly like the solid object I see in the game. How can I achieve this?
I've had a similar type of problem before. Try going into your texture/sprite settings, and under the advanced dropdown, check "Generate Mipmaps". That can definitely help keep the icon looking the same no matter what the scaling. Lmk if that works!
I think you're best off writing custom behavior for this, its a little more complex. Here's a cool tutorial that shows the effect (I think) you're after ua-cam.com/video/-BXEMBaGSiY/v-deo.html
In the beginning of the video (0:56), you can see my Canvas Render Mode is Screen Space - Overlay. What's yours? If you're rendering your canvas with a camera, it will also blur the UI on the canvas
@@spaderdabomb Ah that’s the problem then, I have it set to my Camera, i just ended up adding a second camera to render the UI tho and it works like a charm, thanks.
Hello i am new to code. This was really helpful! But I want a different way of blur turning off and on, I want that whenever my gameover screen is active so is my blur and vice versa. Can anyone tell me how i can make it happen?
Why it's not working in Unity 2022? After adding Post-process Volume and post-process layer and set the layer to everything, the camera doesn't blur...
2 things to check. In the camera in the inspector, under Camera > Rendering, make sure the "Post processing" box is checked. Also, under Camera > Projection, is your Projection set to orthographic?
Hi I am working on a 3D project and I cannot use the namespace UnityEngine.Rendering.PostProcessing. PostProcessing is underlined (red squiggly line) and I get the following message: The type or namespace name 'PostProcessing' does not exist in the namespace 'UnityEngine.Rendering' (are you missing an assembly reference?)CS0234 I have installed the package from the package manager, so I don't understand why it shouldn't work.
Hmm, if you have PostProcessing installed, then it sounds like for some reason it didn't get added to your assembly. The assembly file is usually in your main project folder (1 directory above Assets, so you need to use file explorer to find it usually). Should be named something like Assembly-Csharp.dll Only advice off the top of my head is go into Preferences>External Tools and Regenerate project files. Lmk if that doesn't work!
It's because URP and Post Processing packages doesn't work together. URP uses it's built-in package to handle Post Processing. If you want this effect create a global volume in your Hierarchy, add Depth of Field and Color Adjustments into your Global Volume and do the same settings in the video. Also make sure to tick "Use Post Processing" in your camera component. It should be under Rendering.
The other option is using a shader. I actually profiled both approaches separately and the post processing technique is lighter. Also insignificant increase in processing time relative to even low poly count rendering
@@spaderdabomb hmm. I was wrong then.. The general consensus was post processing is resource intensive but I guess a complex shader would actually be heavier.
!! If you are working in a 2D project !!
Make sure your Canvas Render Mode is Screen Space - Overlay. You can see my Canvas settings at 0:56
What if I need to blur ui behind ui ?
Very helpful and easy; thanks!
Many thanks for the help! ^^
i like how u changed the title to 2024 despite releasing this in june last year lol
under freaking rated
Great tutorial
NIce one, thanks for sharing 🙂
Дзякую!
This isn't working for me, I'm using URP, would that be causing the issue?
thx fam
Thanks for this nice video
I don t really get why the layers are not really working. I wanted to blurr only some elements but it seems you have to choose everything or nothing. That makes me a bit sad :/
At least thank you for the help for the canvas to overlay. I was going crazy. Putting it out of the layers and still it was blurring my UI
It is pretty annoying, but I know a way around it (unfortunately the solution is pretty annoying too).
Post processing is tied to a camera, so what u can do is make two cameras and only render certain layers for each camera and apply different pp effects to each. Then just have both cameras in the same exact spot and the output will add each camera to your final render.
It sounds dumb but that’s generally how you have to do selective post processing effects by layer.
That’s actually why this technique works in this video. The canvas elements are rendered by a different camera (you can check this by turning main camera off), so the post processing effects aren’t applied to the canvas elements.
Now when you open your inventory your fps may drop by half 😂
Hello, I have a question. When creating an inventory system, the 'Image' part of my inventory items appears pixelated when adding a Sprite. What could be the reason for this? I use Blender to create a 3D model and then render it or take a screenshot to convert it into a PNG, but I face this issue. I don’t want to use any other method; it’s important to me that the 2D image in my inventory looks exactly like the solid object I see in the game. How can I achieve this?
I've had a similar type of problem before. Try going into your texture/sprite settings, and under the advanced dropdown, check "Generate Mipmaps". That can definitely help keep the icon looking the same no matter what the scaling. Lmk if that works!
@@spaderdabomb Thank you. I will try what you say
does this work for urp?
(2D) how would you go about toggling it based on an ingame button? I'm probably missing something easy
I would just get a reference to the post processing component on the game object, then toggle SetActive(true) or SetActive(false)
What if I want to only blur the UI panel itself like you see in the vision pro videos? Can that also be done with this technique?
I think you're best off writing custom behavior for this, its a little more complex.
Here's a cool tutorial that shows the effect (I think) you're after ua-cam.com/video/-BXEMBaGSiY/v-deo.html
The blur is also applied to my UI, are you by chance using a separate camera to render the UI on top of everything else?
In the beginning of the video (0:56), you can see my Canvas Render Mode is Screen Space - Overlay. What's yours? If you're rendering your canvas with a camera, it will also blur the UI on the canvas
@@spaderdabomb Ah that’s the problem then, I have it set to my Camera, i just ended up adding a second camera to render the UI tho and it works like a charm, thanks.
Hello i am new to code.
This was really helpful!
But I want a different way of blur turning off and on, I want that whenever my gameover screen is active so is my blur and vice versa. Can anyone tell me how i can make it happen?
You will need to write a script that enables the post process component when game over occurs. Then when you start your game again, it disables it.
Спасибо!
0:17 --------------- what is this shark game?
Why it's not working in Unity 2022?
After adding Post-process Volume and post-process layer and set the layer to everything, the camera doesn't blur...
Oh just found out that Post Processing package doesn't support URP!
You need global volume instead.
Ah good point, I should have mentioned it's slightly different for URP vs. built-in, glad u figured it out!
@@spaderdabomb Yeahh. Thanks for the vid btw
@@equilibrium-tech i'm using URP, what do you mean by "global volume"? How do I use it?
Hello. How do I blur UI as well?
How is this a 2024 tutorial if it uses the 2021 unity version?
It’s recommended to use the most recent LTS version, which lags sometimes multiple years
its not working for my 2D game that uses URP
2 things to check. In the camera in the inspector, under Camera > Rendering, make sure the "Post processing" box is checked. Also, under Camera > Projection, is your Projection set to orthographic?
@@spaderdabomb yeah, it is orthographic
Hi
I am working on a 3D project and I cannot use the namespace UnityEngine.Rendering.PostProcessing. PostProcessing is underlined (red squiggly line) and I get the following message: The type or namespace name 'PostProcessing' does not exist in the namespace 'UnityEngine.Rendering' (are you missing an assembly reference?)CS0234
I have installed the package from the package manager, so I don't understand why it shouldn't work.
Hmm, if you have PostProcessing installed, then it sounds like for some reason it didn't get added to your assembly. The assembly file is usually in your main project folder (1 directory above Assets, so you need to use file explorer to find it usually). Should be named something like Assembly-Csharp.dll
Only advice off the top of my head is go into Preferences>External Tools and Regenerate project files. Lmk if that doesn't work!
@@spaderdabomb All I had to do was close and reopen the project. Thsnks for the reply anyways!
nice videos where i can reach you ? if even possible to talk abouy smth ?
Best place is Discord discord.gg/NpK5CXe
doesnt work
it should, feel free to djoin my discord where I can show you how to do it
Not working for 2d games
See pinned comment
@@spaderdabomb I did that, but nothing working (I am using URP)
It's because URP and Post Processing packages doesn't work together. URP uses it's built-in package to handle Post Processing. If you want this effect create a global volume in your Hierarchy, add Depth of Field and Color Adjustments into your Global Volume and do the same settings in the video. Also make sure to tick "Use Post Processing" in your camera component. It should be under Rendering.
@@onurkorkmaz22 yeah ig it is only way 😞
@@NitinKr7 I mean it's literally the same thing. I don't get why the sad face. It's working if you do the way I told you to
Adding depth of field for UI blur is so process heavy. Terrible idea
The other option is using a shader. I actually profiled both approaches separately and the post processing technique is lighter.
Also insignificant increase in processing time relative to even low poly count rendering
@@spaderdabomb hmm. I was wrong then.. The general consensus was post processing is resource intensive but I guess a complex shader would actually be heavier.
hehe ppVolume
Someone noticed lol