CornerPin2D

The CornerPin2D node is designed to map the four corners of an image sequence to or from positions derived from tracking data. In practice, this node lets you replace any four-cornered feature with another image sequence. You can use it to place an image in an on-screen television, for example.

Before using this node, you should use the Tracker node to generate four tracks, one per corner, on the feature requiring replacement.

Note:  In order to populate the to and from fields with the right values, you need to create the CornerPin2D node with your input image selected in the Node Graph. If the CornerPin node is created as an unconnected node, the to and from fields use the root format values.

Inputs and Controls

Connection Type

Connection Name

Function

Input

unnamed

The image that will replace the feature tracked using the Tracker node.

Note that the CornerPin2D node should NOT be connected to the Tracker node or the Tracker node’s input image.

Control (UI)

Knob (Scripting)

Default Value

Function

CornerPin2D Tab

to1 xy

to1

N/A

Pin 1. This is the bottom left corner of the feature requiring replacement. You should link this control to the Tracker node’s tracking data for the bottom left track. To do so, Ctrl/Cmd+drag the animation button next to the track in the Tracker node on top of the animation button here. You shouldn’t adjust these values manually.

enable1

enable1

enabled

Enable or disable pin 1.

to2 xy

to2

N/A

Pin 2. This is the bottom right corner of the feature requiring replacement. You should link this control to the Tracker node’s tracking data for the bottom right track. To do so, Ctrl/Cmd+drag the animation button next to the track in the Tracker node on top of the animation button here. You shouldn’t adjust these values manually.

enable2

enable2

enabled

Enable or disable pin 2.

to3 xy

to3

N/A

Pin 3. This is the top right corner of the feature requiring replacement. You should link this control to the Tracker node’s tracking data for the top right track. To do so, Ctrl/Cmd+drag the animation button next to the track in the Tracker node on top of the animation button here. You shouldn’t adjust these values manually.

enable3

enable3

enabled

Enable or disable pin 3.

to4 xy

to4

N/A

Pin 4. This is the top left corner of the feature requiring replacement. You should link this control to the Tracker node’s tracking data for the top left track. To do so, Ctrl/Cmd+drag the animation button next to the track in the Tracker node on top of the animation button here. You shouldn’t adjust these values manually.

enable4

enable4

enabled

Enable or disable pin 4.

Copy ’from’

copy_from_to

N/A

Click to copy and paste the from1-4 values to the to1-4 values.

extra matrix

transform_matrix

N/A

Copy tracking information from a Roto/RotoPaint node to this matrix.

invert

invert

disabled

When enabled, the current to values are inverted.

filter

filter

Cubic

Select the filtering algorithm to use when remapping pixels from their original positions to new positions. This allows you to avoid problems with image quality, particularly in high contrast areas of the frame (where highly aliased, or jaggy, edges may appear if pixels are not filtered and retain their original values).

Impulse - remapped pixels carry their original values.

Cubic - remapped pixels receive some smoothing.

Keys - remapped pixels receive some smoothing, plus minor sharpening (as shown by the negative -y portions of the curve).

Simon - remapped pixels receive some smoothing, plus medium sharpening (as shown by the negative -y portions of the curve).

Rifman - remapped pixels receive some smoothing, plus significant sharpening (as shown by the negative -y portions of the curve).

Mitchell - remapped pixels receive some smoothing, plus blurring to hide pixelation.

Parzen - remapped pixels receive the greatest smoothing of all filters.

Notch - remapped pixels receive flat smoothing (which tends to hide moire patterns).

Lanczos4, Lanczos6, and Sinc4 - remapped pixels receive sharpening which can be useful for scaling down. Lanczos4 provides the least sharpening and Sinc4 the most.

clamp

clamp

disabled

When using filters that employ sharpening, such as Rifman and Lanczos, you may see a haloing effect. If necessary, check clamp to correct this problem.

black outside

black_outside

enabled

This renders as black pixels outside the image boundary, making it easier to layer the element over another. If you uncheck this control, the outside area is filled with the outermost pixels of the image sequence.

In most cases, you should keep black outside checked. However, you may want to turn this off for camera shake, or if you want to texture-map or intersect the output with a similar shape.

Note:  Enabling black outside also adds a solid alpha covering the input image area if no alpha is present.

motionblur

motionblur

0

Sets the number of motion blur samples. A value of 1 should produce reasonable results for most sequences.

Increase the value to produce more samples for higher quality, or decrease it to shorten the processing time. The higher the value, the smoother the result.

shutter

shutter

0.5

Enter the number of frames the shutter stays open when motion blurring. For example, a value of 0.5 corresponds to half a frame. Increasing the value produces more blur, and decreasing the value less.

shutter offset

shutteroffset

start

This value controls how the shutter behaves with respect to the current frame value. It has four options:

centred - center the shutter around the current frame. For example, if you set the shutter value to 1 and your current frame is 30, the shutter stays open from frame 29,5 to 30,5.

start - open the shutter at the current frame. For example, if you set the shutter value to 1 and your current frame is 30, the shutter stays open from frame 30 to 31.

end - close the shutter at the current frame. For example, if you set the shutter value to 1 and your current frame is 30, the shutter stays open from frame 29 to 30.

custom - open the shutter at the time you specify. In the field next to the dropdown menu, enter a value (in frames) you want to add to the current frame. To open the shutter before the current frame, enter a negative value. For example, a value of - 0.5 would open the shutter half a frame before the current frame.

shuttercustomoffset

0

If the shutter offset control is set to custom, this field is used to set the time that the shutter opens by adding it to the current frame. Values are in frames, so -0.5 would open the shutter half a frame before the current frame.

From Tab

from1 xy

from1

N/A

This value is identical to the original to1 value (bottom left), and you can change this value manually to adjust the corner pin result. You can, for example, make your result bigger than the original tracked polygon area by giving your corners new xy values, or reposition the corners to get a mirrored image.

from2 xy

from2

N/A

This value is identical to the original to2 value (bottom right), and you can change this value manually to adjust the corner pin result. You can, for example, make your result bigger than the original tracked polygon area by giving your corners new xy values, or reposition the corners to get a mirrored image.

from3 xy

from3

N/A

This value is identical to the original to3 value (top right), and you can change this value manually to adjust the corner pin result. You can, for example, make your result bigger than the original tracked polygon area by giving your corners new xy values, or reposition the corners to get a mirrored image.

from4 xy

from4

N/A

This value is identical to the original to4 value (top left), and you can change this value manually to adjust the corner pin result. You can, for example, make your result bigger than the original tracked polygon area by giving your corners new xy values, or reposition the corners to get a mirrored image.

Set to input

set_to_input

N/A

Click to set the from values to the input format.

Copy 'to' copy_from_to N/A Click to copy and paste the to1-4 values to the from1-4 values.

Step-by-Step Guides

Applying Tracking Data