Iray Uber Shader - Subsurface scattering with cutout opacity map?

I'm creating decals with displacement and need for the material to have subsurface scattering.  The problem is that the Iray Uber Shader's subsurface properties are completely bypassed when the Cutout Opacity channel has a map in it.  By this I mean that when 'Thin Walled' is set to 'Off' and Cutout Opacity has a map in it, the shader behaves as if 'Thin Walled' was set to 'On'.

Does a solution exist for this? 

If it's simply part of the shader's architecture how should I go about modifying it?  Would loading the MDL into Substance Designer be possible?
 

Comments

  • JonnyRayJonnyRay Posts: 1,744
    edited May 2018

    I think the way the shader works those will always be at odds with each other.

    When "thin walled" is off, the shader assumes the object has volume (i.e. it is not just a single plane, but has depth like a thin, very flat cube or disc). This allows SSS and other volumetric properties to work.

    However, the cutout opacity believes that the surface you're cutting out is a single face of the object. For instance, you couldn't use cutout opacity to "bore a hole" through a cube, there would only be a circle cut out of a single face.

    So when you combine SSS with Opacity maps on the same surface, you're trying to tell the rendering engine that the object is both a single face of the object and that it is a volumetric object with depth. So it has to choose one or the other and apparently is prioritizing the Opacity map over the SSS settings.

    Side Note: I saw a reference in another thread that turning Thin Walled ON also has an interesting side effect that the render assumes everything behind that surface is actually inside the object. This can create problems where hair with transparencty (cutouts) disappears from renders behind a pane of "thin walled" glass.

    Post edited by JonnyRay on
  • Oso3DOso3D Posts: 14,892
    edited May 2018

    Um, the other problem you're going to have is that decals can't do displacement.

    (Decals can't do displacement or emission)

     

    Depending on what you're trying to do, you might find my OMS1 shader helpful; you can create two different layers. Now, there is only a single set of SSS parameters, but you CAN set refractive indices differently per layer (which surprised the heck out of me when I was designing it)

     

    Post edited by Oso3D on
  • Ah, when I said "decals" I just meant texture based cards with opacity maps.  Okay, thanks for the answers guys.  I'm sure this effect is possible in other PBR engines, as there are tutorials for it online.  

    So that leads to the next question:  how would I go about modifying the Iray Uber Shader?  Is that possible?  I've seen custom shaders from Daz PAs that appear to utilize it, just with some edits (Out of Touch's hair shader for instance).  

Sign In or Register to comment.