From 6b5d8cbf82a53444d0a889d0fd0133f8b81882f5 Mon Sep 17 00:00:00 2001 From: Andrea-Paz <50440321+Andrea-Paz@users.noreply.github.com> Date: Mon, 2 Sep 2019 22:51:07 +0200 Subject: [PATCH 1/1] Add files via upload some chapter's modify --- parts/Glossary.tex | 84 ++++++++++++++- parts/Overlays.tex | 206 +++++++++++++++++++++++++++++++++++++ parts/Rendering.tex | 87 +++++++++++++++- parts/Windows.tex | 246 +++++++++++++++++++++++++++++++++----------- 4 files changed, 556 insertions(+), 67 deletions(-) create mode 100644 parts/Overlays.tex diff --git a/parts/Glossary.tex b/parts/Glossary.tex index 1be4d9d..3388ba7 100644 --- a/parts/Glossary.tex +++ b/parts/Glossary.tex @@ -30,11 +30,13 @@ \nomenclature{\textbf{Clip}}{a short segment of media which was usually part of a longer recording. A section of a project consisting of a set of timeline selected edits treated as an independent object.} +\nomenclature{\textbf{Clipping}}{to set a data value above an threshold to be equal to that threshold.} + \nomenclature{\textbf{Codec}}{contraction of \textbf{co}der and \textbf{dec}oder; used to generally compress media and decompress to reproduce it. Results are a trade-off between bitrate and quality.} -\nomenclature{\textbf{Color correction}}{minimizing error between the image and the original object. Or, another common meaning is: to make the color perception more pleasing.} +\nomenclature{\textbf{Color correction}}{minimizing error between the image and the original object. Corrects exposure and color dominants. There is the primary CC, which covers the entire frame; and the secondary CC, which isolates and intervenes only on specific parts of the frame.} -\nomenclature{\textbf{Color grading}}{the process of adjusting color balance making it consistent in every scene. Often used with the same meaning as color correction.} +\nomenclature{\textbf{Color grading}}{Correct the color and contrast of a shot to personalize it and make it more nicer or communicative. An example is the Teal \& Orange, which is widely used in Hollywood movies.} \nomenclature{\textbf{Color model}}{an abstract mathematical model describing the way colors can be represented as an ordered list of numbers, typically as three values or color components (for example, RGB).} @@ -140,6 +142,8 @@ \nomenclature{\textbf{Picons}}{miniature images, also called thumbnails, of the video. In the Resources Window they represent the first frame of the asset. On the Timeline they imitate a physical film and are derived from the video data in the media file.} +\nomenclature{\textbf{Pillarbox}}{blacks bars on the top and bottom and/or left and right side of the frame. They are due to a smaller frame size than the one set in the project.} + \nomenclature{\textbf{Pixel}}{the smallest independent unit of a digital image; a minute area of illumination on a display screen, one of many from which an image is composed. Word was invented from picture element. In the 3D world, this is call a voxel.} \nomenclature{\textbf{Plugin}}{program fragment that is loaded on demand as in “plugged in”. In Cinelerra, these are often called “effects” and are used to provide a specific function on demand.} @@ -232,7 +236,81 @@ \nomenclature{\textbf{XML}}{the language Cinelerra EDLs are written in. Extensible Markup Language (XML) is a general-purpose language that combines text and extra information about the text and allows users to make modifications. It creates a text representation of a data object that is designed to be relatively human-legible.} -\nomenclature{\textbf{YUV}}{contracted name for YCrCb, which stands for the Y luminance, Complement Red, and Complement Blue. Colors are stored as absolute luma representation and the difference signal between luma and chroma complement components. This color model is used by PAL and NTSC standards. Y stands for the luma component and U and V are the chroma components. U and V are actually color difference components (respectively R-Y and B-Y). In fact YUV signals are created from an original RGB source. The weighted values of R, G, and B are added together to produce a single Y signal, representing the overall luma. The U signal is then created by subtracting the Y from the blue signal of the original RGB, and then scaling; V is created by subtracting the Y from the red, and then scaling by a different factor. Previous black-and-white systems used only luma (Y) information and color information (U and V) was added so that a black-and-white receiver would still be able to display a color picture as a normal black and white picture.} +\nomenclature{\textbf{YUV}}{is a color model which splits luma from chroma, similarly to human sight.. Colors are stored as absolute luma representation and the difference signal between luma and chroma complement components. This color model is used by PAL and NTSC standards. Y stands for the luma component and U and V are the chroma components. U and V are actually color difference components (respectively R-Y and B-Y). In fact YUV signals are created from an original RGB source. The weighted values of R, G, and B are added together to produce a single Y signal, representing the overall luma. The U signal is then created by subtracting the Y from the blue signal of the original RGB, and then scaling; V is created by subtracting the Y from the red, and then scaling by a different factor. Previous black-and-white systems used only luma (Y) information and color information (U and V) was added so that a black-and-white receiver would still be able to display a color picture as a normal black and white picture.} + +\nomenclature{\textbf{8 / 10-bit images}}{images that were sampled at 8 or 10 bits per channel. The tone range for each channel is from 0 to 255 for 8-bit and from 0 to 1023 for 10-bit.} + +\nomenclature{\textbf{Algorithm}}{set of instructions, typically to solve a class of problems or perform a computation.} + +\nomenclature{\textbf{Aliasing}}{incorrect sampling of a video or audio signal that leads to unwanted artifacts because it cannot distinguish values too close. There is Temporal Aliasing (audio) and Spatial Aliasing (video).} + +\nomenclature{\textbf{B-spline}}{(basis spline) polynomial curves characterized by nodes and control points to obtain smooth curves.} + +\nomenclature{\textbf{Banding}}{Incorrect display of a color gradient, due to a narrow tonal range, which leads to the appearance of color bands instead of fading tones.} + +\nomenclature{\textbf{Bayer array}}{is a color filter array upon a sensor to get an RGB image. The filter pattern is 50\% green, 25\% red and 25\% blue.} + +\nomenclature{\textbf{Bicubic filter}}{is a mathematical interpolation to resample an image. It produces a smoother result than the nearest-neighbor or the bilinear filter.} + +\nomenclature{\textbf{Bilinear filter}}{is a mathematical interpolation to resample an image. It produces a smoother result than the nearest-neighbor.} + +\nomenclature{\textbf{Bit depth}}{Quantization of an audio or video signal. Color depth is the number of bits used for each color component of a single pixel. Audio bit depth is the number of bits of information in each sample.} + +\nomenclature{\textbf{Black point}}{the part of the image with the darkest value that can be displayed on a device. At the limit is 0 (pure black).} + +\nomenclature{\textbf{Color space}}{organization of the colors of a color model, limited to the gamut of a particular device. Examples are sRGB and rec 709.} + +\nomenclature{\textbf{Color timing}}{the process of adjusting color balance making it consistent in every scene. We also talk about color matching scene to scene or shot matching.} + +\nomenclature{\textbf{Composite}}{the combination of two or more video layers to obtain a single composition.} + +\nomenclature{\textbf{Contrast}}{is the difference in luminance of parts or elements of an image that makes them distinguishable. The greater the difference, the greater the contrast. It is the horizontal range shown by the histogram or the vertical range shown by the waveform.} + +\nomenclature{\textbf{Denoise}}{is the process of removing digital noise from a video. The three main types are based on statistical methods, transform wavelets and temporal averaging.} + +\nomenclature{\textbf{DeSpill}}{process to remove background color contamination from the edges of the subject in foreground, during a chroma key.} + +\nomenclature{\textbf{Digital Intermediate (DI)}}{Over time it has taken on different meanings. For Cinelerra GG is meant as the creation of a high quality file that during the various stages of editing and color correction keeps as much information as possible. Being little or uncompressed its manipulation is also faster and more efficient.} + +\nomenclature{\textbf{Dynamic range}}{is the ratio between the largest and smallest values (luminance) that an image can assume. The larger the size, the better we can distinguish details in the dark and light parts.} + +\nomenclature{\textbf{Exposure}}{the exposure is the amount of light per unit area reaching an image sensor, as determined by shutter speed, lens aperture and scene luminance.} + +\nomenclature{\textbf{Floating point}}{real numbers with decimals. They allow for greater precision in calculations than integers, but they require more processing power.} + +\nomenclature{\textbf{Gamut}}{In color reproduction, the gamut is a certain complete subset of colors. The larger the gamut of a device (associated with a color space) the more colors can be displayed.} + +\nomenclature{\textbf{HDR images}}{are images that have a dynamic range larger than that of the sensor used. They are created directly with a rendering or with the merge of several images at low dynamic range. They require the use of floating points.} + +\nomenclature{\textbf{HDTV}}{(high definition TV) standard characterized by a 16:9 aspect ratio, various frames rates and scan modes and with a resolution of at least 1080.} + +\nomenclature{\textbf{Lanczos}}{algorithm for high quality resampling video signal. It is also used in case of upsampling, weak point of other similar filters.} + +\nomenclature{\textbf{Letterbox}}{blacks bars on the top and bottom side of the frame. They are due to a smaller frame size than the one set in the project (see also Pillarbox).} + +\nomenclature{\textbf{LUT, 3D LUT}}{(LookUp Table) used to map one color space to another. Cinelerra GG uses them through ffmpeg filters. There are downloadable collections or there are specific ones provided by hardware manufacturers.} + +\nomenclature{\textbf{Nearest neighbor}}{is the simplest method of resampling an image. It is fast and resources saving, but produces less smooth results.} + +\nomenclature{\textbf{Panning}}{in video technology, panning refers to the horizontal scrolling of an image wider than the display. In Cinelerra it is done (together with other camera movements) with the camera tool.} + +\nomenclature{\textbf{Pillarbox}}{blacks bars on the left and right side of the frame. They are due to a smaller frame size than the one set in the project (see also Letterbox).} + +\nomenclature{\textbf{Rec 709}}{(BT.709 or ITU 709) is the standard color space of high-definition television, having 16:9 aspect ratio, scan modes and frame rate of HDTV. It can decode at 8 or 10 bits per channel. The gamut is the same as for sRGB from which it differs for the 2.4 gamma.} + +\nomenclature{\textbf{Retiming}}{is the change of the speed of a edit by interpolating the original frames to a new in between frame.} + +\nomenclature{\textbf{sRGB}}{is an RGB color space used on monitors, printers, and the Internet. It can decode at 8 or 10 bits per channel. The gamut is the same as for Rec 709 from which it differs for the 2.2 gamma.} + +\nomenclature{\textbf{Subsampling}}{is the practice of encoding Y’CbCr images by implementing less resolution for chroma information than for luma information. Depending on the amount of information deleted we have: 4:4:4 (lossless); 4:2:2 (HDTV); 4:2:0 (DVD, smartphone) or 4:1:1.} + +\nomenclature{\textbf{Timecode}}{is a sequence of numeric codes generated at regular intervals by a timing synchronization system and recorded into audio and/or video tracks. It is used for synchronization audio and video clips.} + +\nomenclature{\textbf{White point}}{is the clearest part of an image that can be displayed on a device; at the limit is 1.0 value (pure white).} + +\nomenclature{\textbf{YCbCr}}{is a color space based on the YUV color model, widely used in broadcast productions. It separates the luma part (Y) from the chroma part (Cb and Cr).} + + diff --git a/parts/Overlays.tex b/parts/Overlays.tex new file mode 100644 index 0000000..06e27a2 --- /dev/null +++ b/parts/Overlays.tex @@ -0,0 +1,206 @@ +\chapter{Overlays}% +\label{cha:overlays} +\todo{same wrong border for title's number} + +The purpose of the Overlay Modes is to control the foreground and background stacking and use blending to reshape image object boundaries. It normally makes use of a binary type alpha blending system for all in or all out. To use the available operations in Cinelerra GG, follow these steps: + +\begin{enumerate} + \item In the main window, look at the Patchbay on the far left. + \item Click on the small arrow that points to the right, inside the panel to see it expand. + \item A down arrow shows up with a tooltip of \textit{overlay mode}. + \item Use the down arrow to get to the popup menu and choose the desired effect from the 30 possibilities. \textit{Normal} is the default. +\end{enumerate} + +Figure~\ref{fig:overlay-01} shows the pulldown in the patchbay and the tool tip \textit{Overlay mode} which provides access to 4 types of overlays. Each will expand further as shown in the screenshots below for \textit{PorterDuffs} and \textit{graphic art}. + +\begin{figure}[htpb] + \centering + \includegraphics[width=0.8\linewidth]{images/overlay-01.png} + \caption{Patchbay pulldown with Porter Duff and Graphic Art overlays expanded} + \label{fig:overlay-01} +\end{figure} + +Porter-Duff is the industry standard for alpha blending operations. Only a short explanation follows here, but there is much more information to be found on the internet with complete descriptions and examples. Every pixel has 3 color channels (like RGB), and may have 1 alpha channel value. If there is no alpha defined for a color model, the alpha value is assumed to be 1. Regions of the image are created with the alpha image map. These regions are manipulated using the blending operations described below. Alpha blending is the process of combining a foreground color with a background color which produces a new blended color. The \textit{alpha} channel describes how much opacity is present in a pixel. It may be completely transparent, completely opaque, or any range of translucency. + +Conceptually, when the foreground color is completely opaque, the resulting blended color will be the foreground color. If it is transparent, the blended color will be the color of the background. When the value of the alpha channel is $1$, the image is all there, if it is $0$, there is no image at all, otherwise it is only partially there. In other words, the alpha value goes from $0$ to $1$, where full transparency is $0$ and opaque is represented by $1$. Alpha blending models opacity. + +When blending source and destination shapes (Dst and Src), the shape boundaries can be changed with the alpha blending effects. There are a total of 10 standard Porter-Duff operators, but there are 30 possible overlay modes used in Cinelerra-GG. Each is characterized by its value in the four regions: source, destination and both, with the \textit{neither} region always being blank. The source and destination regions can either be blank or filled with the source or destination colors. A specific compositing math formula is used to calculate effect. This is only applicable to RGB; some effort has been made to accommodate YUV, but the effects are not as predictable, and may not be useful. + +Below, in figure~\ref{fig:normal}, are the results of utilizing the 30 available operations within Cinelerra as listed on a following page. Src is the solid green rectangle and Dst is the solid red rectangle. There are better illustrations of what alpha blending can do, however for consistency sake, these are the results when using standards. + +\begin{figure}[htpb] + \centering + \includegraphics[width=0.84\linewidth]{images/normal.png} + \caption{Normal and Arithmetic overlays} + \label{fig:normal} +\end{figure} + +\begin{figure}[htpb] + \centering + \includegraphics[width=0.84\linewidth]{images/porter-duff.png} + \caption{Porter Duff overlays} +\end{figure} + +\begin{figure}[htpb] + \centering + \includegraphics[width=0.84\linewidth]{images/logical.png} + \caption{Logical overlays} +\end{figure} + +\begin{figure}[htpb] + \centering + \includegraphics[width=0.84\linewidth]{images/graphic-art.png} + \caption{Graphic Art overlays} +\end{figure} + +\section{Math algorithms}% +\label{sec:math_algorithms} + +The implementation math forms are subsequently listed, where: + +\vspace{2ex} +\begin{lstlisting}[language=bash] +Legend: +D = Destination +S = Source +a = alpha +c = chroma (color) +|| = OR (logical operator); +? : = if (true/false) ... then (conditional ternary operator) +\end{lstlisting} + +Each line describes a pair with the left one for alpha and the right one for chroma. + +\subsection*{Normal}% +\label{sub:normal} + +\begin{description} + \item[NORMAL:] $[Sa + Da \times (1 - Sa), Sc \times Sa + Dc \times(1 - Sa)])$ +\end{description} + +\subsection*{Arithmetic:}% +\label{sub:arithmetic} + +\begin{description} + \item[ADDITION:] $[(Sa + Da), (Sc + Dc)]$ + \item[SUBTRACT:] $[(Sa - Da), (Sc - Dc)]$ + \item[MULTIPLY:] $[Sa + Da - Sa \times Da, Sc\times(1 - Da) + Dc\times (1 - Sa) + Sc \times Dc]$ + \item[DIVIDE:] $[Sa + Da - Sa \times Da, Sc\times(1 - Da) + Dc \times (1 - Sa) + Sc/Dc]$ + \item[REPLACE:] $[Sa, Sc]$ (fade = 1) +\end{description} + +\subsection*{Porter-Duff}% +\label{sub:porter-duff} + +\begin{description} + \item[DST:] $[Da, Dc]$ + \item[DST\_ATOP:] $[Sa, Sc \times (1 - Da) + Dc \times Sa]$ + \item[DST\_IN:] $[Da \times Sa, Dc \times Sa]$ + \item[DST\_OUT:] $[Da \times (1 - Sa), Dc \times (1 - Sa)]$ + \item[DST\_OVER:] $[Sa + Da - Sa \times Da, Sc \times (1 - Da) + Dc]$ + \item[SRC:] $[Sa, Sc]$ + \item[SRC\_ATOP:] $[Da, Sc \times Da + Dc \times (1 - Sa)]$ + \item[SRC\_IN] $[Sa \times Da, Sc \times Da]$ + \item[SRC\_OUT:] $[Sa \times (1 - Da), Sc \times (1 - Da)]$ + \item[SRC\_OVER:] $[Sa + Da - Sa \times Da, Sc + (1 - Sa) \times Dc]$ +\end{description} + +\subsection*{Logical}% +\label{sub:logical} + +\begin{description} + \item[MIN:] $[min(Sa, Da), MIN(Sc, Dc)]$ + \item[MAX:] $[max(Sa, Da), MAX(Sc, Dc)]$ + \item[LIGHTEN:] $[Sa + Da - Sa \times Da, Sc \times (1 - Da) + Dc \times (1 - Sa) + max(Sc \times Da, Dc \times Sa)]$ + \item[DARKEN:] $[Sa + Da - Sa \times Da, Sc \times (1 - Da) + Dc \times (1 - Sa) + min(Sc \times Da, Dc \times Sa)]$ + \item[AND:] $[Sa \times Da, Sc \times Dc]$ + \item[OR:] $[Sa + Da - Sa \times Da, Sc + Dc - Sc \times Dc]$ + \item[XOR:] $[Sa + Da - 2 \times Sa \times Da, Sc \times (1 - Da) + Dc \times (1 - Sa)]$ +\end{description} + +\subsection*{Graphical Art}% +\label{sub:graphical_art} + +\begin{description} + \item[OVERLAY:] $[Sa + Da - Sa \times Da, Sc \times (1 - Da) + Dc \times (1 - Sa) + 2 \times Dc < Da \quad ? \quad 2 \times Sc \times Dc : Sa \times Da - 2 \times s (Da-Dc) \times (Sa-Sc) ]$ + \item[SCREEN:] $[Sa + Da - Sa \times Da, Sc + Dc - (Sc \times Dc)]$ (same as OR) + \item[BURN:] $[Sa + Da - Sa \times Da, Sc \times (1 - Da) + Dc \times (1 - Sa) + Sc \leqslant 0 \parallel Sc \times Da + Dc \times Sa \leqslant Sa \times Da \quad ? \quad 0 : (Sc \times Da + Dc \times Sa - Sa \times Da) \times Sa/Sc]$ + \item[DODGE:] $[Sa + Da - Sa \times Da, Sc \times (1 - Da) + Dc \times (1 - Sa) + Sa \leqslant Sc \parallel Sc \times Da + Dc \times Sa \geqslant Sa \times Da \quad ? \quad Sa \times Da : Dc \times Sa / (1 - Sc/Sa)]$ + \item[DIFFERENCE:] $[Sa + Da - Sa \times Da, Sc \times (1 - Da) + Dc \times (1 - Sa) + abs{(Sc \times Da - Dc \times Sa)}]$ + \item[HARDLIGHT:] $[Sa + Da - Sa \times Da, Sc \times (1 - Da) + Dc \times (1 - Sa) + 2 \times Sc < Sa \quad ? \quad 2 \times Sc \times Dc : Sa \times Da - 2 \times (Da - Dc) \times (Sa - Sc)]$ + \item[SOFTLIGHT:] $[Sa + Da - Sa \times Da, Sc \times (1 - Da) + Dc \times (1 - Sa) + Da > 0 \quad ? \quad (Dc \times Sa + 2 \times Sc \times (Da - Dc))/Da : 0]$ +\end{description} + +\section{Description}% +\label{sec:description} + +The previous math forms are the only truly accurate description of each blending operation, but short descriptions are below where \textit{Source} is the output from the next track and \textit{Destination} is the output from the lower track stacking. Blending starts with new Source and combines it with the previous render stack output, which is referred to as Destination. The new output becomes the next Destination and the next up stack level becomes the new Source. Source is above; Destination is below. + +Note: the Graphic Art group operates principally on color, and the others operate principally on alpha. + +\subsection*{Normal}% +\label{sub:normal2} + +\begin{description} + \item[Normal:] Normal mode is the default layer mode. The result color is the source color. The layer on top covers the layers below it. If you want to see anything below the top layer when you use this mode, the layer must have some transparent areas. It is \textit{stacked on top}. Math formula used is different than that used by Gimp; there is no SVG equivalent. +\end{description} + +\subsection*{Arithmetic Group:}% +\label{sub:arithmetic_group} + +Standard numerical operations. + +\begin{description} + \item[Addition:] The source is added to the destination and replaces the destination. Addition mode is very simple - the pixel values of the upper and lower layers are added to each other. The resulting image is normally brighter. The equation can result in color values greater than $255$, so some of the light colors may be clipped to the maximum value of $255$. Math formula is the same as that used by SVG but different than Gimp. + \item[Subtract:] Subtract mode reduces the pixel values of the upper layer by the pixel values of the lower layer. The resulting image is normally darker. You might get a lot of black or near-black in the resulting image. The equation can result in negative color values, so some of the dark colors may be clipped to the minimum value of $0$. Math formula used is different than that used by Gimp; there is no SVG equivalent. + \item[Multiply:] The source color is multiplied by the destination color and replaces the destination. The resulting color is always at least as dark as either the source or destination color. Multiplying any color with black results in black. Multiplying any color with white preserves the original color. Math formula is the same as used by SVG and Gimp. + \item[Divide:] Divides source color by destination color. If the source color is white, the result color is the underlying color. The resulting image is often lighter. Math formula used is different than that used by Gimp; there is no SVG equivalent. + \item[Replace:] Replace mode will cause any existing destination to be replaced by the source media. Mathematical formula used is the same as used by Gimp; there is no SVG equivalent. +\end{description} + +\subsection*{Porter-Duff Group}% +\label{sub:porter-duff_group} + +Industry standard compositing operators. + +\begin{description} + \item[DST:] The destination is left untouched. Only the destination will be present in the output. Math formula is the same as that used by Porter-Duff and SVG; there is no Gimp equivalent. + \item[DST\_ATOP:] The part of the destination lying inside of the source is composited over the source. The destination outside the source is dropped. You will see the existing canvas is only kept where the shapes overlap. Math formula is the same as that used by Porter-Duff and SVG; there is no Gimp equivalent. + \item[DST\_IN:] The part of the destination lying inside of the source is displayed. This effectively allows for cutting out the background using the current layer/feature as a mask. You will see the new shape is drawn only where both the source and the destination overlap. Math formula is the same as that used by Porter-Duff and SVG; there is no Gimp equivalent. + \item[DST\_OUT:] The part of the destination lying outside of the source is displayed. This is basically a reverse mask, compared to destination-in. You will see the existing content is kept where it doesn't overlap the source. Math formula is the same as that used by Porter-Duff and SVG; there is no Gimp equivalent. + \item[DST\_OVER:] The destination is composited over the source. Math formula is the same as that used by Porter-Duff and SVG; there is no Gimp equivalent. + \item[SRC:] The source is copied. The destination is not used as input. Only the source will be present in the output. Math formula is the same as that used by Porter-Duff \& SVG; there is no Gimp equivalent. + \item[SRC\_ATOP:] The part of the source lying inside of the destination is composited over the destination. The source outside the destination is dropped. You will see the existing canvas is only kept where the shapes overlap. Math formula is the same as that used by Porter-Duff and SVG; no Gimp equivalent. + \item[SRC\_IN:] The part of the source lying inside of the destination is displayed. This effectively allows the destination to act as a mask for the layer/feature being shown. You will see the new shape is drawn only where both the source and the destination canvas overlap. Math formula is the same as that used by Porter-Duff and SVG; there is no Gimp equivalent. + \item[SRC\_OUT:] The part of the source lying outside of the destination is displayed. This is basically a reverse mask, compared to source-in. You will see the new shape is drawn where it doesn't overlap the destination. Math formula is the same as that used by Porter-Duff and SVG; there is no Gimp equivalent. + \item[SRC\_OVER:] The source is composited over the destination. Math formula is the same as that used by Porter-Duff and SVG; there is no Gimp equivalent. +\end{description} + +\subsection*{Logical Group}% +\label{sub:logical_group} + +\begin{description} + \item[Min:] The output color is the component-wise minimum value of the source and destination colors. There is no SVG or Gimp equivalent math formula. + \item[Max:] The output color is the component-wise maximum value of the source and destination colors. There is no SVG or Gimp equivalent math formula. + \item[Lighten:] Selects the lighter of the destination and source colors. The destination is replaced with the source when the source is lighter, otherwise it is left unchanged. Completely black layers have no effect on the final image and completely white layers result in a white image. Math formula is the same as used by SVG and Gimp's \textit{lighten only}. + \item[Darken:] Selects the darker of the destination and source colors. The destination is replaced with the source when the source is darker, otherwise it is left unchanged. Completely white layers have no effect on the final image and completely black layers result in a black image. Math formula is the same as used by SVG and Gimp's \textit{darken only}. + \item[And:] This operation intersects source and destination. If either image is not white, it down factors the other image. Usually you will end up with a lot of darker areas. There is no SVG or Gimp equivalent math formula. + \item[Or] This operation is the union of the source and the destination. If either image is not black, it adds to the other image. Usually you will end up with a lot of lighter areas. Math formula is the same as that used by “Screen” operation in SVG; there is no Gimp equivalent. + \item[Xor:] The union of the source and destination with the intersection removed. Results in black if they are equal. Shapes are made transparent where both overlap, and drawn normal everywhere else. Math formula used is that used by Porter-Duff; there is no Gimp equivalent and SVG formula differs. +\end{description} + +\subsection*{Graphical Art Group}% +\label{sub:graphical_art_group} + +Typical operations from popular \textit{paint} packages. + +\begin{description} + \item[Overlay:] Multiplies or screens the colors, dependent on the destination color. Source color overlay the destination while preserving its highlights and shadows. The destination color is not replaced, but is mixed with the source color to reflect the lightness or darkness of the destination. Dark parts on the base layer become darker, and light parts become lighter. Math formula is same as SVG and Gimp. + \item[Screen:] The source and destination are complemented and then multiplied and then replace the destination. The resultant color is always at least as light as either of the two constituent colors. Screening any color with white produces white. Screening any color with black does not change the other layer. Using the Screen mode is similar to projecting multiple photographic slides simultaneously onto a single screen. A lighter picture is the result. Math formula is the same as used by SVG and Gimp. This is identical to \textit{OR}. + \item[Burn:] Darkens the destination color to reflect the source color. Burning with white produces no change. In photography, burning is a technique used in a darkroom to increase the exposure in particular areas of the image. This brings out details in the highlights. Math formula is the same as used by SVG and Gimp. + \item[Dodge:] Brightens the destination color to reflect the source color. Dodging with black produces no change. The result color is a lightening of the source color to reflect the underlying layer color by decreasing the contrast. If the source color is pure black, the result color is the underlying color. In photography, dodging is a technique used in a darkroom to decrease the exposure in particular areas of the image. This brings out details in the shadows. Math formula is the same as used by SVG and Gimp. + \item[Difference:] Subtracts the darker of the two constituent colors from the lighter. This is the same as \textit{Subtract} except that the absolute value is used. \textit{Subtract} colors which would be black due to clipping become visible instead. Differencing with white inverts the destination color. Differencing with black produces no change. Math formula is the same as used by SVG and Gimp. + \item[Hardlight:] Multiplies or screens the colors, dependent on the source color value. If the source color is lighter than $0.5$, the destination is lightened as if it were screened. If the source color is darker than $0.5$, the destination is darkened, as if it were multiplied. The degree of lightening or darkening is proportional to the difference between the source color and $0.5$. If it is equal to $£0.5$ the destination is unchanged. Using pure black or white produces black or white. The effect is similar to shining a harsh spotlight on the destination. This mode is useful for creating the appearance of shadows on a layer. You might use this mode to combine two photographs and obtain bright colors and sharp edges. Math formula is the same as used by SVG and Gimp. + \item[Softlight:] Darkens or lightens the colors, dependent on the source color value. If the source color is lighter than 0.5, the destination is lightened. If the source color is darker than $0.5$, the destination is darkened, as if it were burned in. The degree of darkening or lightening is proportional to the difference between the source color and $0.5$. If it is equal to $0.5$, the destination is unchanged. Using pure black or white produces a distinctly darker or lighter area, but does not result in pure black or white. The effect is similar to shining a diffused spotlight on the destination. A layer with pure black or white becomes markedly darker or lighter, but does not become pure black or white. Soft light is not related to “Hard light” in anything but the name, but it does tend to make the edges softer and the colors not so bright. Math formula is the same as used by Gimp; SVG formula differs. +\end{description} + diff --git a/parts/Rendering.tex b/parts/Rendering.tex index 1cb18a7..2350365 100644 --- a/parts/Rendering.tex +++ b/parts/Rendering.tex @@ -71,7 +71,7 @@ If you want to render many projects to media files without having to constantly The first thing to do when preparing to do batch rendering is to create one or more Cinelerra projects to be rendered and save them as a normal project, such as \texttt{ProjectA.xml}. The batch renderer requires a separate project file for every batch to be rendered. You can use the same Cinelerra project file if you are rendering to different output files, as in an example where you might be creating the same output video in different file formats. -To create a project file which can be used in batch render, set up your project and define the region to be rendered either by highlighting it, setting in/out points around it, or positioning the insertion point before it. Then save the project as usual to your project.xml file. Define as many projects as needed this way. The batch renderer takes the active region from the EDL file for rendering. +To create a project file which can be used in batch render, set up your project and define the region to be rendered either by highlighting it, setting in/out points around it, or positioning the insertion point before it. Then save the project as usual to your project.xml file. Define as many projects as needed this way. The batch renderer takes the active region from the EDL file for rendering. If we have not set active regions, it is better to bring the insertion point to the beginning of the timeline to avoid possible problems with the rendering. With all the Cinelerra xml project files prepared with active regions, go to \texttt{File $\rightarrow$ Batch Render}. This brings up the batch render dialog. The interface for batch rendering is more complex than for single file rendering. A list of batches must be defined before starting a batch rendering operation. The table of batches appears on the bottom of the batch render dialog and is called \textit{Batches to render}. Above this are the configuration parameters for a single batch; a batch is simply a pairing of a project file with a choice of output file and render settings. @@ -616,12 +616,89 @@ x265-params=pass=1:stats=/tmp/{temporary log file name}.log \item[libvpx-vp9, xvid, and huffyuv:] \begin{lstlisting}[language=bash] -cin_stats_filename /tmp/{temporary log file name}.log -flags +pass1 (or flags +pass2 for the second pass) - \end{lstlisting} - \noindent \textit{NOTE:} for vp9, the best Pixels is \texttt{gbrp} + cin_stats_filename /tmp/{temporary log file name}.log + flags +pass1 (or flags +pass2 for the second pass) + \end{lstlisting} \end{description} +\noindent \textit{NOTE:} for vp9, the best Pixels is \texttt{gbrp} + +\subsection{Use case: High Efficiency Video Coding (HEVC)}% +\label{sub:use_case_hevc} + +An example of video profile based on CRF, a quality-controlled +variable bitrate, instead of fixed quality scale (ABR). +HEVC (H.265) was developed as a successor to AVC (H.264) to more +efficiently compress the future large amounts of data from 2/4/8k +videos. +In comparison to AVC, an average saving of around 30 percent can be +assumed for the same quality. +Because HEVC is not bound to any size format, it is suitable for +virtually any image size. + +The following example is HD and FullHD oriented and produces a +picture quality similar to the Blu-ray with some limitations. +As container Matroska (.mkv) is used, but also mp4 and others are +possible. + +\vspace{2ex} \begin{lstlisting}[language=Bash] +matroska libx265 + +# CRF 16 creates a balanced compromise +# between quality and file size. +crf=16 + +# Preset changes encoding speed and generally +# degrades the overall result. Medium (default) +# always fits. +preset=medium + +# Additional parameters that are passed on to the codec. +# me=star improves the search for very fast +# movements, but slows down the encoding. +#x265-params=me=star + +# Keyint does FFmpeg automatically, otherwise +# the setting must match the frame rate. +#keyint\_min=25 + +# Profile does FFmpeg automatically. +#profile=high + +# Source sRBG and retention of color space. +# 720/1080=bt709 if no profile set. Useful +# for formats smaller than 720 if no lossy +# conversion is desired. +colorspace=bt709 +color_trc=bt709 +color_primaries=bt709 + +# Output in 10 bit, prevents 8-bit step formation +pixel_format=yuv420p +\end{lstlisting} + +\noindent \textit{NOTE:} + +A CRF of 16 delivers satisfactory results in most cases. However, if +the video material is really \emph{grainy}, a CRF~16 can lead to unwanted large files. In this case, a trial export of perhaps one minute should be performed. The resulting bit rate can be used to correct the CRF to 17,\,18,\,19\ldots --- remember, a CRF of 0 means lossless, the higher the number the stronger the lossy compression. The approximate calculation of the final file size can be extrapolated from the sample export. + +The color space information must be used explicitly so that it can +be included in the video. Cinelerra\,GG or FFmpeg does not write it +by itself. Without this information the players (e.\,g.\ \href{https://mpv.io/}{mpv}) stick to the dimensions of the video and take the assumed color model from a table. With videos in the dimensions from 720 to 1080 this is bt709. For smaller dimensions, e.\,g.\ DVD, bt601 is assumed and for 4k and above it is bt2020. Normally this is not a problem, but if you want to export a FullHD without color loss to a smaller size like 576 for example, you have to inform the encoder as well as the decoder of the player. This also applies if the videos are to be loaded on video platforms, where they are then converted into videos of different sizes. It is a security measure to prevent false colors, such as the color profiles in digital photos and the copies made from them. + +The HEVC tuning has not been considered here, because it is is +rarely used and requires background knowledge. + +Further links: +\begin{itemize} + \item \href{http://x265.readthedocs.org/en/default/}{x265 + Documentation} + \item \href{http://x265.readthedocs.org/en/latest/cli.html}{x265 + Command Line Options} + \item \href{http://x265.readthedocs.org/en/latest/presets.html}{x265 + Presets/Tuning} +\end{itemize} + \subsection{Piping Video to a Command Line}% \label{sub:piping_video_command_line} diff --git a/parts/Windows.tex b/parts/Windows.tex index 0c1a10d..e1d1db6 100644 --- a/parts/Windows.tex +++ b/parts/Windows.tex @@ -578,10 +578,10 @@ Once some video files are on the timeline, the compositor window is a good place \label{sub:camera_and_projector} In the compositor window, two of the more important functions are the adjust camera automation and the adjust projector automation which control operation of the camera and projector. -Cinelerra's compositing routines use a "temporary", a frame of video in memory where all graphics processing is performed. -Inside Cinelerra's compositing pipeline, the camera determines where in the source video the "temporary" is copied from. -The projector determines where in the output the "temporary" is copied to. -Each track has a different "temporary" which is defined by the track size. By resizing the tracks you can create split screens, pans, and zooms. +Cinelerra's compositing routines use a \textit{temporary}, a frame of video in memory where all graphics processing is performed. +Inside Cinelerra's compositing pipeline, the camera determines where in the source video the \textit{temporary} is copied from. +The projector determines where in the output the \textit{temporary} is copied to. +Each track has a different \textit{temporary} which is defined by the track size. By resizing the tracks you can create split screens, pans, and zooms. In compositing, each frame can be digitally altered using various options, such as a color correction plugin (figure~\ref{fig:camera_and_projector}). Once the image has been transformed, the finished image is then projected to the compositor thus creating a modified version of the original. @@ -598,32 +598,20 @@ Even if the track is completely transparent, it is still the affected track. If multiple video tracks exist, the easiest way to select one track for editing is to Shift-click on the record icon of the track. This solos the track. -The purpose of the projector is to place the contents of the "temporary" into the project's output. +The purpose of the projector is to place the contents of the \textit{temporary} into the project's output. The intent of the projector is to composite several sources from the various tracks into one final output track. The projector alignment frame is identical to the camera's viewport, except that it guides where on the output canvas to put the contents of each temporary. \subsubsection*{Compositing projector controls}% \label{ssub:compositing_projector_controls} -When the projector button is enabled in the compositor window, you are in projector editing mode. -A guide box appears in the video window. -Dragging anywhere in the video window causes the guide box to move along with the video. -Shift-dragging anywhere in the video window causes the guide box to shrink and grow along with the video. Once you have positioned the video with the projector, you may want to work with adjusting the camera automation. - -\subsubsection*{Compositing camera controls}% -\label{ssub:compositing_camera_controls} - -Select the camera button to enable camera editing mode. -In this mode, the guide box shows where the camera position is in relation to past and future camera positions but not where it is in relation to the source video. -Dragging the camera box in the compositor window does not move the box but instead moves the location of the video inside the box. -The viewport is a window on the camera that frames the area of source video to be scanned. -The viewport is represented as a red frame with diagonal cross bars. +When the projector button is enabled in the compositor window, you are in projector editing mode. A guide box appears in the video window. The red box indicates the size of the frame that will be sent to the Ouput. You can drag the box with LMB, moving the frame in x and y as you like. Even when moving along the z-axis (i.e. the zoom, with SHIFT+Drag) the red box faithfully follows the movement and size of the frame. Once you have positioned the video with the projector, you may want to work with adjusting the camera automation. \subsubsection*{Viewport sizes}% \label{ssub:viewport_sizes} -The size of the viewport is defined by the size of the current track. -A smaller viewport (640x400) captures a smaller area. +The viewport is a window on the camera that frames the area of source video to be scanned. +The initial size of the viewport is defined by the size of the current track. A smaller viewport (640x400) captures a smaller area. A larger viewport (800x200) captures an area larger than the source video and fills the empty spaces with blanks. Once we have our viewport defined, we still need to place the camera right above the area of source video we are interested on. To control the location of the camera: @@ -633,14 +621,14 @@ Once we have our viewport defined, we still need to place the camera right above \item Drag over the display window. \end{enumerate} -When we drag over the viewport in the compositor window, the way it looks is as if you “move the camera with the mouse”. The viewport also moves with it. +When we drag over the viewport in the compositor window, the way it looks is as if you \textit{move the camera with the mouse}. The viewport also moves with it. -In the compositing window, there is a popup menu of options for the camera and projector. Right click over the video portion of the compositing window to bring up the menu. +\subsubsection*{Compositing camera controls}% +\label{ssub:compositing_camera_controls} -\begin{description} - \item[Reset Camera] causes the camera to return to the center position. - \item[Reset Projector] causes the projector to return to the center. -\end{description} +Select the camera button to enable camera editing mode. +In this mode, the guide box shows where the camera position is in relation to past and future camera positions but not where it is in relation to the source video. +The green box is the Viewport; at the beginning it coincides with the size of the source frame. If we move the viewport by dragging it with LMB (moving it in x/y), the green box remains fixed to the original size but the frame is moved to the new position. A yellow frame will appear along the edges of the frame to indicate the displacement with respect to the green box; this behavior differs from that seen for the Projector. Even if we act on the z-axis (SHIFT + Drag, equivalent to the zoom), the frame narrows or widens, moving behind the yellow frame. \subsubsection*{The camera and projector tool window}% \label{ssub:the_camera_and_projector_tool_window} @@ -663,7 +651,7 @@ A popular justification operation is upper left projection after image reduction This is used when reducing the size of video with aspect ratio adjustment. In the last figure you see the choices for justification as the red stripe in the 6 boxes in the order of left, center horizontal, right, top, center vertical, and bottom. -The translation effect allows simultaneous aspect ratio conversion and reduction but is easier to use if the reduced video is put in the upper left of the “temporary” instead of in the center. +The translation effect allows simultaneous aspect ratio conversion and reduction but is easier to use if the reduced video is put in the upper left of the \textit{temporary} instead of in the center. The track size is set to the original size of the video and the camera is centered. The output size is set to the reduced size of the video. Without any effects, this produces just the cropped center portion of the video in the output. @@ -671,7 +659,27 @@ Without any effects, this produces just the cropped center portion of the video The translation effect is dropped onto the video track. The input dimensions of the translation effect are set to the original size and the output dimensions are set to the reduced size. To put the reduced video in the center subsection that the projector shows would require offsetting out x and out y by a complicated calculation. Instead, we leave out x and out y at 0 and use the projector's tool window. -By selecting left justify and top justify, the projector displays the reduced image from the top left corner of the “temporary” in the center of the output. +By selecting left justify and top justify, the projector displays the reduced image from the top left corner of the \textit{temporary} in the center of the output. + +\subsubsection*{Reset to Default}% +\label{ssub:reset_default} + +In the compositing window, there is a popup menu of options for the camera and projector. Right click over the video portion of the compositing window to bring up the menu: + +\texttt{Reset Camera}: causes the camera to return to the center position. + +\texttt{Reset Projector}: causes the projector to return to the center. + +\subsubsection*{Use Case: Interaction Between Camera And Projector \protect\footnote{Example provided by Sam. The relative video is located at: \url{https://streamable.com/iq08i}}}% +\label{ssub:use_case_interaction_camera_projector} + +\begin{enumerate} + \item Start by shrinking the projector to "z=0,500" ($\frac{1}{4}$ of the original frame). + \item The next step is to switch to the camera and note that the green box has assumed the size of the projector, i.e. the red box. The value of z of the camera is always equal to $1,000$ (default) but the frame is $\frac{1}{4}$ of the original frame, i.e. it has the size of the projector that has $z=0,500$. This is the current viewport size. + \item You enlarge the room bringing $z=2,000$. You can see that the dimensions of the viewport (green box) do not change, remaining the same as those of the projector. However, the frame has been enlarged and this variation is indicated by the enlargement of the yellow box. Let's remember that this follows the changes made with the camera tool. + \item We can drag the room so that we can center the frame to our liking. . The movement of the yellow box shows well the variation compared to the green box. + \item Finally, if we want, we can switch to the projector tool to move the output frame to the position we want with respect to the size of the source. Of course, we can also work on the z, which in the example is at $z=0.500$, if we have decided to change the size of the output. +\end{enumerate} \subsection{Masks}% \label{sub:masks} @@ -708,9 +716,9 @@ There are 8 possible masks per track. Each mask is defined separately, although Shift-drag activates bezier handles to create curves between mask points. \item Finally once you have a mask, the mask can be translated in one piece by Alt-dragging the mask. - The effect of the mask is always on. - Ctrl-Alt-drag translates an entire mask to a new location on the - screen. + The effect of the mask is always on. + Ctrl-Alt-drag translates an entire mask to a new location on the + screen. \end{enumerate} The masks have many more parameters which could not be represented with video overlays. @@ -724,40 +732,161 @@ Selecting the question mark when the mask toggle is highlighted brings up the ma \label{fig:mask_window} \end{figure} -The mode of the mask determines if the mask removes data or makes data visible. -If the mode is \emph{Subtract alpha}, the mask causes video to disappear. -If the mode is \emph{Multiply alpha}, the mask causes video to appear and everything outside the mask to disappear. +Masking has been greatly improved compared to the original tool. Detailed description is provided here. Note that the Mask window is separated into various sections to make it easier to locate the area of interest. -The \emph{Value of the mask}, set by a slider bar, determines how extreme the subtraction or addition is. -In the subtractive mode, higher values subtract more alpha. -In the additive mode, higher values make the region in the mask brighter while the region outside the mask is always hidden. +\subsubsection*{Masks on Track section}% +\label{ssub:masks_track_section} -The \emph{Mask number} determines which one of the 8 possible masks we are editing. -Each track has 8 possible masks. -When you click-drag in the compositor window, you are only editing one of the masks. -Change the value of mask number to cause another mask to be edited. -The previous mask is still active but only the curve overlay for the currently selected mask is visible. -When multiple masks are used, their effects are OR-ed together. -Every mask in a single track uses the same value and mode. +The \texttt{Track}: textbox displays the different video tracks for your session which will be initially set to the first armed video track or will be left blank if there are no armed tracks. A pulldown to the right of the box brings up the names of all of the video tracks allowing you to change to which track the masking applies. You can also just use the tumbler to easily mouse up/down to get to the desired track. In the pulldown list, any track that has red colored text is disarmed so that you can not change it. A track that contains masks has yellow colored text for easy identification. Only when there are no masks on the track, do you have the default text color. This textbox is display only and you can not type into it. -The edges of a mask are hard by default but this rarely is desired. -The \emph{Feather} parameter determines how many pixels to feather the mask. -This creates softer edges but takes longer to render. +The \texttt{Solo} button in the Masks on Track section of the Mask window is very handy when working with masks on different tracks. It displays only that track so that you only see the track you choose, as well as the tracks behind it to show the mask part. The Solo button is just a convenience to prevent having to mouse over to the patchbay. -Two checkbox options are \emph{Apply mask} before plugins and \emph{Disable OpenGL masking}. -Note that the OpenGL mask renderer is of low quality and only suitable as a preview for initial work. -For fine-tuning of masks (with large feather values) \emph{OpenGL masking} should be switched off so that the software renderer is used instead. +\subsubsection*{Masks section}% +\label{ssub:masks_section} -Finally, there are parameters which affect one point on the current mask instead of the whole mask. -These are \emph{Delete}, \emph{X}, and \emph{Y}. -The active point is defined as the last point dragged in the compositor window. -Any point can be activated merely by Ctrl-clicking near it without moving the pointer. -Once a point is activated, \emph{Delete} deletes it and \emph{X}, \emph{Y} allow repositioning by numeric entry. +The \texttt{Mask}: textbox will show you the mask numbers of $0-7$ or the 8 ascii character name that you have used to designate each mask number. There is a pulldown on the right side to easily switch to another mask. -\subsection{Cropping}% -\label{sub:cropping} +The \texttt{Delete} button is used to delete the mask number/name that is selected. The symbol to the right with tooltip of \texttt{Delete all masks} can be used to delete all of the current video track masks. + +The \texttt{Select}: row of checkboxes is used to indicate which mask is currently displayed for that video track in the Compositor. Numbers that are colored yellow are active masks for that track. A tumbler to the right allows for quickly changing the mask number displayed. + +The \texttt{Enable} row of masks makes it so you can enable all or none of the masks, making it possible to look at no masks or at one mask without interference from the other masks. The symbol that looks like an \texttt{eye} can be used to easily check all or none as the tooltip \textit{Show/Hide mask states}. + +\subsubsection*{Preset Shapes section}% +\label{ssub:preset_shape_section} + +There are 4 shapes that are automatically available for usage as masks – \texttt{square}, \texttt{circle}, \texttt{triangle}, and \texttt{oval}. In addition, the next 3 symbols in this section are for the purpose of loading, saving, and deleting your own customized shapes. The first symbol, \texttt{Load} preset, will bring up a list of your previously saved presets. Clicking on \texttt{Save} preset brings up a popup window allowing you to provide a name used to identify the preset you want to save, along with a pulldown to see the names of your other saved presets. Clicking on \texttt{Delete} preset also brings up a textbox with a pulldown to choose which one to delete. There is a file, called \texttt{mask\_rc}, in \texttt{\$HOME/.bcast5} that records your custom masks. + +When you click \texttt{Load} preset, keep in mind that it will write the mask number that you have selected so if you already have a mask at that location, it will write over it – just UNDO to revert to the previous if you made this mistake. + +\subsubsection*{Position \& Scale section}% +\label{ssub:position_scale_section} + +\texttt{Center} mask button allows for quickly centering a mask on the video track. +\texttt{Normalize} mask button makes it easy to normalize the size of the mask based on the scale of the video. +The next 3 symbols concern the direction to \textit{drag translate} a mask using the \texttt{Alt+Left Mouse Button} thus making it easy to preserve the current $X$ or $Y$ value when desirable. + +\texttt{xlate/scale x} - drag translate constrained in the X direction + +\texttt{xlate/scale y} - drag translate constrained in the Y direction + +\texttt{xlate/scale x/y} - drag translate in both directions; this is the default and after using the other 2 options, you should reset to this to avoid future confusion while dragging. + +\subsubsection*{Fade \& Feather section}% +\label{ssub:fade_feather_section} + +The \texttt{Fade}: textbox is used to type in a fade value; the tumbler to the right of the textbox allows you to increase or decrease that number; and the slider bar makes it quick to adjust the fade value. The fader goes from $-100$ on the left to $+100$ on the right for negative to positive. Default value is $+100$. The fade slider includes a sticky point at 0 so that it is easy to get to 0 without going too far or not quite far enough - that way you don’t have to keep jiggling to get there. + +In addition there is a \texttt{Gang fader} symbol to allow for having all of the masks fade in unison. The symbol is surrounded by a gold colored background when it is in effect. If you have multiple masks with different modes, a decision had to be made on what value to use – it uses the maximum transparency value of the background to determine the operations results. To understand how this works, here is a summary: + +Note1: The area outside the mask is referred to as the background. +Note2: The operational result is based on the maximum transparency value of that background. +\paragraph{Case 1, Positive Fade:} When the fade for all of the masks is positive, affecting the area inside of the mask, all of the +background colors are at a transparency value of zero. So the largest transparency value is 0,and all masks are drawn with opaque backgrounds, depicted as one would expect. + +\paragraph{Case 2, Negative Fade:} When the program computes the background color for any number of masks that includes negative +mask(s), it uses the largest transparency number as the determining factor for the background. Only 1 of the masks can be largest, and wins for the background transparency result. + +\vspace{3ex}\texttt{Feather}: works in a similar manner to a \textit{gradient Fade} aligned on the mask boundary but is a logical function instead of a mathematical function so will be faster. The \texttt{Gang feather} symbol also works in a similar fashion and is surrounded by a gold colored background when it is in effect. + +\subsubsection*{Mask Points section}% +\label{ssub:masks_points_section} + +This section is used to change to a different mask number and manipulate the masks you have created. + +The \texttt{Point}: textbox provides the ability to change which point number for the current mask that you want to work on. It has a tumbler to allow for quickly switching the point number. The \texttt{X:} and \texttt{Y:} boxes below reflect the current values and allow for modifying the $X/Y$ coordinates and these too have tumblers. The \texttt{Delete} button will allow for deleting the selected point number. + +The next 6 symbols in 2 columns represent \texttt{Smooth} and \texttt{Linear} buttons. Smooth buttons use an algorithm based on the previous point and the next point to create a curved line. The smoothing operation takes three points, A, B, C, and arranges the slope at B to be AC as it moves to the next point for that mask. + +\texttt{smooth point} $\rightarrow$ smooth a single point. + +\texttt{smooth curve} $\rightarrow$ smooth all points on a mask edge curve. + +\texttt{smooth all} $\rightarrow$ smooth all active masks. + +Linear buttons of \texttt{linear point}, \texttt{linear curve}, and \texttt{linear all}, perform the inverse of the smooth functions. +The control point vectors on the bezier endpoints are set to zero magnitude. + +In addition there is a \texttt{Markers} and a \texttt{Boundary} checkbox which come in handy to turn off the display of the points and the outline of the mask. Turning off \texttt{Markers} is very useful when you have a lot of control points that clutter the display and make it more difficult to see the actual mask. A helpful feature is available by disabling \texttt{Markers} and enabling \texttt{Boundary} which results in all masks being displayed in the viewer; for example you can then see mask 0, mask 1 \dots at the same time. + +A \texttt{gang} symbol on the right hand side of this section, tooltip of \textit{Gang points}, is another useful feature that makes it easy to drag a mask to an exact coordinate using the \texttt{X} or \texttt{Y} textbox for numerical input or the associated tumblers. This works like the \texttt{Alt+LMB drag} translate but provides the ability to be precise. + +\subsubsection*{Pivot Point section}% +\label{ssub:pivot_point_section} + +The \texttt{X:} and \texttt{Y:} coordinates mark the value of the current \textit{Pivot Point} used for rotation, scaling, and translation. You can either directly key in numerical values or use the tumblers to change the values as long as the \texttt{Focus} checkbox is checked. + +The \texttt{Focus} checkbox is used in case you want to set a different point in the Compositor for pivoting instead. And the \texttt{Gang} symbol for rotate/scale/translate means that these operations will be performed on all points of the enabled masks. The gang symbol is surrounded by a gold colored background when it is in effect. When performing a rotate operation on a mask with the mouse wheel, \textit{acceleration} is in effect – this means the faster you wheel, the more space is covered so that you do not have to wheel dozens of time to make a full rotation. Then when you wheel around slower, you can fine tune the result. + +\subsubsection*{Other sections}% +\label{ssub:other_sections} + +Finally there are the \texttt{Apply masks before plugins} and \texttt{Disable OpenGL masking} self-explanatory checkboxes. + +Note: Not all OpenGL software can support the current masking methods. If your opengl implementation does not support \textit{Shader Version 4.}3 or has trouble with this (it is relatively new to opengl at the time this was implemented), then this checkbox will allow you to use the software masking to avoid any potential issues. Normally, a OpenGL is probed for the shader version and will automatically use the software implementation if required. + +The \texttt{Help} checkbox can be enabled in order to see a list of the keys used to perform various operations. If you use Masking infrequently, these are a valuable reminder to which key combinations to use. Currently they are as follows: + +\vspace{2ex} +\begin{tabular}{ l l } + \hline + Shift+LMB & move an end point \\ + Ctrl+LMB & move a control point \\ + Alt+LMB & to drag translate the mask \\ + Shift+MMB & set Pivot Point at pointer \\ + Wheel & rotate around Pivot Point \\ + Ctrl+Shift+Wheel & scale around Pivot Point \\ + Ctrl+Wheel & rotate/scale around pointer \\ + \hline +\end{tabular} + +\vspace{2ex} Note:For some desktop window managers, certain keys may already be in use by the operating system, so you will either have to redefine them in your desktop or use different key combinations. For example, at least some desktops used with \textit{UbuntuStudio 16.04} and \textit{Arch} field the \texttt{Alt} key, thus requiring alternative key combinations to be needed. Below are some of these alternatives. + +\vspace{2ex} +\begin{tabular}{ l p{11cm}} + \hline + LMB & move/create an end point (to move the end point the pointer must be above the point) \\ + Shift+LMB & move an end point (the pointer may be near the point, not above it) \\ + Ctrl+LMB & move/create a control point \\ + Alt+Ctrl+LMB & to drag translate the mask \\ + Shift+Key Delete & to delete the mask \\ + Shift+MMB & Set Pivot Point at pointer \\ + Alt+Wheel & zoom in/out the screen (also available in Ubuntu16 but does not exist in all distros) \\ + \hline +\end{tabular} + +\vspace{2ex} +Focus checkbox = unchecked: + +\vspace{2ex} +\begin{tabular}{ l l } + \hline + Wheel & rotate around Pivot Point \\ + Shift+Wheel & scale around Pivot Point \\ + Ctrl+Wheel & rotate around pointer \\ + Ctrl+Shift+Wheel & scale around pointer \\ + + \hline +\end{tabular} + +\vspace{2ex} +Focus checkbox = checked: + +\vspace{2ex} +\begin{tabular}{ l l } + \hline + Wheel & rotate around Pivot Point (“Custom focus point”) \\ + Shift+Wheel & scale around Pivot Point (“Custom focus point”) \\ + \hline +\end{tabular} + +\vspace{2ex} +Note: in order to be able to rotate/scale around pointer, the Focus checkbox must be unchecked. + +\subsection{Cropping}% +\label{sub:cropping} Cropping reduces the visible picture area of the whole project. It changes the values of the output dimensions (width and height in pixels) and the X, Y values of the projector in a single operation. Since it changes project settings it affects all the tracks for their entire duration and it is not keyframable. @@ -774,8 +903,7 @@ Cropping reduces the visible picture area of the whole project. It changes the v \item Click-drag anywhere in the video to start a new rectangle. \item Click-drag over any corner of the rectangle to reposition the corner. \item Alt-click in the cropping rectangle to translate the rectangle to any position without resizing it. - \item The crop control dialog allows text entry of the top left coordinates (X1,Y1) and bottom right coordinates (X2,Y2) that define the crop rectangle. - When the rectangle is positioned, hit the \emph{Do it} button in the crop control dialog to execute the cropping operation: the portion of the image outside the rectangle will be cut off and the projector will make the output fit the canvas. + \item The crop control dialog allows text entry of the top left coordinates (X1,Y1) and bottom right coordinates (X2,Y2) that define the crop rectangle. When the rectangle is positioned, hit the \emph{Do it} button in the crop control dialog to execute the cropping operation: the portion of the image outside the rectangle will be cut off and the projector will make the output fit the canvas. \item The Set Format window will show the new project Width and Height values. \item The projector tool window will show the new X, Y values. \item Track size will remain unchanged. -- 2.26.2