KHR_materials_sheen defines a velvet-like sheen layered on a glTF PBR material.

Illustration

Figure: A cushion, showing high material roughness and low sheen roughness. Soft highlights at edges of the material show backscattering from microfibers. Source: Khronos Group.

A sheen layer is a common technique used in Physically-Based Rendering to represent cloth and fabric materials.

Properties:

Example

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

import { MaterialsSheen, Sheen } from '@gltf-transform/extensions';

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

// Create a Sheen property.
const sheen = sheenExtension.createSheen()
    .setSheenColorFactor([1.0, 1.0, 1.0]);

// Attach the property to a Material.
material.setExtension('KHR_materials_sheen', sheen);

Hierarchy

  • Extension
    • MaterialsSheen

Properties

extensionName: "KHR_materials_sheen" = ...
EXTENSION_NAME: "KHR_materials_sheen" = ...

Methods

  • dispose(): void
  • Disables and removes the extension from the Document.

  • 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<IProperty>[]
  • Lists all ExtensionProperty instances associated with, or created by, this extension. Includes only instances that are attached to the Document's graph; detached instances will be excluded.

  • 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, f(📦) → 📦, where the argument and output are a box labeled 'glTF'.

Made by Don McCurdy TypeDoc documentation Copyright 2021 under MIT license