Micro-Geometry Cloth Shaders for Iray
=====================================

Cloth textures are troublesome things, as they simultaneously operate at two different scales. The macro level might include stitches, patterned prints, and cut-out sections, while the micro level reflects the actual geometry of the fibers which make up the weave. The macro level seldom allows for tiling, since it deals with unique features. If you try to include the micro level in those untiled textures, they are either blurred out of existence, or the textures become so large that they consume unreasonable amounts of memory and disk space. Luckily, there is no actual requirement that all elements of a texture use the same tiling strategy, and aggressive tiling of micro-textures allows us to directly simulate millions of stitches without any loss of detail or memory penalty.

The Micro-Geometry Cloth Shaders (or MGCS, for short) use multiple tiling levels to directly address the macro/micro dilemma. They directly model the stitch structure with bump maps for the threads and transparency, translucency, and darkening options for the holes between the threads. The result is that your close-ups reflect the full cloth details, and distance renders gain emergent glossy and translucence properties. (For example, basic glossy settings can yield “dual lobe specular” effects and satin “sheen”, and your sheer drapes will both transmit light and catch shadows realistically.)

A variety of shaders provide different densities of woven and knit cloth, and can easily be applied to existing models. When applied “on top of” a Daz Default, Iray uber, or omUberSurface shader, they will inherit basic macro-level diffuse, bump, displacement, and (maybe) glossy properties for the original shader, and be ready to render.

You may, however, wish to make slight adjustments to the MGCS-specific settings:
* The Micro-Geometry Horizontal/Vertical Tiles settings allow you to adjust the scale of the micro-geometry to reflect the scale of your UVs or the fineness of the fabric. 
* By adjusting the strength of the Micro-Geometry Bump setting, you can tweak the “prominence” of the stitches. The default level of 5 provides the effect of fully rounded threads, while levels of 1-3 will simulate more subtle “flattened” threads.
* The strength setting in Micro-Geometry Hole Density allows you to simultaneously reduce the effect of all other “Holes” sliders, but you will typically want to leave it at the default value of 1 and use those sliders directly.
* By replacing the image maps in Micro-Geometry Bump and Micro-Geometry Hole Density, you can simulate different sorts of weaves. You will usually wish to change these in parallel: the bump map provides the heights of the threads, whereas the holes map indicates the areas in which there are no threads.
* The Micro-Geometry Hole Transparency setting reflects the degree to which light travels through the holes without obstruction. If the cloth has clean threads without “fuzziness”, this would typically be 1.
* The Micro-Geometry Hole Translucency setting reflects the degree to which “fuzz” between the holes allows blurred light to shine through the holes. Unless the cloth is very thick, you’d typically see some degree (i.e. 0.25) of translucency. Transparency will reduce the effects of the translucency slider.
* The Micro-Geometry Hole Darkness slider causes the (non-transparent, non-translucent portions of the) holes to be darkened to reflect the fact that there is nothing to reflect light. It provides an alternative to the above settings if you don’t want to be bothered with light shining through, and can usually be left at its default of 1.
* If Transparency, Translucency, and Darkness are all set to zero, the holes will be rendered as flat areas with the same color as the threads. This tends not to look like realistic cloth, but can be used for some interesting textured plastic or vinyl effects.

License Terms
-------------

This product is copyrighted, and may not be redistributed in packaged form without permission. However, you may freely use it in both commercial and non-commercial renders. Credit is not required, but is encouraged.


Further, you may incorporate individual shaders (including the tiled “bump” and “hole” images) into your own (commercial on non-commercial) distributions so long as you include a pointer to the original distribution.

Version History
---------------

* Version 1: Initial release, with 4 plain woven, 2 knit, and 1 sheer shader.
