Blur Any Background in Unity | 2024

Поділитися
Вставка
  • Опубліковано 10 лют 2025

КОМЕНТАРІ • 61

  • @spaderdabomb
    @spaderdabomb  Рік тому +8

    !! 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

  • @stefanoc5099
    @stefanoc5099 11 місяців тому +15

    What if I need to blur ui behind ui ?

  • @alecbrynard357
    @alecbrynard357 8 місяців тому +1

    Very helpful and easy; thanks!

  • @thealpacaofsupport258
    @thealpacaofsupport258 4 місяці тому

    Many thanks for the help! ^^

  • @Invalourrr-vb3xo
    @Invalourrr-vb3xo 2 місяці тому +3

    i like how u changed the title to 2024 despite releasing this in june last year lol

  • @HydroStudios
    @HydroStudios 2 місяці тому

    under freaking rated

  • @bpdhoplite
    @bpdhoplite 8 місяців тому +1

    Great tutorial

  • @castlecodersltd
    @castlecodersltd 5 місяців тому

    NIce one, thanks for sharing 🙂

  • @BalotniyZhitel
    @BalotniyZhitel 10 місяців тому +1

    Дзякую!

  • @DeclanFaircloth-Walshe
    @DeclanFaircloth-Walshe 4 місяці тому +4

    This isn't working for me, I'm using URP, would that be causing the issue?

  • @mirm0n
    @mirm0n 3 місяці тому

    thx fam

  • @vrene993
    @vrene993 10 місяців тому

    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

    • @spaderdabomb
      @spaderdabomb  10 місяців тому +2

      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.

  • @ibrahimAlbayrak0
    @ibrahimAlbayrak0 2 місяці тому

    Now when you open your inventory your fps may drop by half 😂

  • @lunark202
    @lunark202 2 місяці тому

    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?

    • @spaderdabomb
      @spaderdabomb  2 місяці тому

      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!

    • @lunark202
      @lunark202 2 місяці тому

      @@spaderdabomb Thank you. I will try what you say

  • @s3nju279
    @s3nju279 Місяць тому +1

    does this work for urp?

  • @Deadly-Cat-MSM
    @Deadly-Cat-MSM 4 місяці тому

    (2D) how would you go about toggling it based on an ingame button? I'm probably missing something easy

    • @spaderdabomb
      @spaderdabomb  4 місяці тому

      I would just get a reference to the post processing component on the game object, then toggle SetActive(true) or SetActive(false)

  • @simaosoares7601
    @simaosoares7601 Рік тому

    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?

    • @spaderdabomb
      @spaderdabomb  Рік тому +1

      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

  • @jeikobuka
    @jeikobuka Рік тому

    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?

    • @spaderdabomb
      @spaderdabomb  Рік тому

      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

    • @jeikobuka
      @jeikobuka Рік тому +1

      @@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.

  • @PhantomAbyss
    @PhantomAbyss Рік тому

    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?

    • @spaderdabomb
      @spaderdabomb  Рік тому

      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.

  • @alexanderlex-s933
    @alexanderlex-s933 Рік тому +1

    Спасибо!

  • @rukna3775
    @rukna3775 Місяць тому

    0:17 --------------- what is this shark game?

  • @equilibrium-tech
    @equilibrium-tech Рік тому

    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...

    • @equilibrium-tech
      @equilibrium-tech Рік тому +1

      Oh just found out that Post Processing package doesn't support URP!
      You need global volume instead.

    • @spaderdabomb
      @spaderdabomb  Рік тому +1

      Ah good point, I should have mentioned it's slightly different for URP vs. built-in, glad u figured it out!

    • @equilibrium-tech
      @equilibrium-tech Рік тому

      @@spaderdabomb Yeahh. Thanks for the vid btw

    • @Rammbriel
      @Rammbriel 8 місяців тому

      @@equilibrium-tech i'm using URP, what do you mean by "global volume"? How do I use it?

  • @yaroslav3647
    @yaroslav3647 10 місяців тому

    Hello. How do I blur UI as well?

  • @DovyBL
    @DovyBL Місяць тому

    How is this a 2024 tutorial if it uses the 2021 unity version?

    • @spaderdabomb
      @spaderdabomb  Місяць тому

      It’s recommended to use the most recent LTS version, which lags sometimes multiple years

  • @zynxos
    @zynxos Рік тому

    its not working for my 2D game that uses URP

    • @spaderdabomb
      @spaderdabomb  Рік тому

      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?

    • @NitinKr7
      @NitinKr7 7 місяців тому

      @@spaderdabomb yeah, it is orthographic

  • @cryptyyy_7667
    @cryptyyy_7667 Рік тому

    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.

    • @spaderdabomb
      @spaderdabomb  Рік тому

      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!

    • @cryptyyy_7667
      @cryptyyy_7667 Рік тому

      @@spaderdabomb All I had to do was close and reopen the project. Thsnks for the reply anyways!

  • @Injabsful
    @Injabsful Рік тому

    nice videos where i can reach you ? if even possible to talk abouy smth ?

    • @spaderdabomb
      @spaderdabomb  Рік тому

      Best place is Discord discord.gg/NpK5CXe

  • @EliCharles-b7s
    @EliCharles-b7s Місяць тому

    doesnt work

    • @spaderdabomb
      @spaderdabomb  Місяць тому

      it should, feel free to djoin my discord where I can show you how to do it

  • @NitinKr7
    @NitinKr7 7 місяців тому +1

    Not working for 2d games

    • @spaderdabomb
      @spaderdabomb  7 місяців тому +1

      See pinned comment

    • @NitinKr7
      @NitinKr7 7 місяців тому +1

      @@spaderdabomb I did that, but nothing working (I am using URP)

    • @onurkorkmaz22
      @onurkorkmaz22 7 місяців тому +2

      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.

    • @NitinKr7
      @NitinKr7 7 місяців тому +1

      @@onurkorkmaz22 yeah ig it is only way 😞

    • @onurkorkmaz22
      @onurkorkmaz22 7 місяців тому +1

      @@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

  • @Keji839
    @Keji839 6 місяців тому

    Adding depth of field for UI blur is so process heavy. Terrible idea

    • @spaderdabomb
      @spaderdabomb  6 місяців тому +1

      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

    • @Keji839
      @Keji839 6 місяців тому

      @@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.

  • @minehappysky
    @minehappysky 9 місяців тому

    hehe ppVolume