ObjFileParser / Material
The Obj File Parser's Material class does not bring any new functionality to the table. It's just a container for the material properties that can be defined in an obj file.
Properties¶
$name¶
The name of the material. (marked as "newmtl") This is the same name you use in a 3D modelling software like Blender or 3DS Max to reference the material.
$ambient¶
The ambient color of the material. (marked as "Ka") This usally controls the color of the object in the shadow or when a light is not directly hitting the object.
$diffuse¶
The diffuse color of the material. (marked as "Kd") This usally controls the color of the object when a light is directly hitting the object. This property is often also used for albedo or base color.
$specular¶
The specular color of the material. (marked as "Ks") This property is often also used for reflection color, shininess or highlights color.
$emmisive¶
The emmisive color of the material. (marked as "Ke") This property is often also used for illumination, self glow or light emission.
$transmittance¶
The transmittance of the material. (marked as "Tf") This property is often also used for transparency or refraction color.
$transmissionFilter¶
The transmission filter color property of the Material. (marked as "Tf") This property is often also used for transparency or refraction color.
$shininess¶
The shininess of the material. (marked as "Ns") This property is often also used for glossiness or specular power.
$indexOfRefraction¶
The index of refraction of the materials. (marked as "Ni")
$dissolve¶
The dissolve of the material. (marked as "d") This property is often also used for opacity or transparency.
$illuminationModel¶
The illumination model of the material. (marked as "illum")
from the obj file specification:
- Color on and Ambient off
- Color on and Ambient on
- Highlight on
- Reflection on and Ray trace on
- Transparency: Glass on, Reflection: Ray trace on
- Reflection: Fresnel on and Ray trace on
- Transparency: Refraction on, Reflection: Fresnel off and Ray trace on
- Transparency: Refraction on, Reflection: Fresnel on and Ray trace on
- Reflection on and Ray trace off
- Transparency: Glass on, Reflection: Ray trace off
- Casts shadows onto invisible surfaces
$ambientTexture¶
The ambient texture of the material. (marked as "map_Ka")
$diffuseTexture¶
The diffuse texture of the material. (marked as "map_Kd")
$specularTexture¶
The specular texture of the material. (marked as "map_Ks")
$emissiveTexture¶
The emissive texture of the material. (marked as "map_Ke")
$transmittanceTexture¶
The transmittance texture of the material. (marked as "map_Tf")
$shininessTexture¶
The shininess texture of the material. (marked as "map_Ns")
$indexOfRefractionTexture¶
The index of refraction texture of the material. (marked as "map_Ni")
$dissolveTexture¶
The dissolve texture of the material. (marked as "map_d")
$bumpTexture¶
The bump texture of the material. (marked as "map_bump")