During rendering, Maya software can generate an image file that contains color channels (RGB), a mask channel (RGBA), a depth channel (RGBZ) or a combination of the three (RGBAZ).
By default, Maya generates an image file with three color channels and a mask channel, but you can control the types of channels included in rendered image files. Mask and depth channels are mainly used for compositing. If you don’t plan on compositing rendered images, you don’t have to generate mask or depth channels during rendering. The file size increases if an image contains a mask or depth channel, and the computation time may also increase.
To turn channels on or off, see Enable color, depth, and mask channels for rendered images.
Each pixel in a bitmap image contains three color channels, each of which represent the amount of red, green, or blue in the image. Each pixel might also have an alpha (mask) channel to achieve transparency and a depth channel that represents the distance from the camera. Some image formats cannot include embedded mask or depth channels; in these cases, Maya can generate a separate mask or depth file.
A mask channel (or alpha channel) defines where an image is opaque or transparent. Opaque regions of the objects are white, semi-transparent regions are gray, and transparent regions are black.
Use a mask channel to layer images for compositing software. For instance, you can use the mask channel of an image as a matte to composite an object (without its background) with another image.
A depth channel (or Z depth or Z buffer channel) provides 3D information about an image. It represents the distance of objects from the camera.
Depth channels are used by compositing software. For instance, you can use the depth channel to correctly composite several layers while respecting the proper occlusions.
Maya stores depth values as -1/z. These represent the near and far clipping values.
When you render in layers the compositing application must be able to tell which part of which object goes behind or in front of another one. Alpha channels do not contain this information, so you can use the Black Hole mode of the Matte Opacity feature in Maya to produce cutout regions that composite correctly. See Modify a mask channel.