This page provides information on the V-Ray Composite Map.

**Overview**

The VRayCompTex texture map allows users to compose two textures together using one of the provided blending modes. The example shown here includes a pale colored, cracked paint texture as** Source A **and a matte-surface metal texture as **Source B** composited together with the **Operator **set to **Multiply (A *B)**.

**Parameters**

**Source A** – Specifies the first of the two textures that are going to be blended.

**Source B** – Specifies the second of the two textures that are going to be blended.

**Operator** – Specifies the operation from a list of different blend modes.

**Add (A+B)** – Simply adds pixel values of one texture with the other. In case of values above 256 (in the case of RGB), white is displayed.**Subtract (A-B)** – Simply subtracts pixel values of Source B from Source A. In case of negative values, black is displayed. **Difference (|A-B|)** – Difference subtracts Source B from Source A, to always get a positive value. Blending with black produces no change, as values for all colors are 0. (The RGB value for black is 0, 0, 0). Blending with white inverts the picture.**Multiply (A*B)** – Multiplies the numbers for each pixel of Source A with the corresponding pixel for Source B. As a simple multiplication can get values as high as 65025, which is far higher than the maximum allowed value, 255, the result is divided by 255. The result is a darker picture. Formula: Result = ( Source A Color) * ( Source B Color) /255.**Divide (A/B)** – Simply divides pixel values of Source A by the corresponding values of Source B .**Minimum (Min{A,B})** – Takes the darkest value for each pixel from each source.**Maximum (Max{A,B})** – Takes the brightest value for each pixel from each source.**Color Shift (HSL{A+B})** – Adds color B to color A in HSL space, that is B is interpreted as translation delta in HSL space.**Color Tint (HSL{A+B})** – Adds color B to color A in HSL space, but color A's hue is directly replaced with color B's hue.**Blend Alpha Straight (A*{1-B.a}+B*B.a)** – Interpolates between A and B by multiplying them by B's alpha component.**Blend Alpha Premultiplied (A*{1-B.a}+B)** – Interpolates between A and B by multiplying them by B's alpha component. Assumes B has already been multiplied by its alpha component.

**Multiplier **– Specifies the degree to which the textures are blended together. Please see the A+B Multiplier an the A-B Multiplier examples below.

The example above shows how to produce negative luminosity delta using two VRayCompTex maps. The second VRayCompTex map is plugged as a **Source B** to the first VRayCompTex map. The **Operator** is set to **Subtract (A-B)**.

Note that in the Difference and Subtract modes, the alpha channel is also taken into consideration and the final result for the color is |R1-R2| |G1-G2| |B1-B2| |A1-A2|. The default value of the alpha channel of 1 for both images in this case produces 0 as a result.

**Example: Multiplier for Add (A+B) operator**

In this example the VRayCompTex is composed from a VRayEdgesTex as Source A and a VRayColor2Bump (a wooden bitmap texture) as Source B with an Add (A+B) Operator.

The Multiplier of the VRayCompTex controls the appearance of the wooden bump texture referred to the rounded corners of the boxes.

**Example: Multiplier for Difference (|A-B|) operator**

This example shows the Difference A-B Operator. Source B is subtracted from Source A, to always get a positive value.

Blending with black produces no change, as values for all colors are 0. Blending with white inverts the image.

**Source A texture**

**Source B texture**

**Common Uses**

V-Ray Composite Map result - **Multiply (A*B)**

**Source A** texture

**Source B** texture