The compositing module is designed to sum up images together. Specifically, when rendering a complex scene with different light sources (environment, many light sources in the scene,...), generating a separate simulation for each light source can be a great way to optimize the render time and be able to combine them with different combinations afterwards.
This module enables you to define a set of images, the raw values of each image will be added together into an output composited image that you can then apply a post process on. You can also define variants of images and define intensity settings to export a batch of composited images.
The window contains 3 widgets :
the settings widget contains an histogram and a chromaticity diagram (visible if the current output is RGB) for the currently displayed image, and the post process settings applied to the output image (NB : when previewing one of the listed images, the same post process will be applied for preview only),
the preview widget contains a preview of the currently selected image or the resulting composited image,
the compositing widget contains a list of all loaded files, the settings for the composited output, the list of images to sum, the list of available masks, and the batch intensity settings.
Using this module, the save button has the following options :
LDR output : the processed output (the image currently displayed on screen) saved to a *.png file,
HDR output : the processed output (the image currently displayed on screen) saved to a *.exr file, note that only the RGB layer will be exported.
NB : options to save the batch of composited images are available in the compositing widget, see bellow.
See the Raw Data Preview module documentation for more details on the histogram, gamut, effects and mapping sections or the settings widget.
The loaded files section list all files currently loaded in Predict Lab. This is the same list as when clicking on the "Open" button in the main header.
Each file has a reload and a close button for easy access.
The open button in this section enables you to open a file or import a raw or denoised image just like the main "Open" button. It also allows you to open entire folders containing HDR (.exr) and/or LDR (.png, .jpeg) images.
When opening a folder, the images inside the folder appear grouped together in the list. The entire folder can be
reloaded,
closed,
selected : the compositing will be configured to sum up all images from the folder with a coefficient of 1 on each image,
edited : if you change the folder, the content of the new folder will replace the content of the previous folder in the list and in the images selection bellow. This is especially practical if you want to generate composited images with the same settings for similar groups of images exported in different folders.
The output settings section specify the format of the output composited image :
The Resolution defines the resolution of the output image. You can toggle the "Auto" button to use the resolution of the first listed image. If the summed up images are in a different resolution, see the Display Settings on the Images section to define how they will be adapted,
The Watermark is a texture added on top of the composited image, the Display Settings define where the watermark will be added,
The Output folder is the folder in which images generated from this section will be exported,
The Output filename is defined by a prefix, a sufix, and the identifier of the different variants and outputs defined in the Images and Intensities sections,
The Displayed image foldout is displayed when there are variants in the scene. It enables you to choose which variant is displayed in the preview widget,
The Export all combinations button enables you to export (as a .png or as an .exr) all combinations of variants and intensities defined in the sections bellow. Note that you can also export the currently displayed output using the main "Save" button.
The entire compositing settings can be copied/saved/loaded from a .json file using the corresponding buttons in the Output section header.
Figure A : Example of output settings
The Images section list all images that will be summed up in the output composited image. You can click on an image dark background to preview it in the preview widget, click anywhere else or in the Ouput section to display the composited output back.
For each image, you can select a file and the layer to use. The raw values contained inside this layer will be use for the compositing : the mapping settings in the settings widget on the left only affect the preview visible in the interface and the output composition, but does not affect what will effectively be summed.
You can also define a multiplier that will affect the raw values.
The Display settings define how the image will be placed in the composited output. This is especially important if the image resolution is different from the output resolution. You can also define a mask that will be applied to the image as a multiplier. See the Masks section bellow for masks definition.
Output image = sum(multiplier * image * mask)
When adding a new element to the Images list, you can choose between an Image and a Variant. A variant is a sublist of images from which only one image will be summed at a time. This can be used when you want to create different combinations of compositions (two different environments, two different set of lights, ...).
When exporting the combinations from the Ouput section, all the variant combinations will be exported. You can select which variant is displayed in the preview in the Displayed Image foldout of the Output section.
If you defined intensities in the section bellow, the same intensity will be applied to each image of the variant when exporting the combinations.
Figure B : Example of variant with 2 versions of the headlights (on and off)
To be able to use masks in the Images section, you must define them in the Masks section. A mask is defined by a file and a layer, and by specific mask settings. It also has Display settings to define how it is positionned in the output image, just like all the other images.
You can click on a mask dark background to preview it in the preview widget, click anywhere else or in the Ouput section to display the composited output back.
The mask settings appear in the settings widget when a mask is selected :
The Mask Type : define how the mask behaves. When using the type Multiplier, the values of the mask will be multiplied with the values of the image directly. When using any other type, the pixels corresponding to the selected condition will be set to 1, and the others to 0,
The Channel defines which channel of the selected layer will be used to check the condition,
The Min, Max or Range define the range of values that validate the condition,
The Inclusive toggle defines whether the </> are inclusive (<=/=>) or not.
The batch intensities section enables you to define a batch of outputs using different multipliers for each image.
Each line defines an output that can be named, and for which each image must be assigned a multiplier. If an element in the Images list is a variant, the same multiplier will be applied to each image in the variant. See the example bellow for better understanding.
You can select an output to preview it in the interface : all the multipliers in the Images list will be set accordingly. You can also use the arrows bellow the list to switch between the different outputs.
These intensities can be copied/pasted from a spreadsheet (the first column must always contain the output name), or saved/loaded from a .csv file.
Figure C : example of intensities for a set of 4 images
Figure D : Input images
Figure E : Output images generated with the output settings from Figure A (define the prefix/suffix), the variant from Figure B (headlight on/off), and the batch intensities from Figure C (environment intensity 1/0.1/0)