KHRMaterialsIridescence

KHR_materials_iridescence defines iridescence (thin film interference) on a PBR material.

Illustration

Figure: Varying levels of iridescence IOR values. Source: Khronos Group.

Iridescence describes an effect where hue varies depending on the viewing angle and illumination angle: A thin-film of a semi-transparent layer results in inter-reflections and due to thin-film interference, certain wavelengths get absorbed or amplified. Iridescence can be seen on soap bubbles, oil films, or on the wings of many insects. With this extension, thickness and index of refraction (IOR) of the thin-film can be specified, enabling iridescent materials.

Properties:

Example

The KHRMaterialsIridescence class provides a single ExtensionProperty type, Iridescence, which may be attached to any Material instance. For example:

import { KHRMaterialsIridescence, Iridescence } from '@gltf-transform/extensions';

// Create an Extension attached to the Document.
const iridescenceExtension = document.createExtension(KHRMaterialsIridescence);

// Create an Iridescence property.
const iridescence = iridescenceExtension.createIridescence()
    .setIridescenceFactor(1.0)
    .setIridescenceIOR(1.8);

// Attach the property to a Material.
material.setExtension('KHR_materials_iridescence', iridescence);

Hierarchy

Static properties

EXTENSION_NAME: "KHR_materials_iridescence"

Properties

extensionName: "KHR_materials_iridescence"
prereadTypes: import("/Users/donmccurdy/Documents/Projects/glTF-Transform/packages/core/src/constants").PropertyType[]
prewriteTypes: import("/Users/donmccurdy/Documents/Projects/glTF-Transform/packages/core/src/constants").PropertyType[]

Methods

  • dispose(): void
  • isRequired(): boolean
  • Indicates to the client whether it is OK to load the asset when this extension is not recognized. Optional extensions are generally preferred, if there is not a good reason to require a client to completely fail when an extension isn't known.

  • listProperties(): ExtensionProperty[]
  • Indicates to the client whether it is OK to load the asset when this extension is not recognized. Optional extensions are generally preferred, if there is not a good reason to require a client to completely fail when an extension isn't known.

Function symbol, where the argument and output are a box labeled 'glTF'.

Made by Don McCurdy. Documentation built with greendoc and published under Creative Commons Attribution 3.0.