Class

MDLPhysicallyPlausibleScatteringFunction

A set of material properties that describes a physically realistic shading model for materials.

Declaration

@interface MDLPhysicallyPlausibleScatteringFunction : MDLScatteringFunction

Overview

The set of material properties that define a material's response to lighting is also called the Bidirectional Reflectance Distribution Function, or BRDF, for surfaces shaded using that MDLMaterial object. The properties defined by this class, along with some properties inherited from the superclass MDLScatteringFunction, describe a shading model that more closely simulates real-world lighting physics than traditional shading models. (This shading model is similar to those used in recent game engines and feature films.)

The valid range for each material property in this shading function is 0.0 to 1.0, inclusive. Creating a new scattering function object with the inherited init method creates a set of material properties with useful default values for this shading model.

Topics

Working with Shading Properties

subsurface

The degree to which light scatters under the surface of the material.

metallic

The degree to which the material appears as a dielectric surface (lower values) or as a metal (higher values).

specularAmount

The tendency of the material to generate specular highlights.

specularTint

The balance of color for specular highlights, between the light color (lower values) and the material’s base color (at higher values).

roughness

The degree to which a material appears smooth, affecting both diffuse and specular response.

anisotropic

The degree to which specular highlights elongate in the direction of the local tangent basis.

anisotropicRotation

The angle at which anisotropic effects are rotated relative to the local tangent basis.

sheen

The intensity of highlights that appear only at glancing angles on a material’s surface.

sheenTint

The balance of color for highlights that appear only at glancing angles, between the light color (lower values) and the material’s base color (at higher values).

clearcoat

The intensity of a second specular highlight, similar to the gloss that results from a clear coat on an automotive finish.

clearcoatGloss

The sharpness of a second specular highlight, similar to the gloss that results from a clear coat on an automotive finish.

Instance Properties

Relationships

See Also

Materials

MDLMaterial

A collection of material properties that together describe the intended surface appearance for rendering a 3D object.

MDLMaterialProperty

A definition for one specific aspect of the rendering parameters for a material.

MDLScatteringFunction

A set of material properties that describes a basic shading model for materials, and the superclass for more complex shading models.

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