1.6 Materials
A material determines the response of a surface to illumination. Materials in mental ray consist of a material name and one mandatory and four optional shaders, each of which can be a standard shader or a user-provided C function:
The first function is the material shader itself. It may not be omitted. The material shader determines the color of a point on an object, based on its parameters which may include object colors, textures, lists of light sources, and other arbitrary parameters.
An optional displacement shader can be named that displaces a free-form surface at each point in the direction of the local surface normal. Displacement maps affect the triangles resulting from the tessellation of free-form surfaces and polygonal meshes.
An optional shadow shader determines the way shadow rays pass through the object. This can be used for calculating colored shadows.
An optional volume shader controls rays passing through the inside of the object. This is functionally equivalent to atmosphere calculations, but takes place inside objects, not outside.
An optional environment shader provides an environment map for non-raytraced reflections.
The shading function may be either a user written function linked at run time, or it may be one of the standard functions. All standard shaders use certain standard parameters that are described here. Parameters can be named in any order. Parameters can also be omitted; default values will be provided by mental ray. Note that the following standard parameters only apply to the standard shaders, a user-written shader is completely free to define these or other parameters.
The index of refraction controls the bending of light as it passes through a transparent object. Although actually dependent on the ratio of indices between the transparent material being entered and that being left, in practice one may say that the higher the index of refraction, the more the light is bent. Typical values are 1.0 for air, 1.33 for water and 1.5 for glass.
The shinyness material parameter effectively controls the size of highlights on a surface. It is also known as the specular exponent. The higher the value, the smaller the highlight. The dissolve parameter controls the fading transparency of a material independent of refractive effects. This is more accurately described as a blending operation between the surface and whatever lies beyond. If the transparency is 0.0, the surface is completely opaque. A value of 0.5 would cause an equal blend of the surface and the background.
A value of 1.0 would result in an invisible surface. This parameter is used by the Wavefront-compatible shaders only. The transparency parameter controls the refractive transparency of a material. Unlike dissolve, this parameter has a physically correct interpretation. The range is, as for transparency, from 0.0 for opaque to 1.0 for a completely transparent surface. The interpretation of transparency is left entirely to the material shader. The reflect parameter controls the reflectivity of a material. If reflect is 0.0 no reflections would be visible on a surface.
A perfect mirror would have a reflect of 1.0. This parameter is used by the SOFTIMAGEcompatible shader only. The ambient component approximates the color of a light source which illuminates a surface from all directions without attenuation or shadowing. The diffuse component is the color of the surface which is dependent on its angle to a light source but independent of the position of the viewer. A piece of felt is an example of a material with only a diffuse component. The specular component is the color of the surface which is dependent both on the position of the light source and the position of the viewer. It is the color of highlights on the surface.
The transmit component (transmission filter) is a color which filters light refracted through an object. A piece of glass which imparts a green tint to the objects seen through it would have a green transmit component. This parameter is used by the Wavefront shader only. Finally, the shade component (shadow filter) is a color which filters light as it passes through a transparent object which casts a shadow. A blue glass ball would have a blue shade component. This parameter is also used by the Wavefront shader only. These parameters have been referred to as standard because they are each required by at least one of the standard shaders. There is one material shader that supports SOFTIMAGE compatibility and one that supports Wavefront compatibility. Additional shaders compatible with Alias lighting models become available with the Alias translator module of mental ray.
No comments:
Post a Comment