KHR_materials_emissive_strength defines emissive strength and enables high-dynamic-range (HDR) emissive materials.

EXPERIMENTAL: This extension is not yet ratified by Khronos, and its API within glTF-Transform is subject to breaking changes without semver-compliant major version updates.

The core glTF 2.0 material model includes emissiveFactor and emissiveTexture to control the color and intensity of the light being emitted by the material, clamped to the range [0.0, 1.0]. However, in PBR environments with HDR reflections and lighting, stronger emission effects may be desirable.

In this extension, a new emissiveStrength scalar factor is supplied, which governs the upper limit of emissive strength per material and may be given arbitrarily high values.

For implementations where a physical light unit is needed, the units for the multiplicative product of the emissive texture and factor are candela per square meter (cd / m2), sometimes called nits. Many realtime rendering engines simplify this calculation by assuming that an emissive factor of 1.0 results in a fully exposed pixel.

Properties:

Example

import { MaterialsEmissiveStrength, EmissiveStrength } from '@gltf-transform/extensions';

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

// Create EmissiveStrength property.
const emissiveStrength = emissiveStrengthExtension
    .createEmissiveStrength().setEmissiveStrength(5.0);

// Assign to a Material.
material.setExtension('KHR_materials_emissive_strength', emissiveStrength);

Hierarchy

  • Extension
    • MaterialsEmissiveStrength

Properties

extensionName: "KHR_materials_emissive_strength" = ...
prereadTypes: PropertyType[]

Before reading, extension should be called for these Property types. Most extensions don't need to implement this.

prewriteTypes: PropertyType[]

Before writing, extension should be called for these Property types. Most extensions don't need to implement this.

readDependencies: string[]

Dependency IDs needed by this extension, to be installed before I/O.

Methods

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

  • Installs dependencies required by the extension.

  • 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.

  • Used by the PlatformIO utilities when reading a glTF asset. This method may optionally be implemented by an extension, and should then support any property type declared by the Extension's Extension.prereadTypes list. The Extension will be given a ReaderContext instance, and is expected to update either the context or its JSONDocument with resources known to the Extension. Most extensions don't need to implement this.

  • Used by the PlatformIO utilities when writing a glTF asset. This method may optionally be implemented by an extension, and should then support any property type declared by the Extension's Extension.prewriteTypes list. The Extension will be given a WriterContext instance, and is expected to update either the context or its JSONDocument with resources known to the Extension. Most extensions don't need to implement this.

  • 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.

  • register(): void
  • Performs first-time setup for the extension. Must be idempotent.

Function symbol, f(📦) → 📦, where the argument and output are a box labeled 'glTF'.

Made by Don McCurdy TypeDoc documentation Copyright 2021 under MIT license