KHRMaterialsAnisotropy

KHR_materials_anisotropy defines anisotropy (directionally-dependent reflections) on a PBR material.

Illustration

Figure: Effect of each color channel in the anisotropyTexture. Left to right: the full anisotropy texture, filling the red channel with black, filling the green channel with black, filling the blue channel with black. Source: Khronos Group & Wayfair.

This extension defines the anisotropic property of a material as observable with brushed metals for instance. An asymmetric specular lobe model is introduced to allow for such phenomena. The visually distinct feature of that lobe is the elongated appearance of the specular reflection. For a single punctual light source, the specular reflection will eventually degenerate into a zero width line in the limit, that is where the material is fully anisotropic, as opposed to be fully isotropic in which case the specular reflection is radially symmetric.

Properties:

Example

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

import { KHRMaterialsAnisotropy, Anisotropy } from '@gltf-transform/extensions';

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

// Create an Anisotropy property.
const anisotropy = anisotropyExtension.createAnisotropy()
    .setAnisotropyStrength(1.0)
    .setAnisotropyRotation(Math.PI / 4);

// Attach the property to a Material.
material.setExtension('KHR_materials_anisotropy', anisotropy);

Hierarchy

Static properties

EXTENSION_NAME: "KHR_materials_anisotropy"

Properties

extensionName: "KHR_materials_anisotropy"
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.