Deviation Actions

soup-sammich's avatar

Double Sided Texture Daz Iray (Tutorial ...kinda)

The goal: To create a PBR Metallicity Base (hereafter PBR-MB) shader with an extra color channel.  The Base Color setting needs to control either the surface of the object, or the backface.  The additional color channel needs to control the opposing part of the mesh.  All other default values need to control the backface just as they would control the surface.

First, I'm a Shader Mixer NOOB, so there's probably a better way to do this.  Also, the following text does require you to have some basic knowledge of the Daz Shader Mixer and/or NVIDIA's MDL language.  I'll be comparing the following text to the ocean's depths (because the amount of things you can do with Shader Mixer is pretty much like the ocean...  And also, for the fun of it :D)

From the Beach to the End of Floatie Toy Range:
I started with the Shader Mixer brick tree at the top of the image.  This wasn't my first success, but it was my first success where the "user" could manipulate the colors, diffuse roughness, and the bump.  HOWEVER, this was not acceptable to my goal.  It provides the "user" with a couple things to tweak, but I want them to be able to tweak all of the default PBR-MB settings.  And more so, I need those settings for my project to work right.  NOTE: The tree at the top is not the "final" tree that produced the image at the bottom.

Super long story short, I tried making a double sided cloth in Marvelous Designer that I could export into Daz for use as a dforce "bi-colored" cloak.  MD struggled HARD when it came time to drape on a figure, so I knew it wasn't going to work in dforce's rudimentary physics.  I knew from Iray research that it was possible to change the color of a backface, but I didn't know how it would work in Daz.  So, I researched like crazy for a couple days.  Yes, 48-ish hours of total research and found relatively little that helped me.  After the first 18 hours or so, I reached out for help on the Daz forum (Little was received, but I think that has a lot to do with Daz's forum structure and traditional forums in general.  Not a lot of people use them regularly anymore).  I'd found an inspiring image, but I had no idea how the original artist achieved the results.  But, I knew it was possible.

Sponge Diver Range:
I imported the default "!Iray Uber Base" (this is the PBR-MB default) shader into Shader Mixer.    I was quite surprised at the size and scope of it (hence no picture.  It's huge, and you'd just see microscopic blurry text...  Not helpful at all).  Had I tried to figure all of it out myself, I'd be working on it for quite some time ahead (kudos to any of you out there who work with the Shader Mixer on a regular basis, y'all deserve a medal).  A side note: Importing a shader was a function that I discovered in my more recent research (as in, a couple hours ago...)  Turns out it's SUPER easy and was right in front of my face the whole time.  Just select the top level of a shader, open Shader Mixer, click file, then Import from Scene.  Done.

Approaching the Continental Shelf (*cue Pirate voice* beyond this paragraph, there be MDL monsters):
I copied my starting texture and pasted it into the Uber Base.  My "UserParameters" brick was deleted because you can only have one UP brick, apparently (makes sense if you think about it.  From what I can tell, there's no limit to the amount of user parameters you can add, so there's really no reason to support two UP bricks).  Since the Uber Base already had a "Base Color" I no longer had a need for two Simple Glossy BDSF bricks, so I removed one and did the same with my "Bump or Normal Map" brick and "MDL Surface" brick.  I added an "Interior Color" user parameter to the UP brick and connected that output to my Simple Glossy Tint input of my SG-BDSF brick.  Then, in order to eliminate the default reflective surface, I connected the Uber Base's "Diffuse Roughness Map" output to the SG-BDSF Roughness U and V values.  Now I could control how shiny the interior color is with the default Diffuse Roughness slider.  However, I still needed a way to combine two Material (MT) outputs into one MT output.  Along comes a wonderful accidental discovery of mine, the "Override Material Field" brick (Bricks>Functions>MDL>Material Editors>Override Material Field).  This brick allows you to input MANY materials into a single material output!  Granted, you need to have the appropriate values.  However, for this texture, I only needed two.  The "Base" and "Backface Scattering" MT inputs.  I dropped the OMF brick between the "Uber Add Volume" and "MDL Surface" bricks of the Uber Base, connected the Uber Add Volume brick's output MT to the OMF's Base MT input, the MT output of my "Material - Fields" brick to the Backface Scattering MT input of the OMF brick, and connected the OMF's MT output to the MDL Surface MT input.  Clicked "Apply" and BAM!  Double sided material with all of the default Uber Base properties and settings.

Back to the Shore:
About the result:  This object is effectively a plane exported from Marvelous Designer.  It only has a surface and a backface.  If it were to be rendered with "backface culling" enabled, all of the red would be transparent.  So far, my preliminary testing shows that everything is fully functional.  Granted, you'll need to set the Diffuse Roughness to max if you want the interior to look like anything other than colored tinfoil.  I'll probably need to figure out how to tie in more of the settings in order to get it exactly where I want it, but for now, I'm calling this a HUGE EPIC WIN! :D

Helpful links:
-Iray MDL Module Base information:…
-The MDL Handbook:
-The Shader Mixer Cookbook:…
-A little helpful early on, but ultimately useless to my goal:…
-The forum post that got me started:…
-My Q/A on Daz forum (you'll basically find this DA upload here):…

If you have questions, I'll try my best to answer them, but I may not have accurate/knowledgeable information.

(edit: Tutorials probably aren't the best place to request critiques, so I've disabled it for this upload...)

Image details
Image size
993x1000px 215.22 KB
© 2018 - 2021 soup-sammich
Join the community to add your comment. Already a deviant? Log In
LimitlessCreations's avatar

This is incredible! Was this made in Modo?

soup-sammich's avatar

Thank you! :D:D:D The texture was built in Daz, and the cloth itself was made with Marvelous Designer.

LimitlessCreations's avatar

Wow, never thought Daz was so complex! ;)

soup-sammich's avatar

There’s a lot more to it than they advertise! :D

Foxy-3D's avatar
Another great tutorial. Thanks for sharing!  

I sent you an invitation to include this in our RenderHub3D group, too.  :-)
soup-sammich's avatar
You’re welcome! And thank you! :D
TaishoBee's avatar
I wonder if it's possible to do this in Poser.
soup-sammich's avatar
I’m not that familiar with Poser... Does it use Iray or something else? I know it is possible to do with 3Delight as well. I’m not sure about other light/texture languages, though...
Cederien's avatar
Thanks for working this out and sharing the information with us. Might come in handy one day ... assuming I can wrap my head around it. :)
soup-sammich's avatar
I knew I had to share my work/research. When I was looking for information, I couldn’t find much. If we, as users, work more with the Shader Mixer, Daz might add some more features and documentation. It’s not likely, but at the very least we can build our own knowledgebase! :D
GafftheHorse's avatar
Wow! info overload

Nice job.
soup-sammich's avatar
Thanks! And yeah, it’s quite a bit to get a grasp on all at once.
GafftheHorse's avatar
Oh, well, that was a mostly frustrating evening.

Trying to follow a Youtube tutorial on Shader Mixer by Caroline (lovely speaking voice, well paced presentation, if short). It's old though, Daz version 3, and 3Delight (but that's what i wanted)

My network orientation was initially in the reverse from that shown on screen in tutorial (learned it was set to Right to Left in preferences, which must be default changed since ver 3, 'cause it confused the hell out of me for about two hours as I got nowhere)

After that, I wasn't getting anything in preview windows, and renders produced no change to object surface. Which also led me to a dead end. It was only jabbing preview windows with the pointer repeatedly in frustration that I caught a hint of a fast disappearing dialog and I recalled the one thing I did outside of Daz norm - have 3DL set to render to rib and use the Linus native 3delight engine.

So I switched off render to Rib, and finally I'm getting previews (quite obvious that previewing shader changes would use the Daz 3Delight version, and also I suppose that building the shader up would also be using that same library.

What is less clear is why Render Setting to rib could be any use at all for those two Shader mixer functions.
soup-sammich's avatar
When initially working with the Shader Mixer everything is frustrating... I, too, was quite confused by most of the images and videos I found on the subject because everyone’s network appeared to be backwards... Luckily for me I realized relatively quickly that it should work the same regardless of how it looked visually since each node is effectively a function and/or a function call.

I’m not sure what “rib” is at the moment, but I’m glad you finally got to see your previews! Previews are SUPER helpful for building something visually oriented! :D
BubbleCloud's avatar
I don't even understand what are all these, I'll start reading it right now! :o
Thank you :aww:
soup-sammich's avatar
Basically, it’s a visual way to write code for NVIDIA’s Material Definition Language (MDL). There was too much information found to list it all out here, but the links at the bottom are a VERY helpful place to start. And for the “everyday” user, the Cookbook link especially. Lots of good information in there to get you started. :D
BubbleCloud's avatar
I understand, thank you for this tutorial! :hug:
soup-sammich's avatar
No problem! I was sorely disappointed with the lack if documentation, so I decided to share my results!
amyaimei's avatar
This is very useful.  Thank you for sharing your knowledge.
soup-sammich's avatar
Thanks!  Glad I could help! :D
Join the community to add your comment. Already a deviant? Log In