Hair shader sets. What's possible and what isn't?

2

Comments

  • Here is where I am, now... It appears the middle shader reverses with the bottom shader.    This is an interesting exercise in permutations. :)  I do not have a reverse button in the shader adjustments.  Also, it appears the bottom shader is affecting the inside of all areas--I'm playing with selected shading to see if that works. :) 

    Also, likely because of all the textures, this is popping over to CPU rendering with my 2080ti.  Interesting stuff.

    Scott

    4-layer shader test 2.jpg
    3264 x 2448 - 2M
  • galiengalien Posts: 137
    edited September 2019
    wsgentry said:

    Here is where I am, now... It appears the middle shader reverses with the bottom shader.    This is an interesting exercise in permutations. :)  I do not have a reverse button in the shader adjustments.  Also, it appears the bottom shader is affecting the inside of all areas--I'm playing with selected shading to see if that works. :) 

    Also, likely because of all the textures, this is popping over to CPU rendering with my 2080ti.  Interesting stuff.

    Scott

    The Bang Bob hair has UV maps with the direction reversed, so the tips of the hair are at the top and the roots at the bottom.

    By default, the shader loads the masks set with "Invert" turned on, so black shows the layer and white hides it.  You can check this setting by opening the image editor in the layer weight property menu.

    Remember that the layers are stacked with layer 3 at the top, so you want to set the masks to progressively show less as you move from layer 1 to layer 3 (assuming that you are using masks with just a single horizontal transition line).

    Apologies if this is stuff you have already figured out.

    I'm not sure about the inner areas, but suspect that you may have different shader settings applied to the outer hair surfaces ("hair top l" and "hair top r") and the inner one ("hair").  Looks as if the blue layer (layer 3?) has gone awol on the inner surface - or perhaps this is what you intended.

     

     

    Post edited by galien on
  • galien said:
    wsgentry said:

    Here is where I am, now... It appears the middle shader reverses with the bottom shader.    This is an interesting exercise in permutations. :)  I do not have a reverse button in the shader adjustments.  Also, it appears the bottom shader is affecting the inside of all areas--I'm playing with selected shading to see if that works. :) 

    Also, likely because of all the textures, this is popping over to CPU rendering with my 2080ti.  Interesting stuff.

    Scott

    The Bang Bob hair has UV maps with the direction reversed, so the tips of the hair are at the top and the roots at the bottom.

    By default, the shader loads the masks set with "Invert" turned on, so black shows the layer and white hides it.  You can check this setting by opening the image editor in the layer weight property menu.

    Remember that the layers are stacked with layer 3 at the top, so you want to set the masks to progressively show less as you move from layer 1 to layer 3 (assuming that you are using masks with just a single horizontal transition line).

    Apologies if this is stuff you have already figured out.

    I'm not sure about the inner areas, but suspect that you may have different shader settings applied to the outer hair surfaces ("hair top l" and "hair top r") and the inner one ("hair").  Looks as if the blue layer (layer 3?) has gone awol on the inner surface - or perhaps this is what you intended.

     

    Thank you, again!   Showing me where to find the invert property made things so much better!  It's clear I have to remake my masks, but that's minor compared to me getting frustrated.  When invert was set to on, the middle mask was giving me fits!  Now, I've got brown on top, blue (supposed to be deep purple) in the middle, black on the bottom.  With things lining up as I expected, I have to adjust the glossy properties and figure out where the base color comes into play.  

    A biggie that's going to bug me when I go to do a real render instead of a viewport preview is the render switching to CPU when only 5.6mb of GPU memory is used.  So, thank you again!  You've been a huge help and I literally can't thank you enough.  I never really intended to get into DAZ this deeply, but now that I have it's time to dig more.

    Scott 

  • galiengalien Posts: 137
    edited September 2019
    wsgentry said:
    galien said:
    wsgentry said:

    Here is where I am, now... It appears the middle shader reverses with the bottom shader.    This is an interesting exercise in permutations. :)  I do not have a reverse button in the shader adjustments.  Also, it appears the bottom shader is affecting the inside of all areas--I'm playing with selected shading to see if that works. :) 

    Also, likely because of all the textures, this is popping over to CPU rendering with my 2080ti.  Interesting stuff.

    Scott

    The Bang Bob hair has UV maps with the direction reversed, so the tips of the hair are at the top and the roots at the bottom.

    By default, the shader loads the masks set with "Invert" turned on, so black shows the layer and white hides it.  You can check this setting by opening the image editor in the layer weight property menu.

    Remember that the layers are stacked with layer 3 at the top, so you want to set the masks to progressively show less as you move from layer 1 to layer 3 (assuming that you are using masks with just a single horizontal transition line).

    Apologies if this is stuff you have already figured out.

    I'm not sure about the inner areas, but suspect that you may have different shader settings applied to the outer hair surfaces ("hair top l" and "hair top r") and the inner one ("hair").  Looks as if the blue layer (layer 3?) has gone awol on the inner surface - or perhaps this is what you intended.

     

    Thank you, again!   Showing me where to find the invert property made things so much better!  It's clear I have to remake my masks, but that's minor compared to me getting frustrated.  When invert was set to on, the middle mask was giving me fits!  Now, I've got brown on top, blue (supposed to be deep purple) in the middle, black on the bottom.  With things lining up as I expected, I have to adjust the glossy properties and figure out where the base color comes into play.  

    A biggie that's going to bug me when I go to do a real render instead of a viewport preview is the render switching to CPU when only 5.6mb of GPU memory is used.  So, thank you again!  You've been a huge help and I literally can't thank you enough.  I never really intended to get into DAZ this deeply, but now that I have it's time to dig more.

    Scott 

    You're welcome.  This has been an interesting project, and I've also learned a lot from figuring out how the shader works.  Plus, I now have a nice new set of hair shader presets.

    I have a GTX1070 and use the 4.12 Beta.  When using the 4 layer shader I didn't have any issues with iRay switching to the CPU when it shouldn't.  This does happen on the odd occasion, but saving the scene and restarting everything usually fixes it.  I wonder if you have been using IRay preview mode more than you usually do while working with the shader.   It's always difficult to diagnose issues like this.  My preference is to run IRay preview mode in photoreal mode and I've gotten into the habit of setting max samples to 20 before turning on IRay preview - but this may just be superstition on my part.

     

    Post edited by galien on
  • galien said:
    wsgentry said:
     

    You're welcome.  This has been an interesting project, and I've also learned a lot from figuring out how the shader works.  Plus, I now have a nice new set of hair shader presets.

    I have a GTX1070 and use the 4.12 Beta.  When using the 4 layer shader I didn't have any issues with iRay switching to the CPU when it shouldn't.  This does happen on the odd occasion, but saving the scene and restarting everything usually fixes it.  I wonder if you have been using IRay preview mode more than you usually do while working with the shader.   It's always difficult to diagnose issues like this.  My preference is to run IRay preview mode in photoreal mode and I've gotten into the habit of setting max samples to 20 before turning on IRay preview - but this may just be superstition on my part.

     

    Honestly, since going to 4.11 I have random times where rendering switches to CPU.  In those times, GPU memory was exhausted.  In this case, there is plenty left.  I updated drivers and no go.   The only way I can get it back to GPU is to shutdown.   Yeah, I do a lot of preview in Iray--dunno how else to see what the masks are doing.  I just wish I had more time to mess with this.  I'm very close to where I want to be.  :)  Thank you again for all your help.  It has been an interesting experience and being that it's cutting edge, I cut a ticket with DAZ to see if there is going to be documentation on the shader.   I can bet that someone will come out with products that use the 4-layer shader. 

    Scott

  • galien said:
    wsgentry said:
     

    You're welcome.  This has been an interesting project, and I've also learned a lot from figuring out how the shader works.  Plus, I now have a nice new set of hair shader presets.

    I have a GTX1070 and use the 4.12 Beta.  When using the 4 layer shader I didn't have any issues with iRay switching to the CPU when it shouldn't.  This does happen on the odd occasion, but saving the scene and restarting everything usually fixes it.  I wonder if you have been using IRay preview mode more than you usually do while working with the shader.   It's always difficult to diagnose issues like this.  My preference is to run IRay preview mode in photoreal mode and I've gotten into the habit of setting max samples to 20 before turning on IRay preview - but this may just be superstition on my part.

     

    Honestly, since going to 4.11 I have random times where rendering switches to CPU.  In those times, GPU memory was exhausted.  In this case, there is plenty left.  I updated drivers and no go.   The only way I can get it back to GPU is to shutdown.   Yeah, I do a lot of preview in Iray--dunno how else to see what the masks are doing.  I just wish I had more time to mess with this.  I'm very close to where I want to be.  :)  Thank you again for all your help.  It has been an interesting experience and being that it's cutting edge, I cut a ticket with DAZ to see if there is going to be documentation on the shader.   I can bet that someone will come out with products that use the 4-layer shader. 

    Scott

  • One thing that's kind of pain... the settings in the Image Editor don't save.  :)  It's just one more thng. :)

    Scott

  • p0rtp0rt Posts: 217
    learn to use shader mixer
  • galiengalien Posts: 137

     

    wsgentry said:

    One thing that's kind of pain... the settings in the Image Editor don't save.  :)  It's just one more thng. :)

    Scott

    Yes, you're right.  I hadn't spotted this.

    It looks as if the shader has a bug where it's not saving the layer weight image invert setting when saving a scene.  It does save it correctly when you save the surface as a shader preset.

    I guess we just have to set up the masks to work with the mask invert set to on.

     

  • wsgentrywsgentry Posts: 572
    edited September 2019
    galien said:

     

    wsgentry said:

    One thing that's kind of pain... the settings in the Image Editor don't save.  :)  It's just one more thng. :)

    Scott

    Yes, you're right.  I hadn't spotted this.

    It looks as if the shader has a bug where it's not saving the layer weight image invert setting when saving a scene.  It does save it correctly when you save the surface as a shader preset.

    I guess we just have to set up the masks to work with the mask invert set to on.

     

    Yes, I think you're right, too.   I'm just going to invert my masks, too.  Tell me, when you did your masks, did you put in a slight overlap from one mask to the next.   For example on the center section mask, did you make the center section a little larger so it overlapped the top and bottom mask area?

    Scott

    Post edited by wsgentry on
  • galien said:
    wsgentry said:

    Are you talking about the MMX Dual Lobe hair shader?

    No, I was talking about the 4-Layer Uber PBR MDL shader.  If your installation of DAZ Studio is up to date, you will be able to find this in "Shader Presets - IRay - Daz Uber".  It has a base layer plus 3 stacked layers that use grayscale masks to determine where each layer is visible.  

    I tried using this on hair this morning and am still a bit undecided about the results.  The shader takes a bit of work to set up, so perhaps someone with a better understanding of IRay shaders could get better results.

    Anyway, here's a render using this shader with hair.  The hair blends from brown at the roots, through a pink/blond colour to blue and then to purple at the tips of the hair.  For this, I used hair texture files that came with ColorWerks Extreme.

    I cannot find this shader, can someone post it so I can manually add it to my library.

  • Okay found them.

  • galiengalien Posts: 137
    edited September 2019
    wsgentry said:
    galien said:

     

    wsgentry said:

    One thing that's kind of pain... the settings in the Image Editor don't save.  :)  It's just one more thng. :)

    Scott

    Yes, you're right.  I hadn't spotted this.

    It looks as if the shader has a bug where it's not saving the layer weight image invert setting when saving a scene.  It does save it correctly when you save the surface as a shader preset.

    I guess we just have to set up the masks to work with the mask invert set to on.

     

    Yes, I think you're right, too.   I'm just going to invert my masks, too.  Tell me, when you did your masks, did you put in a slight overlap from one mask to the next.   For example on the center section mask, did you make the center section a little larger so it overlapped the top and bottom mask area?

    Scott

    The masks I use have large overlap areas.  Here's an image to illustrate the type of masks I use for the layers: assuming the default invert setting (so black shows the layer, white hides it), normal oriented UV maps (so the top is the roots and the bottom the tips of the hair) and that the hairs strands are mapped to the full height of the UV map.  For hairs that have reversed UV maps, rotate the image 180 degrees.

    Layer masks

    With these masks, the base colour is displayed from the roots to the layer 1 mask transition line.

    Layer 1 displays from the layer 1 transtion line to the layer 2 transition line ( as layer 2 stacks on top of layer 1).

    Layer 2 displays from the layer 2 transtion line to the layer 3 transition line ( as layer 3 stacks on top of layer 2).

    Layer 3 displays from the layer 3 transition line to the tips of the hair (as layer 3 stacks on top of layer 2).

    I chose this way of creating the masks at it made it easy to create the masks (I just created a set of 8 with the transition line move down slightly in each subsequent mask).  I also found that by structuring the masks in this way, the blend could be softened by reducing the layer weight settings.

    (I use masks with a narrow gradient between black and white at the transition lines.)

    I hope this makes sense - it can sometimes be difficult to describe something that is simple.

     

    Layer Masks.png
    729 x 254 - 3K
    Post edited by galien on
  • wsgentrywsgentry Posts: 572
    edited September 2019

    Ah!  I had assumed you made masks like the ones below.  Maybe I'm out to lunch in my way of thinking these masks work but it would seem to be almost a boolean AND function.  So, if that's the case, and what I've tried is playing with invert control and simply loading the mask on the left where the mask on the right would be if inverted.   Same goes for the mask with the center section either white or black.   Make sense?

     

    New Top Mask.jpg
    2000 x 2000 - 38K
    Middle Hair Mask.jpg
    2000 x 2000 - 284K
    Middle Hair Mask inverted.jpg
    2000 x 2000 - 34K
    Bottom.jpg
    2000 x 2000 - 279K
    Post edited by wsgentry on
  • galiengalien Posts: 137
    edited September 2019
    wsgentry said:

    Ah!  I had assumed you made masks like the ones below.  Maybe I'm out to lunch in my way of thinking these masks work but it would seem to be almost a boolean AND function.  So, if that's the case, and what I've tried is playing with invert control and simply loading the mask on the left where the mask on the right would be if inverted.   Same goes for the mask with the center section either white or black.   Make sense?

     

    Now I'm thoroughly confused.

    Masks with bands should work fine - I just found it easier to arrange the layers to work with a single transition line on each mask.  It avoids that hassle of getting the bands on 2 masks to line up.

    I'm not sure that I have understood the other points you have made, so please forgive me if completely miss the point here.  Numbering your images from left to right as 1,2,3 and 4, you could use 1,2 and 4 together with the invert setting at "off" and I would expect to see 3 colour bands (the base colour is obscured by the layers).  If you then change the invert setting in each layer to "on", 3 can be swapped in to replace 2, but I don't think that 4 could replace 1 or vice-versa - they are rotated and not inverted.  If you want to invert them, make the white bits black and the black bits white.

     

     

     

    Post edited by galien on
  • wsgentrywsgentry Posts: 572
    edited September 2019

    That's good, too.   What I meant was this:  Instead of using Invert off, I just loaded the mask for layer one as the layer three mask and the layer three mask as layer one in the shader.   I kept mask 2 the same.  

    Frustrating, though.  I had the exact effect I wanted, saved the file and lost it all.  I should have saved a preset for it.  Oh, well. 

    Regarding the boolean AND, I'm trying to figure out the logic behind masking.

    Scott

    Post edited by wsgentry on
  • galiengalien Posts: 137
    wsgentry said:

    That's good, too.   What I meant was this:  Instead of using Invert off, I just loaded the mask for layer one as the layer three mask and the layer three mask as layer one in the shader.   I kept mask 2 the same.  

    Frustrating, though.  I had the exact effect I wanted, saved the file and lost it all.  I should have saved a preset for it.  Oh, well. 

    Regarding the boolean AND, I'm trying to figure out the logic behind masking.

    Scott

    Yes, that would be frustrating. 

    Once you've figured out how the masks work, it should be easy to re-apply the effect you wanted.

     

  • Yeah.  I'll get it, then play with trying to save things properly! :)

    Scott

  • Here's where I am with it.  I get light spots at the point where masks join.  Gotta get rid of that.

    Scott

    4-layer mask test.jpg
    3264 x 2448 - 4M
  • galiengalien Posts: 137
    wsgentry said:

    Here's where I am with it.  I get light spots at the point where masks join.  Gotta get rid of that.

    Scott

    Are the spots the base layer showing through as the the mask alignment is leaving a gap?

     

  • galien said:
    wsgentry said:

    Here's where I am with it.  I get light spots at the point where masks join.  Gotta get rid of that.

    Scott

    Are the spots the base layer showing through as the the mask alignment is leaving a gap?

     

    I think so, but I've aligned the masks (2000x2000) side by side and there is overlap between areas.  There is also a wide streak between the bangs on the side closest to the camera in the purple (dark blue) area in the hair.   I haven't touched horizontal alignment adjustments or scale.  I did tweak vertical to get the base layer to show through on the top of the head, but only on one mask. 

    Scott

  • wsgentrywsgentry Posts: 572

    Here's where I am, right now.  I've fixed the masks and used the color from Bang Bob hair... there's glossiness that I need to tone down and adjust vertical position, but it's very close to what I wanted originally.

    Scott

    Pretty close to it.jpg
    3264 x 2448 - 5M
  • galiengalien Posts: 137
    edited October 2019
    wsgentry said:

    Here's where I am, right now.  I've fixed the masks and used the color from Bang Bob hair... there's glossiness that I need to tone down and adjust vertical position, but it's very close to what I wanted originally.

    Scott

    That looks good.

    I bought the Muelsfell Multilayer Iray Terrain Shader earlier this week.  This includes a 4 layer terrain shader and the instructions include a general discussion of layers and masks that you may find interesting.  You can download the instructions from the product read-me page (http://docs.daz3d.com/doku.php/public/read_me/index/60675/start).

    I got this pack to use with Terradome 3 and with terrains I create myself; but when I can find the time, I'll try it out as a hair shader.

     

    Post edited by galien on
  • wsgentrywsgentry Posts: 572

    Thank you, yet again!   It's frustrating using this shader, though.   In a Facebook group, I wrote this:

    "Folks this is not an easy to shader to use. First, you have to make your own masks. Second, if you're using it with hair, you should find the textures or just use solid colors. Third, you need to use the image editor and sometimes you need it to flip inversion for the mask. Fourth, you may need to use offsets in the image editor, on the mask. Fifth, what's bottom isn't always bottom--middle stays the same--but bottom and top flip. Sixth, when you save, not everything saves so you have to go back and redo things like inversions, offsets, etc. Seventh, there's no documentation on the shader. So, there you go. It takes a lot of fooling around. Maybe a PA will come out with a package that makes use of the shader, after all, it's free with DAZ!"

    Thank you for the link.  I've downloaded the PDF manual and will be checking out the product, too.  If it saves things properly, it's a no brainer. :)  Really, having to redo things then do other things to tweak is a real pain.   It's a great learning experience and I truly appreciate you being there every step of the way!  You rock!!

    Scott

  • E-ArkhamE-Arkham Posts: 733

    You had me worried, I thought you were talking about the Muelsfell Terrain Shader with that review.  I was very confused until I realized you were talking about the layered one included with DS.

    The Muelsfell Shader wasn't designed for hair, and I've never thought to try it on that.  You will still need to make your own masks as it was designed to make use of baked masks from large terrain pieces (high poly, ambient occlusion, thickness, curvature maps, etc, or even erosion and flow maps if you have access to creating those).  The shader absolutely should save properly -- I use an older variant in a lot of my environment products. 

    Just remember that not all hair assets are created the same way.  Some might have the UV mapping aligned top to bottom; some might have it bottom to top, or even left to right.  I think that's where you're having to deal with "inverting" things and using offsets to get the mask on the parts of the hair you want.  From what I've read here, it sounds like that might be one of the issues you're running into... that issue won't go away by using a different shader, because it's tied to the hair you're applying the shader to.

    I look forward to seeing your experiments!

  • wsgentrywsgentry Posts: 572

    I apologize.  I should have been clearer in my statements.  The last thing I want to do is defame a product--in fact, I just bought it! :)  So, yeah, it will get tried with hair!  And you'll see the results here.   The manual is excellent!  You did a great job with it!

    It's fun to do this stuff, but with the stock DAZ 4-layer shader, it was very frustrating having to go back and redo things.   Then, for some reason, using the shader would kick out my 2080ti and use the CPU.  

    It's going to be fun using your shader!

    Scott

  • wsgentrywsgentry Posts: 572

    Here's one that shows color a little better.  The two colors at the top are hard to see, still.  They're there, so magnify and scroll.

    Where I am now 3 cropped.jpg
    2401 x 2446 - 1M
  • wsgentrywsgentry Posts: 572
    edited October 2019

    Just a quick update on the Muelsfell Shader.  I tried it.  The X2 version is very easy to use and works great with hair.  The X4 version is a bit more tricky. Since I'm interested in four distinct colors, I'll concentrate on using the X4 version.  I'm using the masks I made for the DAZ 4-layer, and they seem to work well.  I'm using colors designed for hair and they work well, too.  So, off to the races! :)

    Scott

    Note that this is prelminary stuff.  :)

    Post edited by wsgentry on
  • wsgentrywsgentry Posts: 572

    Here's a sample of the x4 shader.

     

     

    2.JPG
    909 x 943 - 58K
  • E-ArkhamE-Arkham Posts: 733
    wsgentry said:

    Just a quick update on the Muelsfell Shader.  I tried it.  The X2 version is very easy to use and works great with hair.  The X4 version is a bit more tricky. Since I'm interested in four distinct colors, I'll concentrate on using the X4 version.  I'm using the masks I made for the DAZ 4-layer, and they seem to work well.  I'm using colors designed for hair and they work well, too.  So, off to the races! :)

    Scott

    Note that this is prelminary stuff.  :)

     

    Awesome, looks like a promising start!

Sign In or Register to comment.