# Difference between revisions of "Understanding and using the rendering engine"

## Contents

This page is intended to quickly illustrate the main effects of rending settings.

Settings can be separated into two parts: the blending and the weightings.

• Blending defines how the pixels of each image will be merged.
• Weightings allow selecting the most relevant pixels of each image.

## BLENDING

This part mainly illustrates the Multiband blending, which is the most efficient and of which the effects are not always easy to understand. Here’s the role of each blending in brief:

• If no blending is used, the last image becomes a priority and simply overwrites the others. This blending is not very useful but can provide certain artistic options.
• Linear blending allows creating an average between the overlapping images.
• Multiband blending allows blending the overall color of the images (low frequencies) while preserving the details of each (high frequencies). The level of the Multiband enables influencing on the strength of the overall color texture. Following paragraph illustrates the influence of this setting.

### Multiband levels

Multiband blending enables therefore to mitigate the differences in the scale and/or the exposure existing between the juxtaposed images.

The schema below illustrates how the blending is done from source photos of 4096 pixels wide (the Multiband level is defined by the value N).

What is necessary to remember:

• N = 0 : the ​​influence zone is equivalent to the total width of the image, so the blending is maximum.
• N = -1 : the ​​influence zone is equivalent to 1/2 of the real size of the image
• N = -2 : the ​​influence zone is equivalent to 1/4 of the real size of the image
• N = -3 : the ​​influence zone is equivalent to 1/8 (warning: logarithmic scale)
• ... etc...

• N = 1 : there is no blending (on about 2 pixel only)
• N = 2 : blending on about 4 pixels wide
• N = 3 : blending on about 8 pixels wide (warning: logarithmic scale)
• ... etc...

Notes :

• It is important to note that negative values ​​from -10 to 0 does not follow the positive values ​​from 1 to 10, as we should see on a logical standard suite of values.
• For this case, the values -2 and 10 (for example) are illustrated on the same level: the logarithmic calculation make this 2 vlaues a similar result. That said, this is not necessarily true for photos whose size can not be defined to the power 2.
• With this source image (4096 pixels), N reaches in fact the value 12 (Nmax = 12). The software limitations make that this value is not reachable this way (maximal positive value = 10), it is therefore possible to set the level to 0, equivalent to the level 12. This is not true all the time and changes depending on the source image and the rendering size (if it is not set at 100%). Then the example above is applicable for source images of 4096 pixels wide only.

Here’s a simple example with these differences:

• For this first rendering, the level is on 1 (setting equivalent to a simple linear blending and no balancing is therefore performed):

• For this second rendering, the level is greater (7) and we see that the balance around the boundaries between the images starts.

We can compare the notion of the level (Multiband level) with the scope of balancing information. The problem is that the required scope will depend on the size of the images and the panorama which is rendered.
To overcome this, we must use negative values that define a spreading level which is relative to the maximum level possible.

• This third rendering uses the default level (-2). Sharp differences in the exposure have completely disappeared.

• Here is a final rendering that uses the maximum level of blending, represented by the value 0. Each image is spread to maximize its medium shade and the panorama is fully balanced.

## CUTTING

Different weightings allow you to select the content of each image:

• The Cutting and Diamond Weighting tools will act on the data belonging to the same layer to find the best blend possible.
• Exposure fusion and Remove HDR ghost tools will act between the layers (between the bracketed images) to select the most relevant pixels. These two notions are mainly HDR images and are shown in the page LDR / HDR : How it works.

### Smart cutting

Cutting enables to make a binary option between the overlapping images to prevent potential blurring related to moving objects and/or remaining alignment errors. This cutting may consider two different concepts:

• Remove ghosts: the aim is to find the path between two images to minimize the differences at the borders. Most of the time, the result allows you to keep or eliminate the moving objects (ghosts) completely.
• Preserves the long focal lengths: the aim here is to maintain the image that has the best definition (the longest focal length).

Note: The second setting is used to resolve stitching cases of multiple focal lengths shooting and it is highly recommended to leave the default settings if it is not the case.

• Here’s an example of multiple focal lengths shooting :
• Images have been modified slightly colorimetrically and Multiband is disabled in order to show the cutting option.
• The aim is to maintain the image that has the best resolution in the final panorama which means the image that has the longest focal length.

 Project Rendering after removing ghosts Rendering with the long focal lenses

It is clear that the Anti-ghost concept is not compatible with the conservation of long focal lengths concept.
Indeed, the result is logical: the choice that minimizes the differences in borders is only to keep the image within short focal length which means to not to set any borders.
In a simple case as that, the second setting which considers the focal fully meets expectations.
But one must often compromise between the concept of maximum focal length and the minimum ghost because these two concepts can be contradictory.

• Here is another example which illustrates the different cutting options according to different settings of cutting:

 project rendering (Removal of ghosts)) rendering (Preserving long focal lenghts) rendering (compromise between ghost and focal)

We see that it is not always easy to keep the images of long focal length without adding errors in the moving objects.
This is why it is recommended to leave the setting on Remove ghosts if the picture is not affected by problems of multiple focal lengths.

## WEIGHTINGS

Weightings methods allow to average pixels of different pictures. Unlike cutting methods which are making binary choices as illustrated before. Weighting methods can be combined but they are not compatible with cutting algorithm. So, in most of cases cutting option must be set to none before to use weighting algorithms.

It can be useful to combine cutting and weighting algorithm only if you have several layers in Autopano. Cut algorithm will be applied inside each layers and weighting between layers.

### Diamond Weighting

In some quite specific cases, a clear cutting of juxtaposed images may be visible.
This may cause difficulties in finding the cutting which minimizes the ghosts or even develop differences dividing it into strong differences in texture.

In such cases, the use of Diamond weighting can improve the rendering. This notion allows you to give the priority to central pixels of each image without entirely excluding the pixels of neighboring images.
Thus the transition is much smooth. On the other hand, this gives a much blurred texture to the final rendering.

 cutting Diamond

The result is generally satisfactory only on certain parts of the panorama. We therefore recommend using this rendering mode in addition to a clear cut rendering and to manually merge the two results with an editor like Photoshop.

### Exposure fusion

Gives more importance to the well-exposed pixels of each image.

### Removing HDR ghosts

Dims the importance of pixels of which the value is far from the majority of pixels in the same position, which means to mitigate the ghost effects in bracket mode (object which moved during the shooting of a same position).
It may be better to disable this setting if there is no HDR ghost type (it can enhance the color differences existing between different positions).