Iridescent Silk Iray MDL
First off, I make no claim on this as my own invention. The MDL has been copied and pasted from NVIDIA Material Definition Language: A Sneak Peek at the MDL Handbook after viewing the attendant video. I wholeheartedly recommend them, including the referenced paper, A Practical Microcylinder Appearance Model for Cloth Rendering. There's some math involved, but no pain, no gain.
What I have done amounted to about 45 minutes in a text editor and in Studio. I'm not going to go into a lot of detail, but rather refer you to a previous post of mine that explains how this all works together. I followed the same procedure here.
The actual MDL file (iridescent_silk.mdl) goes in <Studio Program Directory>/shaders/iray/local/. You'll have to create the "local" directory if it doesn't exist.
The other two files go in your content directory. The shader definition (Iridescent Silk.dbm) I have in Shaders/Esemwy/. The preset (Iridescent Silk.duf), is in my Presets/Shaders/ directory, but you can place it anywhere that's convenient.
If you'd rather just download a ZIP and move the files to their individual places, everything is available in my Github repo here.
Here's a quick and dirty render of the resulting material.
Notice the magenta and green reflections. As implemented, you can change the color of the warp and the weft, change the warp to weft ratio, and change the translucency, as well as all the rest of the MDL parameters to the BSDF.
I realize that the presentation here is a bit slipshod on my part, but I wanted to get this out before something else caught my attention. If you have any questions or suggestions, I'll be happy to hear them.
Update (2015/08/12): The material discussed in the Sneak Peek is now incorporated into the most recent draft of the MDL handbook.
Comments
Nice work...
I love importing 'real' shaders/mdl into Studio, despite some of the restrictions.
Thank you,,very nice shader.I made a test render using it on a pirate shirt :) ( I played with the colors a bit )
Is there a way to retain patterns while using this shader?
Not at present, but it could probably be adapted to use MDLs built-in layering functionality. You could also try making the color channels mappable by changing the User Parameters and see what that does. Actually has me a bit curious now.