(continue) motion blur of skinning mesh

from my last post

http://www.opengl.org/discussion_boards/…;gonew=1#UNREAD

I seem to some what succeed in implementing motion blur of skinning mesh using method given by Ilian Dinev (haven’t try transform feed back yet due to lack of example).

The result look acceptable but the the blur effect of the skinning mesh only occured inside the mesh.

This is understandable from the process of creating velocity map.

Are there any technique that can make motion blur appear more correct ?

I have read somewhere that there are some kind of geometry extruding technique but cant find the detail.

image of skinned mesh with out motion blur

http://img242.imageshack.us/img242/672/nombz.jpg

this one with motion blur

http://img44.imageshack.us/img44/4484/withmb.jpg

The geometry-extrusion method is used in Lost Planet. I don’t find it any pleasing, there are huge artifacts.

In my research, I found most nice-looking, but hard to create:

  • have the MVP = (prev_MVP+current_MVP)/2; // too hard for engines to be made to do
  • blur according to the velocity-map, but in two directions: the “vec2 vel_map”, and the “vec2 neg_vel_map = -vel_map”.
  • use the previous frame as input data for the blur, done in the direction of “vel_map”.

An easy way to fake it all, with quite some degradation in IQ is to simply do regular velocity-blur, but in both directions. Will over-estimate blur, but the edges that move forward will not be crisp (which is the problem you meet) .

Here’s a screenshot: mblur0.jpg

And here’s my ancient, messy demo+src: World3D.zip

Keys are w/s/a/d , arrows. A dualshock2-type gamepad is recommended.
To recompile shaders, set the %CG_BIN_PATH% to point to the cgc.exe folder, run CompileShaders.exe and then BatchCompileShaders.bat . (or simply enable the CompileShaders.exe custom-build-tool inside the VisualStudio project, and build the project).
The “BLUR_VECTOR_SCALE” needs some tweaking, and kinda match the one from mblur_pass2.

Whoa thank for you in depth reply,you are the most generous guy on this board :slight_smile: .

My implement is still frame rate dependent too and it also got some performance hit by require RGBA16F to store velocity map in range -1,1 .

I try to store the velocity in RGBA8 by doing the samething as normals/g-buffer like this.

//after calculate velocity of the pixel
velocity = velocity/2.0; //scale from (-2,2) to (-1,1) range
velocity = (velocity+vec2(1.0,1.0))/2.0; //scale to range (0,1)

//in final resolve/blit shader
velocity = texture2D(velocityMap,texCoord);
velocity = (velocity*2.0)-vec2(1.0,1.0); //rescale back to (-1,1)

but the result are not the same as storing velocity in float texture in range -1,1