Maya GetFlow v1.2

Run from command prompt without openeing Maya, make sure you are in the sam directory as your 3D model. The output is stored as two seperate textfiles, one for the x flow and the other for the y. The value 1666666752 indicates that it was no possible to compute flow at that location due to the point not apearring the second frame (occlusion). The output data is stored in column order.

mayapy getFlow.py opDir sequenceName cameraName xRes yRes frame1 frame2

e.g.
mayapy getFlow.py C:/Flow polys2.mb cam_main 320 240 1 2

to run in the background
start /min mayapy getFlow.py C:/Flow polys2.mb cam_main 320 240 1 2


Additional Information:
- Can be slow for scenes with lots of geometry
- Make sure your model contains no Nurb surfaces. You can convert these in Maya 
- Be careful about scale of your scene as there are some constants which deal in absolute size (e.g. tolerance in rayIntersect)

Bugs:
Cannot change pivot point of camera
Weird issues with Booleans
Does not like copied objects
All geometry must be present in the first of the two frame pairs

Notes:
* If you are using rigid bodies you must go to Edit -> Keys -> Bake Simulation
* Ensure the maya enviornment variable is set in your system path and pointing to the bin folder.

Need to import numpy
After installing NumPy, I copied the numpy directory from
your Python 2.6 install from C:\Python26\Lib\site-packages\
to C:\Program Files\Autodesk\Maya2011\Python\lib\site-packages.
Make sure you copy the folder that matches your default version of python. 

You can find variours precompiled versions here:
http://www.lfd.uci.edu/~gohlke/pythonlibs/

