PbrMaterial

PbrMaterial class

Material for physically based rendering based on albedo color/metallic/roughness

Methods

constructor

NameDescription
constructor()Construct a default PBR material instance

Result:


constructor_overload

NameDescription
constructor_overload(albedo)Construct a default PBR material with specified albedo color value.

Parameters:

NameTypeDescription
albedoVector3The default albedo color value

Result:


getTransparency

NameDescription
getTransparency()Gets or sets the transparency factor. The factor should be ranged between 0(0%, fully opaque) and 1(100%, fully transparent) Any invalid factor value will be clamped. The transparency factor.

Result:


setTransparency

NameDescription
setTransparency(value)Gets or sets the transparency factor. The factor should be ranged between 0(0%, fully opaque) and 1(100%, fully transparent) Any invalid factor value will be clamped. The transparency factor.

Result:


getNormalTexture

NameDescription
getNormalTexture()Gets or sets the texture of normal mapping

Result:


setNormalTexture

NameDescription
setNormalTexture(value)Gets or sets the texture of normal mapping

Result:


getSpecularTexture

NameDescription
getSpecularTexture()Gets or sets the texture for specular color

Result:


setSpecularTexture

NameDescription
setSpecularTexture(value)Gets or sets the texture for specular color

Result:


getAlbedoTexture

NameDescription
getAlbedoTexture()Gets or sets the texture for albedo

Result:


setAlbedoTexture

NameDescription
setAlbedoTexture(value)Gets or sets the texture for albedo

Result:


getAlbedo

NameDescription
getAlbedo()Gets or sets the base color of the material

Result:


setAlbedo

NameDescription
setAlbedo(value)Gets or sets the base color of the material

Result:


getOcclusionTexture

NameDescription
getOcclusionTexture()Gets or sets the texture for ambient occlusion

Result:


setOcclusionTexture

NameDescription
setOcclusionTexture(value)Gets or sets the texture for ambient occlusion

Result:


getOcclusionFactor

NameDescription
getOcclusionFactor()Gets or sets the factor of ambient occlusion

Result:


setOcclusionFactor

NameDescription
setOcclusionFactor(value)Gets or sets the factor of ambient occlusion

Result:


getMetallicFactor

NameDescription
getMetallicFactor()Gets or sets the metalness of the material, value of 1 means the material is a metal and value of 0 means the material is a dielectric.

Result:


setMetallicFactor

NameDescription
setMetallicFactor(value)Gets or sets the metalness of the material, value of 1 means the material is a metal and value of 0 means the material is a dielectric.

Result:


getRoughnessFactor

NameDescription
getRoughnessFactor()Gets or sets the roughness of the material, value of 1 means the material is completely rough and value of 0 means the material is completely smooth

Result:


setRoughnessFactor

NameDescription
setRoughnessFactor(value)Gets or sets the roughness of the material, value of 1 means the material is completely rough and value of 0 means the material is completely smooth

Result:


getMetallicRoughness

NameDescription
getMetallicRoughness()Gets or sets the texture for metallic(in R channel) and roughness(in G channel)

Result:


setMetallicRoughness

NameDescription
setMetallicRoughness(value)Gets or sets the texture for metallic(in R channel) and roughness(in G channel)

Result:


getEmissiveTexture

NameDescription
getEmissiveTexture()Gets or sets the texture for emissive

Result:


setEmissiveTexture

NameDescription
setEmissiveTexture(value)Gets or sets the texture for emissive

Result:


getEmissiveColor

NameDescription
getEmissiveColor()Gets or sets the emissive color

Result:


setEmissiveColor

NameDescription
setEmissiveColor(value)Gets or sets the emissive color

Result:


getName

NameDescription
getName()Gets or sets the name. The name.

Result:


setName

NameDescription
setName(value)Gets or sets the name. The name.

Result:


getProperties

NameDescription
getProperties()Gets the collection of all properties.

Result:


fromMaterial

NameDescription
fromMaterial(material)Allow convert other material to PbrMaterial

Parameters:

NameTypeDescription
materiaMaterialnull

Result: PbrMaterial


getTexture

NameDescription
getTexture(slotName)Gets the texture from the specified slot, it can be material’s property name or shader’s parameter name

Parameters:

NameTypeDescription
slotNameStringSlot name.

Result: TextureBase


setTexture

NameDescription
setTexture(slotName, texture)Sets the texture to specified slot

Parameters:

NameTypeDescription
slotNameStringSlot name.
textureTextureBaseTexture.

Result: TextureBase


toString

NameDescription
toString()Formats object to string

Result: String


removeProperty

NameDescription
removeProperty(property)Removes a dynamic property.

Parameters:

NameTypeDescription
propertyPropertyWhich property to remove

Result: boolean


removeProperty

NameDescription
removeProperty(property)Remove the specified property identified by name

Parameters:

NameTypeDescription
propertStringnull

Result: boolean


getProperty

NameDescription
getProperty(property)Get the value of specified property

Parameters:

NameTypeDescription
propertyStringProperty name

Result: Object


setProperty

NameDescription
setProperty(property, value)Sets the value of specified property

Parameters:

NameTypeDescription
propertyStringProperty name
valueObjectThe value of the property

Result: Object


findProperty

NameDescription
findProperty(propertyName)Finds the property. It can be a dynamic property (Created by CreateDynamicProperty/SetProperty) or native property(Identified by its name)

Parameters:

NameTypeDescription
propertyNameStringProperty name.

Result: Property


iterator

NameDescription
iterator()Reserved for internal use.

Result: Property