3

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?

Rich Sedman
  • 44,721
  • 2
  • 105
  • 222
Milo
  • 257
  • 1
  • 7
  • 1
    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 https://blenderartists.org/t/nuke-and-blender-speed-vector-pass-in-nuke/622902 - 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.) – michaelh Mar 24 '21 at 12:30
  • 1
    @micaelh Thank you, this information helped me to build the experiments that led to the actual answer. – Milo Mar 26 '21 at 07:10

1 Answers1

5

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.

Milo
  • 257
  • 1
  • 7