Scripting API
MaterialsModule
MetallicRoughnessPbrMaterial

MetallicRoughnessPbrMaterial

The MetallicRoughnessPbrMaterial class encapsulates physically based materials.

Inherits From : MaterialBase

Example

Properties

PropertyDescription
baseColor
(get) (Not Available)
(set) baseColor: TextureBase | null


Specifies the baseColor texture of the material.
baseColorFactor
(get) baseColorFactor: ColorSignal
(set) baseColorFactor: ColorSignal


Specifies a ColorSignal for a base color factor. A ColorSignal may be created using the RGBA() and HSVA() methods of the Reactive module.
Note that RgbaSignal is always returned.
See Also: ReactiveModule.RGBA and ReactiveModule.HSVA.
baseColorTextureTransform
(get) baseColorTextureTransform: TextureTransform
(set) baseColorTextureTransform: TextureTransformSignal


Specifies the coordinates transform of the baseColorFactor texture of this material.
blendMode
(get) blendMode: StringSignal<MaterialsModule.BlendMode>
(set) blendMode: StringSignal<MaterialsModule.BlendMode>


Specifies the material blend mode.
diffuseEnvironment
(get) (Not Available)
(set) diffuseEnvironment: TextureBase | null


Set a diffuse environment texture on this material.
emissive
(get) (Not Available)
(set) emissive: TextureBase | null


Specifies the emissive texture of the material.
emissiveColorFactor
(get) emissiveColorFactor: ColorSignal
(set) emissiveColorFactor: ColorSignal


Specifies a ColorSignal for the emissive color factor.
This value defines linear multipliers for the sampled texels of the emissive texture.
A ColorSignal may be created using the RGBA() and HSVA() methods of the Reactive module.
Note that RgbaSignal is always returned.
See Also: ReactiveModule.RGBA and ReactiveModule.HSVA.
emissiveTextureTransform
(get) emissiveTextureTransform: TextureTransform
(set) emissiveTextureTransform: TextureTransformSignal


Specifies the coordinates transform of the emissive texture of this material.
metallicFactor
(get) metallicFactor: ScalarSignal
(set) metallicFactor: ScalarSignal


Specifies the metallic factor.
metallicRoughness
(get) (Not Available)
(set) metallicRoughness: TextureBase | null


Specifies the metallicRoughness texture of the material.
metallicRoughnessTextureTransform
(get) metallicRoughnessTextureTransform: TextureTransform
(set) metallicRoughnessTextureTransform: TextureTransformSignal


Specifies the coordinates transform of the MetallicRoughness texture of this material.
normalTextureScale
(get) normalTextureScale: ScalarSignal
(set) normalTextureScale: ScalarSignal


The scalar parameter applied to each normal vector of the texture. This value scales the normal vector in X and Y directions.
normalTextureTransform
(get) normalTextureTransform: TextureTransform
(set) normalTextureTransform: TextureTransformSignal


Specifies the coordinates transform of the normal texture of this material.
occlusion
(get) (Not Available)
(set) occlusion: TextureBase | null


Specifies the occlusion texture of the material.
occlusionStrength
(get) occlusionStrength: ScalarSignal
(set) occlusionStrength: ScalarSignal


Specifies the occlusion strength.
occlusionTextureTransform
(get) occlusionTextureTransform: TextureTransform
(set) occlusionTextureTransform: TextureTransformSignal


Specifies the coordinates transform of the Occlusion texture of this material.
roughnessFactor
(get) roughnessFactor: ScalarSignal
(set) roughnessFactor: ScalarSignal


Specifies the roughness factor.
roughnessMetallic
(get) (Not Available)
(set) roughnessMetallic: TextureBase | null


Specifies the RoughnessMetallic texture of the material.
roughnessMetallicTextureTransform
(get) roughnessMetallicTextureTransform: TextureTransform
(set) roughnessMetallicTextureTransform: TextureTransformSignal


Specifies the coordinates transform of the RoughnessMetallic texture of this material.
specularEnvironment
(get) (Not Available)
(set) specularEnvironment: TextureBase | null


Set a specular environment texture on this material.
staticEnvironmentRotation
(get) staticEnvironmentRotation: PointSignal
(set) staticEnvironmentRotation: PointSignal


Specifies the rotation signal to be used for transformations of static environment textures.

Methods

MethodDescription
getBaseColor
getBaseColor(): Promise<TextureBase | null>


Returns a promise that is resolved with the texture associated with a given material or null if no texture was assigned.
getDiffuseEnvironment
getDiffuseEnvironment(): Promise<TextureBase | null>


Returns a promise that is resolved with the diffuse environment texture associated with a given material or null if no texture was assigned.
getEmissive
getEmissive(): Promise<TextureBase | null>


Returns a promise that is resolved with the texture associated with a given material or null if no texture was assigned.
getMetallicRoughness
getMetallicRoughness(): Promise<TextureBase | null>


Returns a promise that is resolved with the texture associated with a given material or null if no texture was assigned.
getNormal
getNormal(): Promise<TextureBase | null>


Returns a promise that is resolved with the texture associated with a given material or null if no texture was assigned.
getOcclusion
getOcclusion(): Promise<TextureBase | null>


Returns a promise that is resolved with the texture associated with a given material or null if no texture was assigned.
getRoughnessMetallic
getRoughnessMetallic(): Promise<TextureBase | null>


Returns a promise that is resolved with the texture associated with a given material or null if no texture was assigned.
getSpecularEnvironment
getSpecularEnvironment(): Promise<TextureBase | null>


Returns a promise that is resolved with the specular environment texture associated with a given material or null if no texture was assigned.
setNormal
setNormal(texture: TextureBase | null): Promise<void>


Assign normal texture for this material.
Returns a promise that is resolved when the texture is assigned.