Alternative Motion Blur

I decided to do a little test to see whether I could get a better motion blur effect that the default one, and I think this one looks better on the whole, but it won’t work if you just move the mouse. You have to be moving with a velocity (which means the camera must be a rigid body). So yeah, just a test. hopefully some smart person can redo it to work a bit better, but I’m not good with object oriented python (copied and pasted for the most part :cool:).

Tell me what you think, and feel free to make it better if you like :slight_smile:

Attachments

motion_blur_alternative.blend (42.7 KB)

Cool!
Works good for me.
I love these things, because they work without glsl as well!

It works really weird when you move the mouse and you move around at the same time.

Yeah. I don’t fully understand the getVelocity() feature, which is what it uses to calculate the amount of blur. It’s not the like regular motion blur, where only the things that are moving get blurred, it will blur the whole screen using a radial blur when you move. And when you look around quickly too it can get a bit funky. So anyone’s open to improve it or anything. Mine is just a little test with my very limited object oriented python knowledge. The good thing is, I think this works on ATI cards and doesn’t have much performance hit at all.

@SpewBoy:

Radial blur looks ok if you move forward/backwards but for other moves you should use directional blur. It have to be possible to calculate vector of camera/any object movement.

Yeah, but I don’t know GLSL. I just use what has already been made. And my python really isn’t up to scratch. Maybe someone else could redo it with blur that still works on ATI cards, as this was the aim of my attempt.

Then you succeeded. I have an ATI Radeon x800pro and it works (I had to change some values, but it worked perfect). Good work!

Nice effect, I like it :slight_smile:
Thanks for sharing!

dammm this is awesome! This should be implemented into blender, along with all the other custom 2d filters

I’m not seeing any blur, or getting an error…
nvidia 8600, mac os X10.5.7.

Also, the mouselook is mac-incompatible.

which version of Blender are you using??

on mine It works like this,

blur_calc.py

import GameLogic as G
import math

cont = G.getCurrentController()
own = cont.getOwner()

linV = own.getLinearVelocity(1)
own.move = float(abs(linV[1]*10+linV[2]*0.15))
    
own.intensity = own.move*0.0025

Am on Ati and it works perfect!!

However I’ve noticed that it goes ahead to include the preference header part of the window… lol

Yeah, it does that because it basically blurs the whole screen. If you add this to your own game and play the game in full screen or in letterbox (haven’t tried in a window) it should work pretty well. Now I need someone to take this idea and make it work better :stuck_out_tongue:

Anyone knows how to code the same motion blur that is included with blender? I would like to see it since the one integrated doesn’t work on ATI.

wow thnx for sharing this, you get impresive results with it

Attachments


OMG i tottaly needed this, keep up the good work:D