Inspired 3D: Compositing Techniques and Methods — Part 1

From the Inspired 3D series, David Parrish tackles compositing techniques and methods.
Posted In | Magazines: VFXWorld

[Figures 29 & 30] A mix function (left) with 75% of the cube and 25% of the beach ball. A multiply function (right) with the block being multiplied by the beach ball.

Mix
The mix function combines two images together based on a percentage input by the compositor. The percentage represents the amount of the A input that will be included in the resulting image. The percentage remaining to reach 100% is the amount of the B input that will be mixed into the output image. For example, if the input number for the mix function is 75%, then the resulting image will include 75% of the A image and 25% of the B image (see Figure 29). This function applies the percentage to the color channels as well as the alpha.

Multiply and Divide
The multiply function multiplies all of the channels in the A input image by their respective channels in the B input image. Because values are multiplied together, any pixel location with a zero value in either image results in a zero pixel value in the output image. This means that the resulting image can only have values where the two input images overlap (see Figure 30). Any area in the A image multiplied with almost any corresponding area in the B image will be darkened by the multiplication. This is true because the values in each channel are normalized (placed in a range from 0 to 1), meaning two decimals are usually being multiplied together. The only instance in which darkening does not occur is when corresponding areas in both images are pure white, giving them each values of 1, and producing and output value, which is also 1. Multiplication of color channels produces results that are not intuitive to how the eyes interpret color. For this reason, I rarely use the multiply function in normal compositing tasks.

[Figures 31 & 32] A max function (left) with the block and the beach ball as the inputs. A min function (right), with the block and the beach ball as the inputs.

The opposite of the multiply function is the divide function. The divide function produces an image with value only where the A input image has values. The B input will appear only in the areas in which it overlaps the A input (see Figure 31). The areas in which the A image exists outside of the B image (the bottom-right corner of the block in Figure 31) appear as an unchanged version of the A input image. This area has values in the channel for the A input but no values for the B input. This produces the illegal operation of division by zero, so the compositing software simply makes the choice of preserving the existing value for the output image.

Max and Min
The max function takes the maximum value from the two inputs and assigns that value to the output image. The brightest portion of each image is used in the resulting image (see Figure 32). Unlike many of the previous examples, the order of application does not matter with this function. Switching the A and B inputs will yield the exact same result. Given two images with solid alpha channels defining their shapes, the resulting alpha channel of a max function will be the combination of the two input image shapes.

The inverse of the max function is the min function. Because this takes the minimum values of each input, the resulting image will only have values where the two input images overlap. In those areas, each pixel will be the lowest between the two inputs (see Figure 33). The alpha channel will only exist in the overlap as well, because in all other areas, one of the alpha channels is 0.







Comments

  No comments. Be the first to comment below.


Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Use <!--pagebreak--> to create page breaks.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.