Wavefront .obj File - Material Template Library - Introduction - Basic Materials

Basic Materials

A single .mtl file may define multiple materials. Materials are defined one after another in the file, each starting with the newmtl command:

# define a material named 'Colored' newmtl Colored

The ambient color of the material is declared using Ka. Color definitions are in RGB where each channel's value is between 0 and 1.

Ka 1.000 1.000 1.000 # white

Similarly, the diffuse color is declared using Kd.

Kd 1.000 1.000 1.000 # white

The specular color is declared using Ks, and weighted using the specular coefficient Ns.

Ks 0.000 0.000 0.000 # black (off) Ns 10.000 # ranges between 0 and 1000

Materials can be transparent. This is referred to as being dissolved. Unlike real transparency, the result does not depend upon the thickness of the object.

d 0.9 # some implementations use 'd' Tr 0.9 # others use 'Tr'

Multiple illumination models are available, per material. These are enumerated as follows:

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 illum 2

Read more about this topic:  Wavefront .obj File, Material Template Library, Introduction

Famous quotes containing the words basic and/or materials:

    Just as the constant increase of entropy is the basic law of the universe, so it is the basic law of life to be ever more highly structured and to struggle against entropy.
    Václav Havel (b. 1936)

    What is most interesting and valuable in it, however, is not the materials for the history of Pontiac, or Braddock, or the Northwest, which it furnishes; not the annals of the country, but the natural facts, or perennials, which are ever without date. When out of history the truth shall be extracted, it will have shed its dates like withered leaves.
    Henry David Thoreau (1817–1862)