Difference between camera velocity & object velocity

Started by
3 comments, last by lipsryme 8 years, 10 months ago

Whenever I read up on motion blur in presentations or papers it seems people always separate camera motion blur (or velocity) from object's motion blur (velocity). I'm wondering why that is ?

I don't quite see how the velocity computed from sampling the Z/W depth and reconstructing the world space position and then reprojecting it to the previous frame using the PrevViewProj matrix is any different than the velocity computed from just transforming (in your geometry pass's VS) your vertices by the WorldViewProj & PrevWorldViewProj matrix (ofc other than that it includes the world transform for object translation,rotation and scaling).

Why do people separate these two ways ? Is there any particular reason ?

Advertisement

The main difference is that camera motion blur can be done via the depth buffer and some static per frame constants where as object motion blur needs a velocity per pixel or at least some per pixel data needed to calculate it. If you are doing motion blur on skinned objects then this requires extra work and more bones in the VS or at least cache off the skinned data over at least one frame.

Ultimately its because of efficiency and ease of integration.

Computing velocity from only the depth buffer assumes that each pixel is static in world-space. Therefore the resulting velocity buffer only captures velocity from camera movements, and not from geometry movement. On the other hand, computing velocity in the pixel shader during rasterization can capture velocity from both camera movements as well as object movements, since you're using both the previous camera transform as well as the previous object transform for computing the previous pixel position. If you also keep track of the joint transforms from the previous frame, you can also capture velocity from joint-based animations.

The difference is performance, you don't need to output velocity vectors for static geometry, and for moving objects you might get away with a lower quality buffer.

Okay I think I get it now, it's just a performance optimization so that you don't always have to output velocity during your geometry pass. I got a little a confused with the concept when using temporal reprojection where you always need velocity and thought you always had to do it that way, however when thinking about it it's clear that you will still have the velocity needed for the temporal resolve if you use the other technique and then only render the object velocity when we need to.

This topic is closed to new replies.

Advertisement