Patch nodes (or Patches) such as Rectangle, BezierWarp, QuadWarp, and others (see the full list of patch nodes) are designed to apply various types of image* geometry correction (warping), transformation, arrangement, and mapping. Extensive control for the patch management is provided in the Patch Editor integrated into the Canvas (or RenderTarget) Editor widget.** In addition, most operations with the patches can be performed directly from a computer keyboard connected to the Server.
*The term “image” refers to any static or dynamic media (i.e. video).
**To access the Patch Editor, add the Canvas (or RenderTarget) Editor widget to your workspace in the Screenberry Panel and select the Patches option in the view mode dropdown menu (at the top left).
Patch Editor View
The Patch Editor view: (1) Work area interface controls bar, (2) Work Area which is split into two parts: (A) Geometry Layout Area, and (B) UV Layout Area, (3) Displays and Patches List, (4) Settings panel.
Work Area Interface Controls
Show/Hide Layout Areas
Users can choose to display only the Geometry Layout Area or the UV Layout Area, or both by clicking the button on the interface controls bar to open a multi-select dropdown.
Horizontal and Vertical Split Views
To switch between the horizontal and vertical Geometry and UV Layout split views, use the / toggle switch in the interface controls bar.
Zoom and Pan Functions
Тo zoom in and out a specific area in the Geometry Layout Area or UV Layout Area of the Patch Editor, move the mouse cursor to the location, and use the mouse scroll wheel. Alternatively, click the button in the top right corner and move the mouse to change the magnification.
To pan a view, do one of the following:
- Hold the mouse scroll wheel button (or the Alt key) while moving the mouse.
- Click the button in the top right corner and move the mouse.
Adding a Patch
Patch nodes are added in the Node Graph (see Adding Nodes). In a typical setup, a patch node is connected to the source image node on the input and the Display or Canvas node on the output.
The BezierWarp receives input from the Media Player and sends output to the Canvas
Deleting a Patch
To delete a patch, right-click on the patch name in the Displays and Patches List and select Delete Patch from the dropdown menu, or delete the related patch node in the Node Graph.
Selecting a Patch for Editing
To select a patch for editing, сlick on the patch name in the Displays and Patches List in the Canvas (or RenderTarget) Editor widget and make sure that the Patches option is selected in the view mode dropdown menu.
To switch between patches, do one of the following:
- Press the Z key to go to the next patch, or press Shift + Z to go to the previous patch,
- Right-click in the Patch Editor work area and choose Select Next Patch or Select Previous Patch from the dropdown menu.
When a particular patch is selected, its Settings panel opens to provide control over its parameters.
Multiple patches can be selected at once by Ctrl-clicking or Shift-clicking on the patch names in the Displays and Patches List.
Modifying Image Geometry with Control Points
In the Geometry Layout Area, select and drag the circular handles of the mesh control points to change the image geometry.
Multiple control points can be selected at once by Shift-clicking them one by one, or left-clicking and dragging a marquee selection box around them.
It is recommended to have visual control over Screenberry output while making adjustments.
Adjusting UV Mapping
In the UV Layout Area, select and drag the circular handles to modify the control point coordinates of mapping mesh for the source image.
The mapping mesh should not extend beyond the edges of the source image.
Setting Control Points Coordinates
To show control points coordinates, press the Spacebar, or right-click in the Patch Editor work area and select Show Coordinates from the dropdown menu.
To change control point coordinates manually, select the control point and press the Enter key, or right-click on the control point and select Set Position from the dropdown menu. Enter X and Y coordinates in the dialog window.
The coordinate origin (0,0) is located at the top-left corner.
Flipping and Rotating the Patch Indexes
You can apply a vertical flip or 90 degrees clockwise rotation to the source media in the Geometry Layout Area, or to a UV selection in the UV Layout Area.
To flip, select a control point and press the F key, or right-click on a control point and select Transform>Flip from the dropdown menu.
To rotate, select a control point and press the R key, or right-click on a control point and select Transform>Rotate Indexes from the dropdown menu.
Selecting a control point when flipping or rotating the image helps to understand which transformation has been performed in relation to geometry and UV layouts.
Modifying Density of a Mesh Grid
You can change the density of the mesh grid to achieve more control over the image geometry correction.
To change the mesh grid density, use the related keyboard shortcut, or right-click in the Patch Editor work area and select Subdivide/Merge/[Function] from the dropdown menu.
Available functions and related keyboard shortcuts:
Increase Subdivision (Ctrl + X) splits the edges and faces by cutting them in half, and adding new vertices.
Decrease Subdivision (Ctrl + Shift + X) combines the neighboring polygons by removing their shared boundary.
Subdivide Columns (Ctrl + Shift + Right) splits the edges and faces of all columns by cutting them in half, and adding new vertices.
Merge Columns (Ctrl + Shift + Left) combines the neighboring polygons of all columns by removing their shared boundary.
Subdivide Rows (Ctrl + Shift + Up) splits the edges and faces of all rows by cutting them in half, and adding new vertices.
Merge Rows (Ctrl + Shift + Down) combines the neighboring polygons of all rows by removing their shared boundary.
When the position of the control points is edited, the green dotted horizontal and vertical smart guides are displayed. They provide a visual reference to the previous coordinates of the control point and help with its alignment along the prior axes.
In addition, when the position of the control points for the Rectangle patch in the Geometry Layout Area is modified, the diagonal white dotted smart guide, which corresponds to the aspect ratio of the source image based on its UV coordinates, is also displayed.
To add custom guidelines, right-click in the Patch Editor layout area and select Guideline Editor from the dropdown menu. In the dialog box, do one of the following:
- Create the guideline grid by entering the number of Columns and Rows and pressing the Add Grid button.
- Add individual guidelines by entering their coordinates and pressing the Add Horizontal Guideline or Add Vertical Guideline buttons.
Press the Clear All button if you want to remove all guidelines. After the guidelines setup is finished, press the OK button to add guidelines to the layout area.
By default, the automatic snapping option is enabled. When you change the position of a control point, it snaps to the guidelines, smart guides, output canvas edges, and other control points if placed near them. To disable snapping temporarily while dragging a control point, hold down the Shift key.
Vertical and Horizontal Alignment of the Control Points
To align the selected control points horizontally press Shift + H or right-click on the selected control points and choose Align Horizontally from the dropdown menu.
To align the selected control points vertically press Shift + V or right-click on the selected control points and choose Align Vertically from the dropdown menu.
While editing, you can also constrain the movement of the control points:
- To the horizontal axis by pressing the H key or right-clicking on the control point and selecting Constrain Horizontally from the dropdown menu.
- To the vertical axis by pressing the V key or right-clicking on the control point and selecting Constrain Vertically from the dropdown menu.
Setting the Background Image
Setting the background image provides visual cues for the finer positioning of control points. Selecting the layout area and pressing the F5 key sets / refreshes the background image to the following:
- In the Geometry Layout Area – the snapshot of the current video output of the media server.
- In the UV Layout Area – the snapshot of the source feed received by the patch.
Pressing Shift + F5 removes the background image.
To set the uploaded file (for example, the photo of the object the warping is applied to) as a background image, press Shift + F5 or right-click in the Patch Editor work area and select Set Background Image from File from the dropdown menu.
Selecting a Display Mode for the Output
You can select one of the three available display modes by choosing the View Mode parameter in the Settings panel of the patch:
- Texture shows the output image only.
- Texture + Cage shows the output image and mesh grid (red lines).
- Texture + Wireframe shows the output image, mesh grid (red lines), and subdivision wireframe (grey lines).
Modifying Density of a Subdivision Wireframe
The overall smoothness of the output image (the result of warping applied by the patch) can be improved by increasing the density of a subdivision wireframe. This results in a finer warping grid.
You can change the number of subdivisions by entering a value for the Subdivisions parameter in the Settings panel of the patch. The maximum value is 256, the minimum is 1, and the default is 5.
An example of how changing the wireframe subdivisions from 5 to 20 improves the smoothness of the output image
The number of subdivisions determines the wireframe density. A higher grid density increases warping precision but requires more processing time, a lower one does the opposite.
Selecting the Interpolation Algorithm
You can choose the Linear or Nearest-neighbor interpolation algorithm for translating pixel values of the patch by selecting the Scaling Algorithm parameter in the Settings panel.
Changing Patch Opacity and Edge Transparency
To change the patch opacity, enter a value for the Opacity parameter in the Settings panel.
To feather the edges of a patch, enter the number of pixels for the Soft Edge parameter in the Settings panel of the patch.
Applying Transformations to the Patch
Various transformations can be applied to the patch by using the transformation matrix. Click the Edit button for the Transform Matrix parameter in the Settings panel of the patch to edit the matrix values.
Examples of transformations:
sx specifies the scale factor along the x-axis.
sy specifies the scale factor along the y-axis.
tx specifies the displacement along the x-axis.
ty specifies the displacement along the y-axis.
shx specifies the shear factor along the x-axis.
shy specifies the shear factor along the y-axis.
tx specifies the tilt factor along the x-axis.
ty specifies the tilt factor along the y-axis.
Locking Patch Geometry
To avoid further (accidental) editing of the patch geometry, select the Lock Geometry checkbox in the Settings panel of the patch.
Patches with the Lock Geometry checkbox selected are skipped during cycling through the patches using Z (next patch) and Shift + Z (previous patch) keyboard shortcuts directly on the Server.
Using the GridImage Node as a Test Pattern
For more efficient and convenient patch editing, it is recommended to use the GridImage node connected to the patch node as the source image.
The GridImage node generates a test grid pattern that can be modified using various parameters in the node settings.
A default test grid pattern generated by the GridImage node
Restoring Patch Default Settings
To restore the default settings of a patch, right-click on the patch name in the Displays and Patches List and select Reset Patch from the dropdown menu.
Using Keyboard Shortcuts to Edit Patches
Keyboard shortcuts can be used for more effective patch editing. If necessary, manual calibration can also be performed directly on the Server, without using the Screenberry Panel, and requires only a keyboard connected to the Server computer. Keyboard shortcuts list:
|Enter/Exit calibration mode (local only)||Ctrl + C|
|Open help screen with the keyboard shortcuts list (only F1 works in the Screenberry Panel)||H or F1|
|Undo||Ctrl + Z|
|Redo||Ctrl + Shift + Z or Ctrl + Y|
|Select the next patch||Z|
|Select the previous patch||Shift + Z|
|Patch Editing Mode Selection|
|Switch to Geometry mode (the patch mesh lines are shown in red). Pressing G in Geometry mode shows / hides the subdivision grid.||G|
|Switch to UV mode (the patch mesh lines are shown in green).||U|
|Switch to Compensated mode (the patch mesh lines are shown in blue). This mode allows the editing of Geometry and UV simultaneously.||Y|
|Show / Hide the subdivision grid for all patches (Server shortcut only)||Space|
|Control points operations|
|Select a control point||Arrow keys|
|Select faces inside the mesh (Server shortcut, the TriMesh patch only)||Ctrl + Arrow keys|
|Move control point||W, S, A, D|
|Move control point in smaller increments||Shift + W, S, A, D|
|Move all control points at once||Ctrl + W, S, A, D|
|Scale all control points at once||Alt + W, S, A, D|
|Increase increment||+ or =|
|Decrease increment||– or _|
|Reset increment to the default value (1%)||0|
|Rotate and flip operations|
|Rotate all control points clockwise around the selected control point||E|
|Rotate all control points counterclockwise around to the selected control point||Q|
|Rotate all control points clockwise around the selected control point in smaller increments||Shift + E|
|Rotate all control points counterclockwise around the selected control point in smaller increments||Shift + Q|
|Flip the image vertically||F|
|Rotate the image 90 degrees clockwise||R|
|Change the direction of selected control point handle 90 degrees clockwise (Server shortcut only)||Ctrl + E|
|Change the direction of selected control point handle 90 degrees counterclockwise (Server shortcut only)||Ctrl + Q|
|Change the direction of selected control point handle clockwise in smaller increments (Server shortcut only)||Ctrl + Shift + E|
|Change the direction of selected control point handle counterclockwise in smaller increments (Server shortcut only)||Ctrl + Shift + Q|
|Reset patch geometry||Ctrl + R|
|Rebuild blending maps if the Blender node is connected||Ctrl + B|
|Increase grid subdivision||Ctrl + + (plus)|
|Decrease grid subdivision||Ctrl + – (minus)|
|Grid subdivision density modification|
|Increase grid subdivision||Ctrl + X|
|Decrease grid subdivision||Ctrl + Shift + X|
|Increase grid columns subdivision||Ctrl + Shift + Right|
|Decrease grid columns subdivision||Ctrl + Shift + Left|
|Increase grid rows subdivision||Ctrl + Shift + Up|
|Decrease grid rows subdivision||Ctrl + Shift + Down|
Visual Examples of Using Keyboard Shortcuts on the Server
Selecting the Patch
Patch Editing Mode Selection
Selecting and Moving Control Points
Selecting Faces of the Patch Mesh (only for the TriangleMesh patch)
Moving and Scaling All Control Points of the Patch Mesh at Once
Changing the Editing Step Increment
Flipping and Rotating the Patch Mesh
Changing the Direction of the Control Point Handle
Modifying the density of the patch grid