Velocity Blur COP

   3560   2   1
User Avatar
Member
196 posts
Joined: July 2005
Offline
I've been trying to get the velocity blur COP working. Has anyone tried this? I'm getting a weird effect.



top left: velocity plane
top right: colour plane
bottom left: result from velocity blur COP. (looks like its working and then been masked… but it hasn't)
bottomright: what happens if I copy in a global vector into the velocity plane ( yellow in this case I think. This one makes sense, it all gets blurred in the same direction )

Ignore channel names in the image, the display flags are dotted around.

The velocity channel is created using the shader on odforce at http://www.odforce.net/tips/velocity.htm [odforce.net]

Whats going on?

Ta
Henster
User Avatar
Staff
5158 posts
Joined: July 2005
Offline
The velocity blur COP is currently being reworked, because of this issue. Essentially, the velocity blur COP walks through the vector field, which isn't what you want. You want a given point to look at its velocity, and smear itself across output pixels along that vector.

The problem is that the Velocity Blur COP was written in VEX, and VEX is not very good at operations where a single input pixel affects mulitple output pixels (it's much better at multiple input pixels affecting a single output pixel). I know it almost sounds like the same thing, but when you have to code something from the point of view of a single output pixel, it's not.

In order to get a correct blur, it would need to be written so that for any given output pixel, it searches its local area for any velocity vectors that may run through it, and then adds their color contribution in. Unfortunately, this is horrendously slow, so this COP is being re-written in C++ (which can do either point of view with ease). It's much faster to look at a single velocity, and smear the color across several output pixels at once (no searching).
User Avatar
Member
196 posts
Joined: July 2005
Offline
thanks for the reply twod.

Looking forward to that one, should be a nice effect.
Henster
  • Quick Links