IRay Question - Transparency

Coming from a Carrara shader background, I am trying to figure out exactly how transparency works in IRay. For example, I have a a water shader but it shows too much of the bottom of the pond. I want to make the water layer less transparent so I can see the top of my water plants but not the bottom of the pond. I am using the Iray uber water shader that comes with Studio. Currenly, I am only using the default HDRI as light.

Which sliders do I need to experiment with? 

Comments

  • SickleYieldSickleYield Posts: 7,634

    Hi!

    With water the transparency and refraction are probably being controlled by the refraction slider.  The cutout opacity acts as a literal cutout - it culls away geometry and that geometry is not rendered if it's 100% transparent.  It does not interact with refraction in the way that you want. 

    You can turn down the refraction from 100% and see what that does for you first, since this method is the "cheapest" in terms of hardware usage.  (I'd turn off abbe if it's on, it's also costly and it's not going to be very visible in a body of water anyway.)

    Now, getting partial transparency or fog with increasing depth is costly on hardware, but it's very doable if the first way doesn't get the look you want.  In this case you would turn off "thin walled" and turn up the SSS, and use an SSS direction of 0.5 to scatter away from the viewer.  The two distance sliders control how far from the visible surface scattering hits maximum (that is, how far into the water until it's completely opaque).  These are generally what takes the most playing with to determine how foggy you want it to get and how fast.

  • AndySAndyS Posts: 1,437

    Hi,

     

    if you're talking about some kind of murkyness, transmission / scattering could be an interesting parameter.

    Plaese see the last few parameters in the list of my attachment. The smaller the the transmission parameter, the more the murkyness.

    Refraction iRay setting.jpg
    1249 x 839 - 174K
  • Oso3DOso3D Posts: 14,999

    Note that the Iray default water shader has 100% refraction weight. Notably, most other water shaders are more likely to set it to 95%, so that the surface shows a bit.

    If you are using a water plane, you probably want to set 'Share Glossy' to Off and adjust Refraction roughness. This makes water look 'murky.' Changing refraction color can create interesting effects.

    If you are using a water volume, you can either do the previous or control murkiness through Subsurface shading by setting Thin Surface to Off (and avoid setting any opacity below 100%).

    Then, you can control the shift of color through the volume with transmitted color (note that dark colors tend to darken the entire volume, and this is a very sensitive setting -- tiny steps) and Subsurface scattering.

     

    Note that with SSS, Iray is very simplistic; you can set roughly where the SSS effect starts, and what light it reacts to (direction), but that's about it.

     

  • mjc1016mjc1016 Posts: 15,001

    Don't forget that the transmitted color will be the actual color of the water...

  • swordvisionsswordvisions Posts: 124
    edited October 2016

    Thanks for all your suggestions, I needed a place to start. I am trying to use a volume.

    Post edited by swordvisions on
  • SickleYieldSickleYield Posts: 7,634
    edited October 2016

    I'm willing to be corrected on this, but I'm pretty sure the effect in the pic is an effect of translucency settings?  With SSS set to 0 I think you can set transmission to whatever you want and it won't do anything.

    Post edited by SickleYield on
  • AndySAndyS Posts: 1,437
    edited October 2016

    Hi Ann,

     

    it works pretty well, since it isn't tranlucency. It is the volume effect.
    I started with the iRay water shader. The awesome diff color is an artefact of my old 3Delight setting. Please forget about this, so it doesn't matter due to the 100% refraction.
    Only important is to set the transmitted color to really a little below pure white.
    And as mjc1016 reminded: this determines the color of the (murky) water.

    Post edited by AndyS on
  • SickleYieldSickleYield Posts: 7,634
    edited October 2016
    AndyS said:

    Hi Ann,

     

    it works pretty well, since it isn't tranlucency. It is the volume effect.
    I started with the iRay water shader. The awesome diff color is an artefact of my old 3Delight setting. Please forget about this, so it doesn't matter due to the 100% refraction.
    Only important is to set the transmitted color to really a little below pure white.
    And as mjc1016 reminded: this determines the color of the (murky) water.

     

    Um... who is Ann?

    Did some quick tests, and it looks like I'm wrong - transmitted distance actually does make a difference if SSS is off!  I turned translucency all the way off to make sure.  As long as the color is darker than pure white it does fog things up in proportion to the selected transmitted measurement distance, just like Andy said.

    Post edited by SickleYield on
  • SzarkSzark Posts: 10,634

    transmitted distance actually does make a difference if SSS is off!

     

    That is a cool nugget of information, thanks 

  • pdspds Posts: 593
    AndyS said:

    Hi Ann,

     

    it works pretty well, since it isn't tranlucency. It is the volume effect.
    I started with the iRay water shader. The awesome diff color is an artefact of my old 3Delight setting. Please forget about this, so it doesn't matter due to the 100% refraction.
    Only important is to set the transmitted color to really a little below pure white.
    And as mjc1016 reminded: this determines the color of the (murky) water.

     

    Um... who is Ann?

    Did some quick tests, and it looks like I'm wrong - transmitted distance actually does make a difference if SSS is off!  I turned translucency all the way off to make sure.  As long as the color is darker than pure white it does fog things up in proportion to the selected transmitted measurement distance, just like Andy said.

    Hi Sickleyield, would you be willing to share your test renders and settings? I've got a project in mind using one of the cryo tanks and am interested in getting a slightly murky look to the fluid in the tank. I was planning to use one of Mec4D's water volume shaders, but seeing an example or two of what you described would really be helpful in expanding my options and understanding.

  • SickleYieldSickleYield Posts: 7,634

    Sure!  Like AndyS, I started from the Daz water shader.  That's in the first picture, labeled 1.

    The second picture shows the same thing with the only change being that I altered the transmitted color to a value of 211 (light gray).  Notice that the default Transmitted Measuring Distance is 0.10 (a very shorrt distance), which is why this looks totally black.

    In the third picture the transmitted color is still light gray, but I've also increased the transmitted measurement distance (TMD) to 8.00.  Notice that it's still cloudy, but now you can just barely see G3M inside.

    In the fourth picture I've increased TMD to 12.00.  More of G3M is visible, but the water looks distinctly murky.

    And finally, the fifth picture shows the effect of TMD at 18 with the transmitted color changed to blue.  I was going to render at 12 there but it appears that adding color magnifies the effect of the haze, and at 12 with saturated color you could see even less than in this pic.

    01DazWaterShaderdefault.jpg
    500 x 650 - 359K
    02DazWaterShaderTransColorValue211.jpg
    650 x 650 - 345K
    03DazWaterShaderTDM8.jpg
    650 x 650 - 330K
    03DazWaterShaderTDM12.jpg
    650 x 650 - 343K
    03DazWaterShaderTDM18blue.jpg
    650 x 650 - 349K
  • pdspds Posts: 593

    Sure!  Like AndyS, I started from the Daz water shader.  That's in the first picture, labeled 1.

    The second picture shows the same thing with the only change being that I altered the transmitted color to a value of 211 (light gray).  Notice that the default Transmitted Measuring Distance is 0.10 (a very shorrt distance), which is why this looks totally black.

    In the third picture the transmitted color is still light gray, but I've also increased the transmitted measurement distance (TMD) to 8.00.  Notice that it's still cloudy, but now you can just barely see G3M inside.

    In the fourth picture I've increased TMD to 12.00.  More of G3M is visible, but the water looks distinctly murky.

    And finally, the fifth picture shows the effect of TMD at 18 with the transmitted color changed to blue.  I was going to render at 12 there but it appears that adding color magnifies the effect of the haze, and at 12 with saturated color you could see even less than in this pic.

    Wow, thank you very much for sharing all of this info! I'm looking forward to experimenting. Out of curiosity, what was the refraction weight of your water shader? Will T had indicated that the default shader is set to 109%, whereas other shaders were around 95%.

  • AndySAndyS Posts: 1,437
    edited October 2016

    Indeed, nice documentation.

    I really early started using the transmission only, too.
    Attached 3 essential examples. All started with the normal iRay water shader (refraction IOR = 1.33 at 100%).

    Left:
    I simply reduced the transmission color to 98% and set TMD to 5.

    Middle:
    transmission color (RGB) = 96%, 98%, 99%. TMD = 12.

    Right:
    In reality there are those little particles in the water causing the darkening (cause of less transmission) with increasing distance.
    To reproduce this real effect, there is the second parameter "scattering".
    So I played around with "Scattering Measurement Distance", "SSS Amount" and "SSS Direction".
    As you see, I placed a light source under water, as we know it from the pools when we swim in the late evening. Depending on how "ditry" the water is, you notice a strong scattering of the light and a loss of clearness.

    I started with the setup of the middle set and chose the following scattering parameters:
    SMD = 0.5
    SSS Amount = 0.01
    SSS Direction = 0.99

    Please feel free to carefully play around with these parameters for your like.

    P. S.
    Please be warned: activating scattering dramatically increases iRay render time!

    murky shaders.jpg
    1617 x 534 - 142K
    Post edited by AndyS on
  • SzarkSzark Posts: 10,634
    edited October 2016

    if you turn OFF Thin Walled and type in Trans in the filter box and add some Translucent Weight you get this.....all the channels associated with Translucency ;)

     

    So in theroy you can have a green water with going to brown as it gets deeper with just using Trans Colour and Transmitted Colour. You can get some really cool effects. 

    trans.jpg
    389 x 283 - 68K
    Post edited by Szark on
  • Sorry to necro, but I'm trying to work out settings on a water plane (using out of the box shading for the prop, or using iray water shader) where I'm getting too much reflection or not enough opacity. Same scene rendered with 3delight and raytracing had an absolutely beautiful result with the water, giving some reflection but also wonderfully clear water allowing you to see the seafloor beneath.

    Refraction index is set to 1.33, Refraction weight 1.00

  • SickleYieldSickleYield Posts: 7,634
    Maybe turn the refraction to 98% and turn off thin walled and add some transmissive color? The value you need with transmission is literal distance in Studio, so it is bigger the bigger your prop is. A glass of water might only need .5 where a pool needs 5000.
Sign In or Register to comment.