API

Class OpenPBRMaterialLoadingAdapter

Material Loading Adapter for OpenPBR materials that provides a unified OpenPBR-like interface.

Implements

  • IMaterialLoadingAdapter
Index
alphaCutOff ambientOcclusionTexture ambientOcclusionTextureStrength backFaceCulling baseColor baseColorTexture baseDiffuseRoughness baseDiffuseRoughnessTexture baseMetalness baseMetalnessTexture coatColor coatColorTexture coatDarkening coatDarkeningTexture coatIor coatRoughness coatRoughnessAnisotropy coatRoughnessTexture coatWeight coatWeightTexture diffuseTransmissionTint diffuseTransmissionTintTexture emissionColor emissionColorTexture emissionLuminance fuzzColor fuzzColorTexture fuzzRoughness fuzzRoughnessTexture fuzzWeight fuzzWeightTexture geometryCoatNormalTexture geometryCoatNormalTextureScale geometryCoatTangentAngle geometryCoatTangentTexture geometryNormalTexture geometryOpacity geometryTangentAngle geometryTangentTexture geometryThinWalled glossiness isUnlit material refractionBackgroundTexture specularColor specularColorTexture specularIor specularRoughness specularRoughnessAnisotropy specularRoughnessTexture specularWeight specularWeightTexture subsurfaceColor subsurfaceColorTexture subsurfaceRadius subsurfaceRadiusScale subsurfaceScatterAnisotropy subsurfaceWeight subsurfaceWeightTexture thinFilmIor thinFilmThicknessMaximum thinFilmThicknessMinimum thinFilmThicknessTexture thinFilmWeight thinFilmWeightTexture transmissionColor transmissionDepth transmissionDispersionAbbeNumber transmissionDispersionScale transmissionScatter transmissionScatterAnisotropy transmissionScatterTexture transmissionWeight transmissionWeightTexture transparencyAsAlphaCoverage twoSidedLighting unlit useAlphaFromBaseColorTexture useMetallicFromMetallicTextureBlue useRoughnessFromMetallicTextureGreen volumeThickness volumeThicknessTexture
  • get ambientOcclusionTextureStrength(): number

    Gets the ambient occlusion texture strength from the texture's level property.

    Returns number

    The strength value, defaults to 1.0 if no texture or level is set

  • set ambientOcclusionTextureStrength(value: number): void

    Sets the ambient occlusion texture strength by modifying the texture's level.

    Parameters

    • value: number

      The strength value (typically 0-1)

    Returns void

  • get baseDiffuseRoughnessTexture(): Nullable<BaseTexture>

    Gets the base diffuse roughness texture of the OpenPBR material.

    Returns Nullable<BaseTexture>

    The diffuse roughness texture or null

  • set baseDiffuseRoughnessTexture(value: Nullable<BaseTexture>): void

    Sets the base diffuse roughness texture of the OpenPBR material.

    Parameters

    • value: Nullable<BaseTexture>

      The diffuse roughness texture or null

    Returns void

  • get coatRoughnessAnisotropy(): number

    Gets the coat roughness anisotropy. TODO: Implementation pending OpenPBR coat anisotropy feature availability.

    Returns number

    Currently returns 0 as coat anisotropy is not yet available

  • set coatRoughnessAnisotropy(value: number): void

    Sets the coat roughness anisotropy. TODO: Implementation pending OpenPBR coat anisotropy feature availability.

    Parameters

    • value: number

      The coat anisotropy intensity value

    Returns void

  • set geometryCoatTangentAngle(value: number): void

    Sets the coat tangent angle for anisotropy. TODO: Implementation pending OpenPBR coat anisotropy feature availability.

    Parameters

    • value: number

      The coat anisotropy rotation angle in radians

    Returns void

  • get geometryCoatTangentTexture(): Nullable<BaseTexture>

    Gets the coat tangent texture for anisotropy. TODO: Implementation pending OpenPBR coat anisotropy feature availability.

    Returns Nullable<BaseTexture>

    Currently returns null as coat anisotropy is not yet available

  • set geometryCoatTangentTexture(value: Nullable<BaseTexture>): void

    Sets the coat tangent texture for anisotropy. TODO: Implementation pending OpenPBR coat anisotropy feature availability.

    Parameters

    • value: Nullable<BaseTexture>

      The coat anisotropy texture or null

    Returns void

  • get geometryTangentTexture(): Nullable<BaseTexture>

    Gets the geometry tangent texture for anisotropy.

    Returns Nullable<BaseTexture>

    The anisotropy texture or null

  • set geometryTangentTexture(value: Nullable<BaseTexture>): void

    Sets the geometry tangent texture for anisotropy. Automatically enables using anisotropy from the tangent texture.

    Parameters

    • value: Nullable<BaseTexture>

      The anisotropy texture or null

    Returns void

  • get specularColorTexture(): Nullable<BaseTexture>

    Gets the specular color texture of the OpenPBR material.

    Returns Nullable<BaseTexture>

    The specular color texture or null

  • set specularColorTexture(value: Nullable<BaseTexture>): void

    Sets the specular color texture of the OpenPBR material. If the same texture is used for specular weight, optimizes by using alpha channel for weight.

    Parameters

    • value: Nullable<BaseTexture>

      The specular color texture or null

    Returns void

  • get specularWeightTexture(): Nullable<BaseTexture>

    Gets the specular weight texture of the OpenPBR material.

    Returns Nullable<BaseTexture>

    The specular weight texture or null

  • set specularWeightTexture(value: Nullable<BaseTexture>): void

    Sets the specular weight texture of the OpenPBR material. If the same texture is used for specular color, optimizes by using alpha channel for weight.

    Parameters

    • value: Nullable<BaseTexture>

      The specular weight texture or null

    Returns void

  • get subsurfaceRadius(): number

    Gets the subsurface radius for subsurface scattering. subsurfaceRadiusScale * subsurfaceRadius gives the mean free path per color channel.

    Returns number

  • set subsurfaceRadius(value: number): void

    Sets the subsurface radius for subsurface scattering. subsurfaceRadiusScale * subsurfaceRadius gives the mean free path per color channel.

    Parameters

    • value: number

      The subsurface radius value

    Returns void

  • get subsurfaceRadiusScale(): Color3

    Gets the subsurface radius scale for subsurface scattering. subsurfaceRadiusScale * subsurfaceRadius gives the mean free path per color channel.

    Returns Color3

  • set subsurfaceRadiusScale(value: Color3): void

    Sets the subsurface radius scale for subsurface scattering. subsurfaceRadiusScale * subsurfaceRadius gives the mean free path per color channel.

    Parameters

    • value: Color3

      The subsurface radius scale as a Color3

    Returns void

  • get useAlphaFromBaseColorTexture(): boolean

    Gets whether alpha is used from the base color texture.

    Returns boolean

    True if alpha is used from the base color texture

  • set useAlphaFromBaseColorTexture(value: boolean): void

    Sets whether to use alpha from the base color texture. Note: OpenPBR handles this differently through the baseColorTexture alpha channel.

    Parameters

    • value: boolean

      True to use alpha from base color texture (handled automatically in OpenPBR)

    Returns void

  • set useMetallicFromMetallicTextureBlue(value: boolean): void

    Sets whether to use metalness from the metallic texture's blue channel.

    Parameters

    • value: boolean

      True to use blue channel for metalness

    Returns void

  • set useRoughnessFromMetallicTextureGreen(value: boolean): void

    Sets whether to use roughness from the metallic texture's green channel.

    Parameters

    • value: boolean

      True to use green channel for roughness

    Returns void

  • Configures glTF-style anisotropy for the OpenPBR material.

    Parameters

    • useGltfStyle: boolean = true

      Whether to use glTF-style anisotropy

    Returns void

  • Configures specular properties for OpenPBR material.

    Parameters

    • _enableEdgeColor: boolean = false

      Whether to enable edge color support (ignored for OpenPBR)

    Returns void

  • Sets the normal map inversions for the OpenPBR material. Note: OpenPBR may handle normal map inversions differently or may not need them.

    Parameters

    • invertX: boolean

      Whether to invert the normal map on the X axis (may be ignored)

    • invertY: boolean

      Whether to invert the normal map on the Y axis (may be ignored)

    Returns void