2
$\begingroup$

I have a scene with moving objects and I want to extract the optical flow (apparent motion as seen by the camera). I am using Cycles. I include the 'Vector' pass and save the result as 'OpenEXR MultiLayer'. When I open the resulting file in Python I get the following channels:

  • RenderLayer.Vector.W
  • RenderLayer.Vector.X
  • RenderLayer.Vector.Y
  • RenderLayer.Vector.Z

What is the convention here? Could you provide a source for the information?

$\endgroup$
2
  • 1
    $\begingroup$ R: pixel displacement in X from current frame to previous frame G: pixel displacement in Y from current frame to previous frame B: pixel displacement in X from current frame to next frame A: pixel displacement in Y from current frame to next frame. – From blenderartists.org/t/nuke-and-blender-speed-vector-pass-in-nuke/… - Maybe the info in this thread is helpful to do more research. RGBA might map to WXYZ or XYZW. (Not a real answer, so just commenting here.) $\endgroup$ – michaelh Mar 24 at 12:30
  • 1
    $\begingroup$ @micaelh Thank you, this information helped me to build the experiments that led to the actual answer. $\endgroup$ – Milo Mar 26 at 7:10
4
$\begingroup$

Guided by @micaelh in the comments, I ended up doing some experiments moving objects in a controlled way, the results are below.

  • 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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.