Instance Property

multiply

An object that provides color values that are multiplied with pixels in a material after all other shading is complete.

Declaration

@property(nonatomic, readonly) SCNMaterialProperty *multiply;

Discussion

After combining a material’s other visual properties with lighting and other information about a scene, Scene kit multiplies the color of each rendered pixel by the color this property provides. You can use this property to darken or tint a surface independent of the effects of lighting and other properties, or to add precomputed lighting to a scene via a shadow map.

By default, the multiply property’s contents object is a white color, causing the property to have no visible effect.

The figure below shows a material (with textures for its diffuse and emission properties) before and after setting the multiply property’s contents to a solid color. Notice that the multiply color modulates even the bright areas added by the emissive map.

Figure 1

Adding a multiply color to a material

See Also

Visual Properties for Basic Shading

diffuse

An object that manages the material’s diffuse response to lighting.

ambient

An object that manages the material’s response to ambient lighting.

specular

An object that manages the material’s specular response to lighting.

reflective

An object that defines the reflected color for each point on a surface.

transparent

An object that determines the opacity of each point in a material.

shininess

The sharpness of specular highlights. Animatable.

fresnelExponent

A factor affecting the material’s reflectivity. Animatable.

locksAmbientWithDiffuse

A Boolean value that determines whether the material responds identically to both ambient and diffuse lighting. Animatable.