Support Forum G3D Web Page |
Loaded from the MTL file. More...
Inherits G3D::ReferenceCountedObject.
Classes | |
class | Field |
Static Public Member Functions | |
static shared_ptr< Material > | create () |
We default Ks to 0.8f if there is no map_Ks. More... | |
Public Attributes | |
String | basePath |
Path relative to which filenames should be resolved. More... | |
Field | bump |
Bump map. More... | |
float | d |
Opacity (alpha) level, on the range 0-1, where 1 = opaque (default). More... | |
int | illum |
Illumination model enumeration on the range 0-10: More... | |
String | interpolateMode |
Field | Ka |
Ambient color of the material, on the range 0-1. More... | |
Field | Kd |
Diffuse color of the material, on the range 0-1. More... | |
Field | Ke |
Emissive. More... | |
Field | Ks |
Specular color of the material, on the range 0-1. More... | |
String | lightMap |
(non-standard extension), for lightMaps More... | |
String | map_d |
String | name |
float | Ni |
Index of refraction. More... | |
float | Ns |
Shininess of the material, on the range 0-1000. More... | |
Color3 | Tf |
1 - Transmission, as processed by 3DS Max (http://casual-effects.blogspot.com/2012/01/translucency-in-obj-mtl-files.html). More... | |
Protected Member Functions | |
Material () | |
Static Protected Member Functions | |
template<class T , class ... ArgTypes> | |
static shared_ptr< T > | createShared (ArgTypes &&... args) |
Like std::make_shared, but works for protected constructors. More... | |
Loaded from the MTL file.
|
inlineprotected |
|
inlinestatic |
|
inlinestaticprotectedinherited |
Like std::make_shared, but works for protected constructors.
Call as createShared<myclass>.
String G3D::ParseMTL::Material::basePath |
Path relative to which filenames should be resolved.
Field G3D::ParseMTL::Material::bump |
Bump map.
float G3D::ParseMTL::Material::d |
Opacity (alpha) level, on the range 0-1, where 1 = opaque (default).
Some non-standard MTL files (e.g., produced by MeshLab) write Tr = 1 - d instead. If ParseMTL encounters Tr, it sets d = 1 - Tr.
int G3D::ParseMTL::Material::illum |
Illumination model enumeration on the range 0-10:
model | Property Editor |
---|---|
0 | Color on and Ambient off |
1 | Color on and Ambient on |
2 | Highlight on |
3 | Reflection on and Ray trace on |
4 | Transparency: Glass on; Reflection: Ray trace on |
5 | Reflection: Fresnel on and Ray trace on |
6 | Transparency: Refraction on; Reflection: Fresnel off and Ray trace on |
7 | Transparency: Refraction on; Reflection: Fresnel on and Ray trace on |
8 | Reflection on and Ray trace off |
9 | Transparency: Glass on; Reflection: Ray trace off |
10 | Casts shadows onto invisible surfaces |
3-7 force mirror glossiness. 2 is probably what you want.
String G3D::ParseMTL::Material::interpolateMode |
Field G3D::ParseMTL::Material::Ka |
Ambient color of the material, on the range 0-1.
Field G3D::ParseMTL::Material::Kd |
Diffuse color of the material, on the range 0-1.
Field G3D::ParseMTL::Material::Ke |
Emissive.
Field G3D::ParseMTL::Material::Ks |
Specular color of the material, on the range 0-1.
String G3D::ParseMTL::Material::lightMap |
(non-standard extension), for lightMaps
String G3D::ParseMTL::Material::map_d |
String G3D::ParseMTL::Material::name |
float G3D::ParseMTL::Material::Ni |
Index of refraction.
float G3D::ParseMTL::Material::Ns |
Shininess of the material, on the range 0-1000.
Color3 G3D::ParseMTL::Material::Tf |
1 - Transmission, as processed by 3DS Max (http://casual-effects.blogspot.com/2012/01/translucency-in-obj-mtl-files.html).
Other specification documents say that it is transmission (e.g, http://paulbourke.net/dataformats/mtl/) but I haven't found software that implements it that way.