Blur part of bg layer

Hello everyone!
I’m new so maybe I’m doing something wrong.
I have bg as a layer and I need to blur a part of it. Below is what I need.

Here is my current layer (I wanted a rotated background so I used a layer (not ground))

Hi!

Do you want it to be constantly rotating?
'Cuz if you just want it static, you can just use your manipulated image

Blur part should be transparent. This canvas is on top of another image. And I need to see the first image under blur part of canvas.

1 Like

if you use a png with transparency, you’ll get that : )

like so,

1 Like

Looks like a static camera solution. Is there a dynamic camera solution?

1 Like

How would you want this to behave with a camera?

I understand if the camera rotates in the horizontal plane you’d prolly want to rotate the image.

what do you want to do when the camera changes vertical orientation?

do you want it to just behave like a regular ground / plane mesh?

It is advisable to blur the layer without changing the png itself. Because we will rotate the image so that the line coincides with the objects that are on top.
Always, regardless of the camera position, the layer is 100% from the bottom to the middle, then it is blurred (and becomes more transparent) from the center to the very top.

1 Like

you can try to do it via a postprocess then : )

1 Like

This is great! Maybe you can help - what values ​​need to be changed to make the texture on the border more blurry? Now we can clearly see the border.

1 Like

I don’t exactly know what’s going on in that image, as you can’t see a border in the PG above.

Can you repro this in a PG? ty : )

1 Like

I don’t know how to add canvas above image in PG.
The top image is canvas and we can clearly see the border. Is there a way to make the border more blurry? So that from the center the blur increases with distance

here’s an example w/ an image

don’t see the borders here : O

1 Like

Hello @Kkasya and welcome :slight_smile:

Is it what you are looking for ?

@Heaust-ops I edited your shader, which was leading a white effect on top of alpha.
I’m adding the image and also resizing + moving the canvas, so that the limit is on the middle of the screen

4 Likes

better, but the border is still clearly

it is awesome!
Guys, thanks a lot!
image

2 Likes

One more question. Is it possible to set parameters like vOffset if using post processing?
I added them for bgTexture to PG (and you can see the old version under line // old version)

Everything here is in that line :

float factor = clamp((vUV.y - 0.5) * 5.0, 0., 1.);
  • vUV.y - 0.5 → Vertical UV, starting from center
  • *5.0 → Resize, so it’s the size of your blur
  • Add to it a constant to get an offset

Result would be :

float factor = clamp((position + rotatedUV.y - 0.5) * 1.0 / size, 0., 1.);

Taken over the rotated UV, so that the blur is rotated.

Here you go :

Screencast from 13-01-2025 17:13:43

3 Likes

Thanks again! I changed it a bit and got what I wanted :slight_smile:
vec2 rotatedUV = position + vUV - vec2(0.5, 0.5);
float scale = 0.7 / max(cos(rotation) + sin(rotation), 1.0);
float factor = clamp((vUV.y - 0.5) * 1.0 / size, 0., 1.);