Optical Flow
Compute optical flow motion vectors between image frames.
What it does
Optical Flow compares two frames of an image and produces the per-pixel motion between them: a flow map for wiring into Displace to warp along motion, a colour Visualization where hue shows direction and brightness shows speed, and a greyscale magnitude map of how much movement there is at each pixel.
By default the previous frame is buffered and compared against the current one, so a live source can be fed straight in. Wire an explicit image into Reference to compare against a specific frame instead of one frame ago.
Current status: this node is a placeholder in this build. It always reports no motion (a flat flow map, a black visualisation, zero magnitude) rather than running real motion estimation.
When to use it
A Displace node driven from detected motion, with Flow Map wired in
Where and how fast things are moving in a video or camera feed, shown as colour
Prototyping a motion-reactive effect, with the flow map, visualisation and magnitude sockets already in place for when live motion data arrives
| Parameter | Type | Default |
|---|---|---|
image | OneOf([FieldOf(Raster)]) | — |
reference | OneOf([FieldOf(Raster)]) | — |
quality | String | "fast" |
enabled | Boolean | true |
flow_scale | Number | 1 |
threshold | Number | 0 |
opacity | Number | 1 |
Gotchas
Flow Map is RG-encoded with 0.5 meaning no displacement, the convention Displace expects. Inspected directly as a colour image, a flat mid-grey and mid-red tone is the nothing-moving reading, not a broken wire.
This node does not currently compute real optical flow. Every output is a constant no-motion value: flow map centred at zero displacement, black visualisation, zero magnitude. Quality, Flow Scale, Threshold, and Position have no effect yet. The wiring is ready; nothing live sits behind it in this build.
Worked example
Add an Optical Flow node and wire a video or camera source into Image.
Leave Reference unconnected to compare automatically against the previous frame, or wire in a specific frame to compare against that instead.
Wire Flow Map into a Displace node's displacement input to warp along detected motion, or preview Visualization directly to see direction and speed as colour.