GLSL background blur / dof help

Hey all,
I’ve been working on a concept piece in the game engine, its in a platform style, all setup in side view.
I need the background to be blurred, while keeping the character in focus. The character will only move side to side (platform style) along the y-axis.

I’ve tried using Mike pans (MPAN3) dof glsl script, but it basically blurs the whole scene, due to me needing the camera a fair way away from the character to see the scene I assume (?)

I was going to use the fast dof script as it has a focus on object option, but its just too buggy, and I dont like the look of the noise blur. (http://blenderartists.org/forum/showthread.php?t=172522)

Basically I just need the background blurred (I can move it back and scale it up as much as needed by the script), there will be no dynamic changing of focal points or blur amounts. I could even put the background in another layer or in a background scene, if its easier to blur it that way.

I attached a front view screenshot of my scene. Any help much appreciated. :yes:

Attachments


why not just blur the texture ahead of time? That would make the game much faster anyways…

I actually thought of that, but the background will be composed of several meshes, it wont just be a plane or cube with a texture.
The Mpan3 dof script works perfectly, if I could get it to work on the background only.

Martinsh has a heap of shaders/filters in this thread:
http://blenderartists.org/forum/showthread.php?t=156482

Just put the dof script in your scene and make sure you have the ‘focus’ property on your object.

Thanks Andrew,
I’ll keep playing around with that script and see if I can get enough blur in the right places, at the moment using the script you recommended the character is in perfect focus, but the bg is still pretty clear. Otherwise I might just try and fake it with mist and blurred textures.