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))
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.
if you use a png with transparency, you’ll get that : )
like so,
Looks like a static camera solution. Is there a dynamic camera solution?
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.
you can try to do it via a postprocess then : )
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.
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 : )
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
Hello @Kkasya and welcome
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
it is awesome!
Guys, thanks a lot!
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.);
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 :
Thanks again! I changed it a bit and got what I wanted
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.);