Skip to main content

Template layers: random deviations and chroma key

The "Template" page sets random deviations of the layers. Each switch picks its own value anew for every copy. The limits of the spread are set by a slider with two handles. The main and additional video have separate sets of settings. Two independent chroma keys are on the same page.

How the two-handle slider works​

The left handle is the lower limit, the right one is the upper limit. The value is picked at random between them, anew for every copy. While the switch is off, the slider has no effect. The picked value is shown in the project results table.

Main video deviations​

SwitchWhat changesSlider limitsDefault
"Rotate the main video"layer rotation anglefrom -180° to +180°off, from -15 to 15
"Main video visibility"layer opacityfrom 1% to 100%off, from 15 to 35
"Corner rounding of the main video"layer corner radiusfrom 0% to 100%off, from 10 to 30
"Main video size"layer sizefrom -100% to +100%off, from -10 to 10

Additional video deviations​

The same four settings. The labels differ by one word:

  • "Rotate the additional video";
  • "Additional video visibility";
  • "Corner rounding of the additional video";
  • "Additional video size".

The slider limits and the defaults are the same as for the main video. The sets are separate: rotating the main video does not affect the additional one.

Corner rounding is inside the "Visibility" card​

The "Corner rounding of the main video" switch is inside the "Main video visibility" card. While visibility is off, the card is collapsed. Rounding is not on the screen at all.

The order is:

  1. Turn on "Main video visibility".
  2. "Corner rounding of the main video" appears in the expanded card.
  3. Set the radius with the slider.

When you turn on visibility with the mouse, rounding turns on with it. You can turn it off separately with its own switch. The additional video works the same way.

A side effect: visibility, once on, makes the layer semi-transparent. The default spread is from 15% to 35%. That is quite transparent. If you only need rounded corners, move both handles of the visibility slider to 100%. The layer stays opaque, and the corners are rounded.

What the radius in percent means​

The radius is set in percent. At 100% the corner is fully rounded: a rectangular layer becomes a "pill", a square one becomes a circle.

The radius is counted from half of the layer's short side: 100% gives full rounding, 50% gives a quarter of the short side.

Chroma key: background removal​

There are two chroma keys: "Main video chroma key" and "Additional video chroma key". Their settings are separate. Each removes a background of one color from its own layer. The removed area becomes transparent.

FieldWhat it setsDefault
"Mode"how color is compared"Chroma-based (green/blue background)"
"Select background color"the color that is removed#00FF00
"Tolerance, %"a number from 1 to 10030
"Edge feather, %"a number from 0 to 10010

Which mode to choose​

ModeWhat it is forWhat it does not do
"Chroma-based (green/blue background)"a real green or blue backgroundnot suitable for white, black and gray backgrounds
"RGB color (solid fill)"a solid even fill of any color, including white and blackcompares color exactly, so uneven lighting gets in its way

"Chroma-based" mode takes only chroma into account. Shadows and uneven lighting do not get in its way. For green and blue backgrounds, the colored fringe along the object edge is removed automatically.

What the two numbers set​

  • "Tolerance, %" - how much a pixel's color can differ from the selected one. A larger value removes more shades. Too large a tolerance removes parts of the object too.
  • "Edge feather, %" - how soft the edge of the cut-out is. At 0 the edge is hard. A larger value gives a smoother transition along the object edge.

Both numbers are fixed. They have no random spread. A random tolerance would change the background removal from copy to copy.

What is left behind the removed background​

A blurred backing. There will be no hole in the frame. The chroma key is not applied to the backing.

How to check the settings without creating a video​

Press "Create template". The frames on the canvas are shown with the background already removed. The current values are used, straight from the screen. Adjust the color and tolerance, open the window again and look at the result.

Which of these slow video creation​

Three settings redraw every frame entirely:

  • "Visibility" - an alpha channel is added to the frame;
  • "Corner rounding" - an alpha channel mask is built over the frame;
  • "Chroma key" - color is compared pixel by pixel.

The tooltips of the switches themselves also say this. Rotation and size cost noticeably less, as the table below shows.

The contribution of each setting to the project complexity estimate:

SettingContribution to complexity
"Main video chroma key"0.465
"Corner rounding of the additional video"0.361
"Additional video visibility"0.361
"Corner rounding of the main video"0.356
"Main video visibility"0.356
"Additional video chroma key"0.120
"Rotate the additional video"0.031
"Rotate the main video"0.023
"Use template" on its own0.0

These lines are shown in the "What the complexity is made of" window. Each starts with the word "Template".

The main video chroma key is the most expensive setting in the section. The main video takes up the whole frame, and color is compared over all its pixels. The additional video layer is smaller, so its contribution is smaller too.

Where to see what a copy got​

In the project results table. A column is shown when its switch is on:

  • "Template: Main video rotation";
  • "Template: Main video size";
  • "Template: Main video opacity";
  • "Template: Secondary video rotation";
  • "Template: Secondary video size";
  • "Template: Secondary video opacity".

Next to them are the "Template: Secondary video" and "Template: Secondary video start" columns.

FAQ​

Why can I not find corner rounding?​

It is inside the "Visibility" card. While visibility is off, the card is collapsed, and rounding is not on the screen. Turn on visibility, and the switch appears.

Why did the video become semi-transparent after I turned on visibility?​

That is how the setting itself works. The default spread is from 15% to 35%. Move both handles of the slider to 100% if you do not need transparency.

The chroma key removed part of the object. What should I do?​

Lower "Tolerance, %". With a large tolerance, shades of the object itself get removed. For a real green or blue background, choose the "Chroma-based (green/blue background)" mode.

The background is not fully removed. What should I do?​

Raise "Tolerance, %". Check the color in the "Select background color" field. For white, black and gray backgrounds, choose the "RGB color (solid fill)" mode.

Can I set different settings for the main and additional video?​

Yes. The sets of switches are separate; each layer has its own. This applies to rotation, size, visibility, rounding and chroma key.

What value makes the corners round?​

The radius is counted from half of the layer's short side. Full rounding is 100%.

Further reading​