Hey everyone,
Is it possible to setup the DOF in UDK to only effect from the foreground outward? Right now I can only make objects blur the further from the camera that they are. However, I'd like to have objects blur the closer to the camera they are, so that shots of grass/weeds/flora that get close to the camera are blurred. The opposite of what is happening here:
Is this possible?
Replies
-Reduce the Inner Radius to 0
-Max Far Blur Amount to 0
-Max Near Blur Amount to 1
-Adjust the Focus Distance to get a blur distance that I liked.
The results:
I assume this is the general Idea of the effect you're wanting?
this was throw together but yeah its possible.
here's a screen grab:
edit: oops, guess you beat me to it hah.
So would creating any kind of geometry and placing it behind the trees make em blur? was thinking if adding a "wall" further in the back would work.
It doesn't blur the foreground anymore, just gives it sort of a surreal effect, like a pocket of clarity is just out of reach. It didn't seem to affect fps anymore than normal dof 1 way or the other when I turned it on, but then again I was in a relatively low demand set.
I tried to see if I could cheat the edge effect by masking out the corners when the camera is within 'x' units of the obj so it would blur out the interior texture over the then masked geo as a work around, though it didn't work too. While it did blur it it didn't look right at all.
Though if someone wants to try to make it work, basically it was just making the shader "masked" and creating a mask sheet for the edges of the geo in the texture sheet and setting it up with an if statement to power the opacity to mask in a gradient effect.
I couldn't get the shader to register the camera distance as intended though. I suspect its because I just don't know/understand enough about it :poly141:
I also tried a fresnel effect bloomed out, but that was...undesirable as well.
edit: of course the simplest effect could be to just create a lod that has quads coming off the edges with a faded texture painted out that dissapears once your say 128 u away from the object to the "real" 1st lod.