This is somewhat a follow-up to my earlier question asking how can I get optical flow out of a Blender scene

I have successfully achieved that goal by enabling vector output in the render layers, and saving the output as OpenEXR files.

However, I see that blender takes the liberty of thresholding the motion values so as to make "stationary" pixels 0. The problem is that blender's threshold is too high, and it also zeroes pixels with little motion.

Motion on a depth-rotating plane, as shown by the "vector" render layer of the OpenEXR file

The graph is the motion along a rotating plane turning in one direction.As the graph shoes, anything that's below 0.10 are assigned to 0, whereas in reality the values should form a continuous line starting from 0 (i.e. rotation axis), going to higher motion values (i.e. the edge of the plane). That means blender simply ignores smaller motion.

I understand the computational necessity behind this. But is there a way to adjust this threshold (preferably using python interface)? I'm just losing too much information and I'm just not happy cropping everything below an arbitrary number that blender imposes.

  • $\begingroup$ If a plane is rotating in front of the camera, the outer pixels will be moving faster than the inner pixels with the very centre of rotation having zero movement. If a point on your model moves less than 0.1 it would pretty much guarantee that the same pixel will be used for that point on the model so it has no movement. Have you also considered that areas behind the plane are visible as it rotates, leaving non-moving areas within the region of the planes movement? The movement comes from the render engine so I expect you will have to patch your own copy of blender to alter it. $\endgroup$ – sambler Feb 2 '15 at 10:15
  • $\begingroup$ The plane has a high spatial frequency voronoi texture to make the motion more apparent at every location. The problem is the pixels assigned to 0 motion do move, just not as fast as the rest (ie more eccentric locations on the plane). I do not understand what you meant by "Have you also considered that areas behind the plane are visible as it rotates, leaving non-moving areas within the region of the planes movement". But the plane is completely opaque and covers the entire frame, so there is no background visible if that's what you meant. $\endgroup$ – aarslan Feb 2 '15 at 19:46
  • $\begingroup$ The non-moving areas aren't relevant if your plane covers the entire frame. I was referring to the areas between the arc of the planes corners and it's edges as it rotates. It may be the texture doesn't effect the motion calculation, only the mesh movement does, you'd have to ask the dev that coded it. $\endgroup$ – sambler Feb 3 '15 at 0:35

Your Answer

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

Browse other questions tagged or ask your own question.