Writing mental ray® Shaders
The word "render" isn't unique to the vocabulary of computer graphics. We can talk about a "watercolor rendering," a "musical rendering" or a "poetic rendering." In each of these, there is a transformation from one domain to another: from the landscape before the painter to color on paper, from musical notation to sound, from the associations in a poet's mind to a book of poetry. Figure 1.1: Czar's Waiting Room, Main Railway Station, Helsinki, Eliel Saarinen, 1910, watercolor. But the type of rendering that may come closest to what we mean when we talk about rendering in computer graphics is in architecture. Geometric blueprints and technical specifications of building materials are transformed in the architectural rendering into a picture of the building 1 Introduction as it will appear when construction is complete. In addition to the designs of the building's geometry and its visual characteristics, the artist chooses a point of view to depict the scene in perspective. This is a transformation of a description of imagined space into a picture of that space. In a watercolor by architect Eliel Saarinen (Figure 1.1), the effect of light on marble is demonstrated in a way that would be lost in even a careful reading of blueprints and descriptions of materials. A mere brushstroke of a particular color in a particular place paradoxically transforms the dull matte appearance of watercolor into the sheen of polished stone.
A tutorial introduction to mental ray shader programmingIncludes the full source code for 100 shaders and illustrated with over 200 rendered scenes and diagramsCross-references with the first two volumes of mental ray handbooks