Instance Property

emission

An object that defines the color emitted by each point on a surface.

Declaration

var emission: SCNMaterialProperty { get }

Discussion

You can use an emissive map texture to simulate parts of a surface that glow with their own light. SceneKit does not treat the material as a light source—rather, the emission property determines colors for a material independent of lighting. (To create an object that appears to glow, you may wish to combine a geometry with an emissive map and additional SCNLight objects added to the scene.)

By default, the emissive property’s contents object is a black color, causing the property to have no visible effect. Setting the emissive property’s contents to any solid color adds a uniform color to the material independent of lighting. To create a selective glow effect, set the property’s contents to an image or other texture-mapped content whose glowing areas use bright colors and whose other areas use darker colors. In the darker-colored portions of the emissive map (and portions with reduced opacity), the other visual properties of the material contribute to its appearance under scene lighting.

The figure below shows a material (with a texture for its diffuse property) before and after providing an emissive map image.

Figure 1

Adding an emissive map to a material

See Also

Visual Properties for Special Effects

var normal: SCNMaterialProperty

An object that defines the nominal orientation of the surface at each point for use in lighting.

var selfIllumination: SCNMaterialProperty

An object that provides color values representing the global illumination of the surface.

var ambientOcclusion: SCNMaterialProperty

An object that provides color values to be multiplied with the ambient light affecting the material.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software