Introduction to a Random OpticalFlowDeform FX
Posted: 20 Jan 2020, 19:40
Optical Flow Concept
The Optical Flow Effect uses a field of source and destination dots in a user-selected/sized grid of deformation points to distort the current image.
With the HUD on, the image can be interactively distorted with a round brush (user set size) simply by painting strokes to dislocate the destination dots. By default, the source dots (red) and the destination dots (green) and the vector lines(blue) are visible in Preview. The distortion displacement in the current image is also displayed and permits interactive deformation.
Vary the effect of your applied distortion brush by changing Size and Power.
The displacement offset can also be REINITIALIZED or reduced interactively by RMB stroking.
A key frame can be created for the deformation at any current frame. Likewise, subsequent keyframes can be created with some modification in the flow, and the interpolation between those key frames can be previewed by hitting play. As with any interpolation, more distance between keys results in slower and smoother progress.
The default dimensions for the dot field are Width 20 Height 15. You can define your own custom dimensions using the Set Size button.
You can also reset the offsets for an individual key by selecting the keyframe then pressing Reset Current Key.
You can reset all of the keys by selecting the Set Size button, and pressing OK without changing the values.
The purpose of the Edit, Selection, Render and Display modes are pretty much self-evident.
Edit mode is for entering default adjustments, previewing deformation and the apply FX operation. The other modes let you change parameters and areas affected.
The BOX mode lets you apply transformations to the entire field of dots (use control-key to scale).
Some other things to point out:
1. Multiple applications of an established set of deformation keyframes simply emphasizes the original deformation so that the displacement becomes exaggerated.
2. When you brush an area, you are changing the destination (green) points and their vectors. The source points stay in original position.
3. Applying the FX moves the image pixels' direction and distance… and interpolates the surrounding pixel positions accordingly.
So, what about the Random Mode (the crossed arrows)?
What happens in random mode is the destination points are automatically displaced in each frame, along randomly generated vectors to a specified distance (length) in each keyframe so, when the Apply FX Stack button is pressed, a multi=frame layer displaying a single image can be distorted/deformed on EVERY FRAME.
IMPORTANT TO NOTICE:
When you are in Random Mode, and you press play, EVERY FRAME BECOMES A KEYFRAME with NEW random vectors for EVERY source/destination pair. This results in a kind of frenzied deformation - without any interpolation at all. Useful for some situations, but not for most situations in my experience.
Simple Demo of OpticalFlowDeform FX
So how to use the POWER and EXPEDIENCY of random vector generation alongside the POWER and EXPEDIENCY of FX interpolation?
For me, it involves a tricky dance:
Using the Random (cross arrows) mode - ONLY to set individual keyframes.
Using the Brush (round) mode - ONLY for copying and pasting keys AND always for preview playback.
Often, I have to use the FX Stack UNDO key to backtrack as well.
Here is the workflow for creating three random vectored keyframe, source/destination fields, each 5 frames apart, copying the original random vector key to the 21st frame for a smooth loop.
1. Setup a layer with a single image for 20 frames.
2. With cursor on frame 1, select Random. Leave Seed at 123456. Set Length 10. Leave Variance on 10%.
3. Press keyframe icon.
4. Move cursor to frame 6 (keyframe is automatically added capturing new field of random vectors)
5. Move cursor to frame 11 (keyframe is automatically added capturing new field of random vectors)
6. Move cursor to frame 16 (keyframe is automatically added capturing new field of random vectors)
7. Move cursor to frame 21 (keyframe is automatically added capturing new field of random vectors)
8. Immediately select Brush (round)
9. Select keyframe @1, and copy it.
10. Select keyframe @21, and paste keyframe from frame 1.
11. Press play to view random interpolations of the green destination grid and blue vectors.
12. Apply FX Stack
Click to view Example:
The Optical Flow Effect uses a field of source and destination dots in a user-selected/sized grid of deformation points to distort the current image.
With the HUD on, the image can be interactively distorted with a round brush (user set size) simply by painting strokes to dislocate the destination dots. By default, the source dots (red) and the destination dots (green) and the vector lines(blue) are visible in Preview. The distortion displacement in the current image is also displayed and permits interactive deformation.
Vary the effect of your applied distortion brush by changing Size and Power.
The displacement offset can also be REINITIALIZED or reduced interactively by RMB stroking.
A key frame can be created for the deformation at any current frame. Likewise, subsequent keyframes can be created with some modification in the flow, and the interpolation between those key frames can be previewed by hitting play. As with any interpolation, more distance between keys results in slower and smoother progress.
The default dimensions for the dot field are Width 20 Height 15. You can define your own custom dimensions using the Set Size button.
You can also reset the offsets for an individual key by selecting the keyframe then pressing Reset Current Key.
You can reset all of the keys by selecting the Set Size button, and pressing OK without changing the values.
The purpose of the Edit, Selection, Render and Display modes are pretty much self-evident.
Edit mode is for entering default adjustments, previewing deformation and the apply FX operation. The other modes let you change parameters and areas affected.
The BOX mode lets you apply transformations to the entire field of dots (use control-key to scale).
Some other things to point out:
1. Multiple applications of an established set of deformation keyframes simply emphasizes the original deformation so that the displacement becomes exaggerated.
2. When you brush an area, you are changing the destination (green) points and their vectors. The source points stay in original position.
3. Applying the FX moves the image pixels' direction and distance… and interpolates the surrounding pixel positions accordingly.
So, what about the Random Mode (the crossed arrows)?
What happens in random mode is the destination points are automatically displaced in each frame, along randomly generated vectors to a specified distance (length) in each keyframe so, when the Apply FX Stack button is pressed, a multi=frame layer displaying a single image can be distorted/deformed on EVERY FRAME.
IMPORTANT TO NOTICE:
When you are in Random Mode, and you press play, EVERY FRAME BECOMES A KEYFRAME with NEW random vectors for EVERY source/destination pair. This results in a kind of frenzied deformation - without any interpolation at all. Useful for some situations, but not for most situations in my experience.
Simple Demo of OpticalFlowDeform FX
So how to use the POWER and EXPEDIENCY of random vector generation alongside the POWER and EXPEDIENCY of FX interpolation?
For me, it involves a tricky dance:
Using the Random (cross arrows) mode - ONLY to set individual keyframes.
Using the Brush (round) mode - ONLY for copying and pasting keys AND always for preview playback.
Often, I have to use the FX Stack UNDO key to backtrack as well.
Here is the workflow for creating three random vectored keyframe, source/destination fields, each 5 frames apart, copying the original random vector key to the 21st frame for a smooth loop.
1. Setup a layer with a single image for 20 frames.
2. With cursor on frame 1, select Random. Leave Seed at 123456. Set Length 10. Leave Variance on 10%.
3. Press keyframe icon.
4. Move cursor to frame 6 (keyframe is automatically added capturing new field of random vectors)
5. Move cursor to frame 11 (keyframe is automatically added capturing new field of random vectors)
6. Move cursor to frame 16 (keyframe is automatically added capturing new field of random vectors)
7. Move cursor to frame 21 (keyframe is automatically added capturing new field of random vectors)
8. Immediately select Brush (round)
9. Select keyframe @1, and copy it.
10. Select keyframe @21, and paste keyframe from frame 1.
11. Press play to view random interpolations of the green destination grid and blue vectors.
12. Apply FX Stack
Click to view Example: