- Home /
Blur only the top and bottom of the screen
I need to simulate an effect similar to what http://tiltshiftmaker.com/ creates. As a small step towards accomplishing it i need to say only the top and bottom 40% of the screen will be blurred, while keeping the center 20% crystal clear.
I thought maybe i could have a plane that blurs whats behind it, but i couldnt find out how to do that either, so any help at all with this issue would be great :)
Answer by murkantilism · Mar 15, 2013 at 07:16 PM
Do you have Unity Pro? This could be done fairly easily with Pro, see these two unityAnswers posts for more info, and this Unity documentation about blurring images.
Neither of those accomplish what i need, mainly due to one of them being blur on the whole screen and the other one is motion blur, not quite the image effect I need
Gotcha, have you checked out the built-in post-processing Tilt shift effect? I also suggest you check out these two threads if you haven't already.
Ive actually tried the included TiltShift effect with unity, my issue with the effect is that it uses depth to deter$$anonymous$$e blurriness (in the image you can see the blocks are really close to the camera) but i just want to make a section of what i see on screen blurry (for sake of simplicty lets say i want to blur the bottom half of the screen) independent of distance (as if i was on photoshop) Thanks for your help =) I appreciate it
Ah I see. Is there now way you could "cheat" with camera angles and still use the built-in tilt shift?
What I mean by "cheat" is, would it be possible to arrange the objects in your game world (that you want included in the blurry part of the screen) and play with the angle and location of the camera to get the desired effect?
If that's not possible in your game, then you'll likely have to write your own script from scratch to create this tilt shift effect.
I've never done anything like this, but off the top of my head I'd suggest trying something like this:
Use your camera's behaviors such as ScreenToViewportPoint to figure out what the user is seeing on his screen.
Then decide what sections of the screens you want to blur (middle section, lower half, etc.)
Once you have the viewport coordinates of the part you want to blur, use RenderWithShader or SetReplacementShader and manually create the blur effect. Perhaps you might be able to use a built in blur effect here, not sure.
Yeah unfortunately the first one is not possible due to locations of the objects, and as for your proposed suggestion I though of that but we also need a blur "gradient" as to whenever it reaches the middle of the screen the blurriness dissipates...
Sorry to be so negative but am a bit frustrated cause its the first time Ive encountered such a problem... The closest possibility is to modify an Image Effect called "Vignette" but since its a Unity Pro script I fear its complicated to modify it to my needs, since what it does is to blur in a circle from the center while I need a vertical or horizontal line (which then needs to move around the screen closer to the sides or top and bottom)
Your answer
Follow this Question
Related Questions
Blur the screen sides for mobile. Is it possible without huge performance impact? 1 Answer
Wind filter in Unity Shader? 0 Answers
How do you fix the blurry screen thing in FPS? 0 Answers
Blur Effect 0 Answers
How do I smooth edges? 3 Answers