KHRMaterialsClearcoat

KHR_materials_clearcoat defines a clear coating on a glTF PBR material.

Illustration

Figure: Comparison of a carbon-fiber material without clearcoat (left) and with clearcoat (right). Source: Filament.

A clear coat is a common technique used in Physically-Based Rendering for a protective layer applied to a base material. Commonly used to represent car paint, carbon fiber, or thin lacquers.

Properties:

Example

import { KHRMaterialsClearcoat, Clearcoat } from '@gltf-transform/extensions';

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

// Create Clearcoat property.
const clearcoat = clearcoatExtension.createClearcoat()
.setClearcoatFactor(1.0);

// Assign to a Material.
material.setExtension('KHR_materials_clearcoat', clearcoat);

Hierarchy

Static properties

EXTENSION_NAME: "KHR_materials_clearcoat"

Properties

extensionName: "KHR_materials_clearcoat"

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.