PbrMaterial class

PbrMaterial class

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

Inheritance: PbrMaterialMaterialA3DObject

The PbrMaterial type exposes the following members:

Constructors

ConstructorDescription
__init__(self)Construct a default PBR material instance
__init__(self, albedo)Construct a default PBR material with specified albedo color value.

Properties

PropertyDescription
nameGets or sets the name.
propertiesGets the collection of all properties.
MAP_SPECULARUsed in Material.set_texture to assign a specular texture mapping.
MAP_DIFFUSEUsed in Material.set_texture to assign a diffuse texture mapping.
MAP_EMISSIVEUsed in Material.set_texture to assign a emissive texture mapping.
MAP_AMBIENTUsed in Material.set_texture to assign a ambient texture mapping.
MAP_NORMALUsed in Material.set_texture to assign a normal texture mapping.
transparencyGets 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.
normal_textureGets or sets the texture of normal mapping
specular_textureGets or sets the texture for specular color
albedo_textureGets or sets the texture for albedo
albedoGets or sets the base color of the material
occlusion_textureGets or sets the texture for ambient occlusion
occlusion_factorGets or sets the factor of ambient occlusion
metallic_factorGets 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.
roughness_factorGets 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
metallic_roughnessGets or sets the texture for metallic(in R channel) and roughness(in G channel)
emissive_textureGets or sets the texture for emissive
emissive_colorGets or sets the emissive color

Methods

MethodDescription
remove_property(self, property)Removes a dynamic property.
remove_property(self, property)Remove the specified property identified by name
get_property(self, property)Get the value of specified property
set_property(self, property, value)Sets the value of specified property
find_property(self, property_name)Finds the property.
It can be a dynamic property (Created by CreateDynamicProperty/SetProperty)
or native property(Identified by its name)
get_texture(self, slot_name)Gets the texture from the specified slot, it can be material’s property name or shader’s parameter name
set_texture(self, slot_name, texture)Sets the texture to specified slot
from_material(, material)Allow convert other material to PbrMaterial

See Also