The mental ray architectural library contains a set of shaders designed for architectural and design visualization.
The most important are the mia_material, an easy to use all-around material, and the Physical Sun and Sky shaders, but the library also contains minor tools like shaders to create render-time rounded corners, and more.
The library strictly requires mental ray version 3.5 or newer and will not function on earlier releases of mental ray.
mia_material
The mental ray mia_material is a monolithic material shader that is designed to support most materials used by architectural and product design renderings. It supports most hard-surface materials such as metal, wood and glass. It is especially tuned for fast glossy reflections and refractions (replacing the DGS material) and high-quality glass (replacing the dielectric material).
The major features are:
* Easy to use - yet flexible. Controls arranged logically in a "most used first" fashion.
* Templates - for getting faster to reality.
* Physically accurate - the material is energy conserving, making shaders that breaks the laws of physics impossible.
* Glossy performance - advanced performance boosts including interpolation, emulated glossiness, and importance sampling.
* Tweakable BRDF1 - user can define how reflectivity depends on angle.
* Transparency - "Solid" or "thin" materials - transparent objects such as glass can be treated as either "solid" (refracting, built out of multiple faces) or "thin" (non-refracting, can use single faces).
* Round corners - shader can simulate "fillets" to allow sharp edges to still catch the light in a realistic fashion.
* Indirect Illumination control - set the final gather accuracy or indirect illumination level on a per-material basis.
* Oren-Nayar diffuse - allows "powdery" surfaces such as clay.
* Built in Ambient Occlusion - for contact shadows and enhancing small details.
* All-in-one shader - photon and shadow shader built in.
* Waxed floors, frosted glass and brushed metals... - ...all fast and easy to set up.
Sun & Sky
The mental ray physical sun & sky shaders are designed to enable physically plausible daylight simulations and very accurate renderings of daylight scenarios.
The mia_physicalsun and mia_physicalsky are intended to be used together, with the mia_physicalsun shader applied to a directional light that represents the sun light, and the mia_physicalsky shader used as the scenes camera environment shader. The environment shader should be used to illuminate the scene with the help of final gathering (which must be enabled) and bounced light from the sun can be handled either by final gather diffuse bounces, or via GI (photons).
Units
The sun and sky work in true photometric units, but the output can be converted to something else with the rgb_unit_conversion parameter. If it is set to 1 1 1, both the values returned by the mental ray shader API functions mi_sample_light (for the sunlight) and mi_compute_avg_radiance (for the skylight), when sent through the mi_luminance function, can be considered (will numerically match) photometric values in lux.
Since the intensity of the sun outside the atmosphere is calibrated to 127500 lux, this is very bright when seen compared to a more "classical" rendering where light intensities generally range from 0 to 1. The rgb_unit_conversion parameter is applied as a multiplier and should be set to a value below 1.0 (e.g. 0.001 0.001 0.001) to convert the raw lux value to something more manageable.
For convenience, the special rgb_unit_conversion value of 0 0 0 is internally set so that 80000 lux (approximately the amount of light on a sunny day) equals the classical light level of 1.0.
Utility shaders
Round corners
CG has a tendency to look "unrealistic" because edges of objects are geometrically sharp, whereas all edges in the real world are slightly rounded, chamfered, worn or filleted in some manner. This rounded edge tends to "catch the light" and create highlights that make edges more visually appealing.
The mia_roundcorners shader can create an illusion of "rounded edges" at render time. This feature is primarily intended to speed up modelling, where things like a table top need not be created with actual filleted or chamfered edges.
No round corners
Round corners
Tone mapping / Exposure
When rendering physical light levels one runs into the problem of managing the HDRI output of the real physics vs. the limited dynamic range of computer displays. This was discussed in more detail on page gamma.
There are numerous shaders and algorithms for doing "tone mapping" (this is a very active area of research within the CG industry), and this shader is a very simple such shader that simply adds a knee compression to "squash" overbrights into a manageable range.
The shader can be applied either as a lens shader (which will tone map the image "on the fly" as it is being rendered) or as an output shader (will tone map the image as a post process). Since this tone mapper affects each pixel individually , the former method (as lens shader) is encouraged, since it applies on the sample level rather than the pixel level.