+\index{compositing}
+
+Much of the editing in \CGG{} involves \textit{compositing} which is the combining of visual
+elements from different sources into single images. This includes such things as
+speeding up and slowing down the video, changing the resolution, creating a split screen, and fading in and out.
+Compositing operations are done on the timeline and in the Compositor window using various
+operations and other compositing attributes that are available in the Resources window.
+When \CGG{} is performing a compositing operation it plays back through the
+compositing engine, but when not, it uses the fastest decoder that it has.
+
+\subsection{The Temporary, Track and Output Sizes}%
+\label{sub:track_and_output_sizes}
+
+This section explains a few things which help to understand Compositing - especially with relation
+to the camera, effects, and the projector.
+
+\subsubsection*{The Temporary}%
+\label{ssub:output_size}
+\index{temporary}
+
+\CGG{}'s compositing routines use a \textit{temporary} which is a single frame of video in memory where graphics processing takes place. By default the size of the temporary is that of the project ($W \times H$), i.e., the output size. But if the tracks on the timeline have various sizes different from those of the project, then the temporary will take the size of the active track (viewport = green border). We can also change the size of the viewport using the Camera tool, as well as pans and zooms the temporary displayed in it. Effects are processed in the temporary and as such are affected by the temporary size. In the case of the camera, its viewport is the temporary size. The size of the temporary and of the output in the compositing pipeline can be different and vary for any particular frame. However, projectors are rendered to the output and so are affected by the output size. The temporary is the basis on which the Projector tool acts to display the canvas on the Compositor window. The canvas always has the size of the project, although with the projector we can make pans and resizes of the red border inside it. When the temporary is smaller than the output, the temporary will have blank borders around the region in the output. When the temporary is larger than the output, it will be cropped.
+
+\subsubsection*{Track and Output size}%
+\label{ssub:track_size}
+\index{track!size}
+\index{output size}
+
+The \textit{Track size} is used to define the temporary size with each track having a different size (viewports). It also serves to conform the input media to a chosen format (aspect ratio). So each track can have a different format (viewport).
+You can see or set the track size by RMB click on a track and then select \emph{Resize Track} to resize
+the track to any size. Or select \emph{Match output size} to make the track the same size as the
+output. Or from the Resources window, RMB on a video media and choose \textit{Info} and then \textit{Resize}. When a track is resized then what it looks like on the compositor changes. The relationship
+between the track and the project's output size makes it possible to magnify or reduce the size of
+a track in regards to the final output. This feature means you can create visual effects such as different aspect ratios, adjust split screens, zooms, and pans in the compositor.
+
+The \textit{Output size} can be set in \texttt{File $\rightarrow$ New} when creating a new project,
+or by using \texttt{Settings $\rightarrow$ Format}, or in the Resources window with RMB click on
+a video asset and choosing \texttt{Match $\rightarrow$ Match project size}. When you \emph{Match project size}, you
+are conforming the output to the asset. To change the size and aspect ratio of the output (Projector) we have to change the whole project, which will alter all the tracks in the timeline. Once you have set the output size in 1 of these 3 ways,
+any newly created tracks will conform to the specified output size. When rendering, the project's
+output size is the final video track size where the temporary pipeline is rendered into.
+
+To clarify, let's take an example.
+
+If we load a media (M) into Resources and adjust the size of the project to the size of M, we will get the canvas size of the media $W_{M} \times H_{M}$). We can see in the Set Format window that the project's default values ($W \times H$) have changed to those of M ($W_{M} \times H_{M}$). The tracks on the timeline can have different sizes, but what we will see on the canvas, that is, in the Compositor window, is always the output size i.e. the size of the project. Tracks with smaller sizes will be seen with black bands; tracks with larger sizes will be cropped. Each track has its own size but we will see it inserted in the output size. If we change the output size the tracks will not change, remaining in their original size. We can only change the size of the tracks by manually acting on each one in the ways seen before. Finally, if we create a new track in a project of size $W \times H$, it will assume the size of the project automatically.
+
+\subsubsection*{Aspect Ratio (Theory)}%
+\label{ssub:aspect_ratio_theory}
+\index{aspect ratio}
+\index{PAR, DAR, SAR}
+
+The aspect ratio is the ratio of the sides of the frame (\textit{Width} and \textit{Height}). For example, classically broadcast TV was 4:3 (= 1.33), whereas today it has changed to 16:9 (= 1.85); in cinema we use the 35 mm aspect ratio of 1.37 (Academic aperture), but even more so the super 35 mm (2.35). There are also anamorphic formats, i.e. that have no square pixels, like Cinemascope (2.35). The projection must be \textit{normalized} to have an undistorted view.
+
+
+From the film or digital sensors of the cameras, we can extract any frame size we want. We are talking about \textit{viewports}, which we will examine shortly. Also important is the output of the film that will be rendered, because it is what we will see at the cinema, or on TV, or on the monitor of the PC, tablet or smartphone. Referring to figure~\ref{fig:temporary-01}, you can see these two possibilities: with the Camera you choose the size and aspect ratio of the source file (regardless of the original size); while with the Projector you choose the size and aspect ratio of the output.
+
+The following formula is used to vary the aspect ratio:
+
+\qquad $\frac{W}{H} =$ aspect ratio ($\frac{pixels}{pixels}$)
+
+For example to obtain an aspect ratio of Super 35 mmm (2.35) starting from a FullHD file (1920x1080) whose base extension (1920) we want to keep:
+
+\qquad $\frac{1920}{H} = 2.35$
+
+from which: $H = 817$ pixels