SoMaterial¶
- InventorModule¶
genre
author
package
definition
keywords
Purpose¶
The node SoMaterial defines the current surface material properties for subsequent shapes by setting components of the current material during traversal.
To bind materials to shapes, utilize an SoMaterialBinding node.
The GUI of the module features a MaterialEditor MDL control, which displays the parameters of the node. Internally, the Open Inventor node supports multiple materials since the fields are vector fields. Although the GUI editor allows editing of only the first material, scripting can be employed to set multiple materials. An alternative method for setting multiple colors is to use a SoVertexProperty node instead.
The MaterialEditor panel of the module is named _materialeditor. To display it via an MDL Panel control, specify window = _materialeditor in the Panel control.
Output Fields¶
self¶
- name: self, type: SoNode¶
Parameter Fields¶
Field Index¶
|
|
|
|
|
|
Visible Fields¶
Ambient Color¶
- name: ambientColor, type: Vector3List, default: 0.200000002980232 0.200000002980232 0.200000002980232¶
Sets the ambient color of the surface.
Diffuse Color¶
- name: diffuseColor, type: Vector3List, default: 0.800000011920929 0.800000011920929 0.800000011920929¶
Sets the diffuse color(s) of the surface.
Specular Color¶
- name: specularColor, type: Vector3List, default: 0 0 0¶
Sets the specular color of the surface.
Emissive Color¶
- name: emissiveColor, type: Vector3List, default: 0 0 0¶
Sets the emissive color of the surface.
Shininess¶
- name: shininess, type: DoubleList, default: 0.200000002980232¶
Sets the shininess coefficient of the surface.
Values can range from 0.0, indicating no shininess (a diffuse surface), to 1.0, representing maximum shininess (a highly polished surface).
Transparency¶
- name: transparency, type: DoubleList, default: 0¶
Sets the transparency value(s) of the surface.
Values can range from 0.0, indicating opaque surfaces, to 1.0, representing completely transparent surfaces. If the transparency type is
SoGLRenderAction::SCREEN_DOOR, only the first transparency value will be used. With other transparency types, multiple transparency values will be utilized if theSoMaterialnode contains as many transparencies as diffuse colors. If there are fewer transparencies than diffuse colors, only the first transparency will be used.