PhongMaterial class

PhongMaterial class

Material for blinn-phong shading model.

Inheritance: PhongMaterialLambertMaterialMaterialA3DObject

The PhongMaterial type exposes the following members:

Constructors

ConstructorDescription
__init__(self)Initializes a new instance of the PhongMaterial class.
__init__(self, name)Initializes a new instance of the PhongMaterial class.

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.
emissive_colorGets or sets the emissive color
ambient_colorGets or sets the ambient color
diffuse_colorGets or sets the diffuse color
transparent_colorGets or sets the transparent color.
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.
specular_colorGets or sets the specular color.
specular_factorGets or sets the specular factor.
The formula of specular:
SpecularColor * SpecularFactor * (N dot H) ^ Shininess
shininessGets or sets the shininess, this controls the specular highlight’s size.
The formula of specular:
SpecularColor * SpecularFactor * (N dot H) ^ Shininess
reflection_colorGets or sets the reflection color.
reflection_factorGets or sets the attenuation of the reflection 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

See Also