Motion Vectors

After discussing MotionVectors from CG I wondered how they actually work, and here is the answere to that question at least for Blender/Cycles:

The Vector pass is 4 channels (RBGA) and are containing this:

  • Vector.X - X displacement from previous frame to current frame
  • Vector.Y - Y displacement from previous frame to current frame
  • Vector.Z - X displacement from current frame to next frame
  • Vector.W - Y displacement from current frame to next frame

Values are in pixels. X displacement is positive to the left, Y displacement is positive downwards.

So now flame seems to expect R and G channels to be flipped and it doesnt account for the Y dispacement in the alpha channel as it only takes one RGB pipe for the vectors?


Did a bit of experimenting here.
Left: Motion Vector Blur out of Blender (simple setup)
Right: Flame’s (Flame is nicer! :stuck_out_tongue_winking_eye: … not sure)

In Nuke I did a bit of reshuffling and set the motion channels to RGBA… although I think Flame just uses RG for UV absolute values

Pretty sure the reshuffling can be done in Blender’s Compositor… will try that later

1 Like

Blender shuffle:

Testing Blender output on the left

you can also reshuffle in flame using mono and combine nodes :smiley:

I wonder where not using “Y displacement from current frame to next frame” can give us issues.

I could not get the vector to work straight out of the Blender render… hence the reshufle.

I am guessing it is because the WXYZ channel name fuckery

I still put my Blender output through the compositor anyway. Usually for AOVs denoising… but even just to rename the channels, as Blender default naming is ugly.

interesting I thought it was a bug with my particular render, I also get that same error in flame (look at the log it struggles to decode it :smiley:

1 Like