wiki:material

Material Definition

example material:

    "name" : "example",                          // material name 
    "color" : "1.0,1.0,1.0,1.0",                 // albedo multiplier (in linear space not sRGB)
    "f0" : ".04",                                // F0 reflection coefficient for fresnel equation, range 0-1
    "roughness" : "1.0",                         // roughness parameter range 0-1, 0 - glossy, 1 - matte
    "no_light" : false,                          // if false lights are not computed for this material
    "alpha_masked" : false,                      // true means it's alpha masked geometry pixels below 0.5 are discarded
    "tex_albedo" : "m210_body_color.dds",        // albedo texture must be DXT1 format
    "tex_normal" : "m210_body_normal.dds",       // normal texture must be DXT5/3dc2/ATI2 format
    "tex_roughness" : "m210_body_specular.dds",  // roughness texture (usually negative specular map) must be in BC4/ATI1 format
    "tex_opacity" : "",                          // opacity texture must be in BC4/ATI1 format
    "tex_reflectance" : "",                      // F0 reflection map must be in BC4/ATI1 format
    "tex_environment" : ""                       // local environment map (not used yet) must be in DXT1 format

Textures notes

If texture is not defined it's replaced by small texture with default values:

albedo: 255,255,255 / 1.0,1.0,1.0
normal: 127,127 / 0.5,0.5
roughness: 255 / 1.0
opacity: 255 / 1.0
reflectance: 255 / 1.0

Color space sRGB/Linear

Albedo textures have to be in sRGB space, on GPU it's converted to linear space automatically. Other textures are expected in linear space it's very important for visual quality.

Material parameters

Albedo

Defines material diffuse color. Final albedo value is computed by: albedo = color * tex_albedo.

Roughness

Defines material roughness. Final roughness value is computed by: r = roughness * tex_roughness

F0 (reflectance) coeficient

F0 defines material characteristics, basically it means how much light is reflected from the material and how much light is reflected as diffuse. For standard dielectric materials it's usually 0.04 (4%) and it means 4% light is reflected from the material if we are looking at surface perpendicularly. Final F0 value is computed by equation F0 = f0 * tex_reflectance;

Reflectance map is used if two very different materials are needed in one texture for example leather book cover with gold lettering. This approach is much easier than splitting mesh.

Example F0 values:

    Quartz         0.045593921
    ice            0.017908907
    Water          0.020373188
    Alcohol        0.01995505
    Glass          0.04
    Milk           0.022181983
    Ruby           0.077271957
    Crystal        0.111111111
    Diamond        0.171968833
    Skin           0.028

material examples

http://i.minus.com/ibd6upj4T0ETXm.jpg

useful links (mandatory reading)

http://seblagarde.wordpress.com/2011/08/17/feeding-a-physical-based-lighting-mode/
http://seblagarde.wordpress.com/2012/04/30/dontnod-specular-and-glossiness-chart/
http://www.crytek.com/download/fmx2013_c3_art_tech_donzallaz_sousa.pdf
http://www.marmoset.co/toolbag/learn/pbr-conversion
http://www.allegorithmic.com/static/static/pages/PBR_Guide/PBR_Guide_Vol.1.pdf
http://www.allegorithmic.com/static/static/pages/PBR_Guide/PBR_Guide_Vol.2.pdf
http://www.opengl-tutorial.org/wp-content/uploads/2011/05/normalMapMiniTut.jpg

Last modified 3 years ago Last modified on Apr 6, 2015, 5:14:51 PM