Iray Tinted Glass

ToborTobor Posts: 2,300
edited December 1969 in The Commons

I'm looking for the best way(s) to produce tinted (colored or smoked) glass in Iray. I can do solid colored glass, but fiddling to increase the transmittance is not so far yielding great results. Any ideas for actual settings?

Comments

  • SickleYieldSickleYield Posts: 7,644
    edited December 1969

    In my testing it works best to use the glossy color for more "solid" glass, and for colored glass that's still transparent, add a top coat and color the top coat (changing diffuse, transmitted or refraction color does nothing). Change how transparent the glass is using the refraction value. There are a lot of real glass refraction values available online.

  • ToborTobor Posts: 2,300
    edited December 1969

    Thanks for the suggestion. I've tried Refraction Weight following some glass Iray examples I've found, but the effect still isn't right. What I'm not able to achieve is a balance between the 0-100% opacity that would suggest tinting, and the comparative brightness of any objects behind the glass showing through. For example, if the glass transmits 75% of the light, objects should be only (about) 25% less bright. Instead, they're usually just completely black.

    I'm sure it's possible, and maybe a small thing is all that's needed, but so far no success. It also doesn't help that on my machine the interactive Iray renter in the scene itself is not at all physically accurate for these tests. I have to restart a new external window render each time.

  • mjc1016mjc1016 Posts: 15,001
    edited June 2015

    Is your glass modeled appropriately?

    In other words, does it have thickness?

    The more realistic the renderer is, the more realistic the geometry needs to be.

    Create a plane primitive and a cube, make them both 1 meter. Then, stand the plane 'up' so it's facing the camera. Scale the cube, on the Z-axis to 1%. Spread them apart a bit and apply the Iray glass to each one. It shouldn't really matter as to what your light set up is...,

    Stick something behind the new 'windows' and render.

    Post edited by mjc1016 on
  • ToborTobor Posts: 2,300
    edited December 1969

    Good point about the material thickness. In my case, I had already set it to about 1mm, a little thicker than the glass I'm trying to emulate (optical glass in prescription sunglasses). But I tried it thicker just for testing, and same thing. I have trouble getting the right appearance between the darkened tone of the glass itself, and what can be seen through it.

    I'll keep my eye out for some more examples. There are a couple of Iray glass products on Rendo that appear to have what I need (already have the ones in Daz's store), so I may just splurge. But part of me wanted to crack this nut myself, as part of the learning experience.

  • mjc1016mjc1016 Posts: 15,001
    edited December 1969

    That's going to be tricky, because you aren't dealing with much thickness for an absorption shader to work. So either try the top coat or maybe 'scaling' the transmittance...so instead of 75%...try 92.5.% (mm/cm...yeah, it isn't really that simple, but you aren't shooting for scientific accuracy...just something that looks 'right').

  • ToborTobor Posts: 2,300
    edited December 1969

    It's all the more tricky in that the tinting is really a chemical added to the material, which is actually polycarbonate. It doesn't occur in nature. The tinting behaves the way the chemists designed it to; it's now a matter of finding how to replicate that look. For the time being, I'll do it in Photoshop. I'm taking two renders: one with 100% clear glass so there's some refraction, and the other is just solid green. In Photoshop I'll use the green to make a mask, and that'll work as a layer to manually set opacity. I can also do gradients more easily this way.

  • mjc1016mjc1016 Posts: 15,001
    edited December 1969

    Just goes to show, not everything can be done in a render...

    That actually sounds much easier than doing a bazillion and a half test renders while fiddling with the settings.

  • DAZ_cjonesDAZ_cjones Posts: 637
    edited December 1969

    There are two quick ways to make tinted glass with the Uber Iray shader.

    - Apply one of the "Solid" or "Thin" Glass Shaders. Set "Share Glossy Inputs" to off. Set the "Refraction Color" to your desired color and/or add a map. Set the index of refraction appropriately.

    - Apply one of the "Solid" Glass Shader presets and change the "Transmitted Color" and "Transmitted Measurement Distance" to get the desired color. Set the index of refraction appropriately.

    The first allows a map, the second is more physically correct.

  • DAZ_cjonesDAZ_cjones Posts: 637
    edited December 1969

    Here's an example of what I was talking about.
    Top is first method, bottom is second method.

    TintedGlass.png
    1024 x 1024 - 994K
  • DarkSpartanDarkSpartan Posts: 1,096

    There are two quick ways to make tinted glass with the Uber Iray shader.

    - Apply one of the "Solid" or "Thin" Glass Shaders. Set "Share Glossy Inputs" to off. Set the "Refraction Color" to your desired color and/or add a map. Set the index of refraction appropriately.

    - Apply one of the "Solid" Glass Shader presets and change the "Transmitted Color" and "Transmitted Measurement Distance" to get the desired color. Set the index of refraction appropriately.

    The first allows a map, the second is more physically correct.

    That will help me immensely. Packaging a pair of glasses with a character I'm working on, and was having the same issue. 

  • Oso3DOso3D Posts: 15,042

    Another thing to expeirment with is thin coat, which is useful for extremely thin coatings. I haven't experimented with it enough to know where to look for your results, though.

     

  • DarkSpartanDarkSpartan Posts: 1,096

    It works! Hooray! I had to screw with the settings a bit, and she wound up with a really strong prescription, but you can see her eyes through them now :) Refraction 1.5, Abbe 38 using method 1. Worked like a champ, but I'm still going to go back to the map and lighten it up a bit

     

  • harold_withersharold_withers Posts: 305
    edited November 2021

    Loving how cool glass looks in Daz 3D, but just how difficult is it to get this glass transparent enough to see the figure's eyes through it? I'm doing a helmet with a visor and it looks cool and all, but I want to at least get a hint of the character's eyes behind the visor, and I'm just not able to get that. What settings do you need to tweak in the material to facilitate this sort of effect? My visor is quite thick and fishbowl like with regards to the mesh and design, I'm also getting some of the helmet showing visibly through the visor of the helmet, so there's no problem with the glass actually being transparent, but I'm just not getting any detail of the character within. it is just dark under there. With so many options that could be tweaked, I'm just asking what needs to be adjusted to get more of the character under the mask to be revealled in the visor? I used the solution detailed above, but I'm still not really seeing anything of the character behind the glass.

     

    I'll also attach an image so you can see where I'm at now. Using the glass - solid - clear as a starting point.

     

    Thanks in advance for any assistance with this.

    V-Wing_Pilot_Helmet_WIP_Render_18B.jpg
    1000 x 1300 - 571K
    Post edited by harold_withers on
  • FishtalesFishtales Posts: 6,162

    Have one or two Emissive surfaces inside the light shining a red light across the face. Either two small areas either side about eye level or one above the face shining down.

  • harold_withersharold_withers Posts: 305
    edited November 2021

    Well this is random. I just decided to start from scratch with the visor glass material this morning, and peculiarly now I can see through the glass and see the eyes underneath and everything, but now bizarrely the tint isn't working. So I get the clear see-through glass, but nothing I do appears to add colour to the material. This is nuts! Last night I could get the colour fine, but couldn't see through the glass to the face underneath, and now I have the opposite problem. So bizarre. Also, in the viewport the glass appears to take on the colour of the visor, but just appears clear on rendering.

    Using solid - glass - clear as a starting point, using self-generated textures for base colour, metalic, roughness and normal maps.

    Anyone else come across this weirdness? If I can combine the rich colour effects I was getting last night with the clarity of the glass I have this morning, that would be bang on to the effect I'm after, but for some reason they seem to be wanting to be mutually exclusive at the moment. Even when I just use a colour picker colour for the base colour rather than the texture map I still couldn't add colour to the material. Very odd to say the least.

     

     

    V-Wing_Pilot_Helmet_WIP_Render_18F.jpg
    1000 x 1300 - 521K
    V-Wing_Pilot_Helmet_WIP_Render_18Comp.jpg
    1000 x 1300 - 620K
    Post edited by harold_withers on
  • FishtalesFishtales Posts: 6,162

    Using Solid/Glass turns it into a Volume. It would be better Thin Clear Glass as you already have the thickness in the geometry. Now you can use Refraction Colour to tint the glass.

  • Cheers Fishtales, will have a look at that. Much appreciated.

     

     

  • harold_withersharold_withers Posts: 305
    edited November 2021

    Right seem to have sorted it now. Using the refraction colour brought the tint back in, and then playing with the refraction index helped to brinng down the level of reflections in the glass a bit so you can see more of a hint of the character's features beneath the visor. Glass is supposed to have a refraction index value of 1.44 I believe, but knocking it down to about 1.15 - 1.2 seems to have worked for me with the toning down of the reflections. I'll probably also look at slightly lightening the base colour map of the tint to make drag a little more detail out of the character behind the glass, definitely getting there though. Thanks for the tip Fishtales.

     

    [EDIT:] Actually, just tweaking the base colour map, or essentially, just binning it in favour of playing around with the colour picker for refraction colour has made a big difference, just making the colour slightly less rich and a bit lighter has made the world of difference, so the base colour of the visor appears much less dark and the face beneath is now shining through. Thank goodness this chore is over. Have also raised the refreaction index back up a bit, not quite up to 1.44, but have found a happy medium of 1.3 when combined with the lighter refraction colour.

    V-Wing_Pilot_Helmet_WIP_Render_20.jpg
    1000 x 1300 - 569K
    V-Wing_Pilot_Helmet_WIP_Render_19.jpg
    1000 x 1300 - 587K
    V-Wing_Pilot_Helmet_WIP_Render_18L.jpg
    1000 x 1300 - 532K
    V-Wing_Pilot_Helmet_WIP_Render_20B.jpg
    1000 x 1300 - 581K
    V-Wing_Pilot_Helmet_WIP_Render_19A.jpg
    1000 x 1300 - 583K
    Post edited by harold_withers on
  • FishtalesFishtales Posts: 6,162

    I wouldn't use a colour map personally just leave it as white and use the Refraction Colour to get the colour.

  • Yeah, that's what I've done. Had a self generated colour map and was using that, just in the Refraction Colour slot, but just switched to the colour picker rather than the map to have a quick play around with different shades of red to see what difference that made, and it made a hell of a lot of a difference.

     

    laugh

     

  • FishtalesFishtales Posts: 6,162

    Using a base colour map and a refraction colour map doubles and trebles up the colour of the refraction colour so darkens it.

  • SpaciousSpacious Posts: 481
    edited November 2021

    I've been messing with tinted glass shaders quite a bit lately and have found a few things that could contribute to this discussion.

    It seems that there is an interaction betwwen 'transmitted color' and 'glossiness color' when refraction is turned up.  The closer these two colors are to each other the more closely the glass tint will match that color, as those two colors get farther apart the glass gets darker.  Color saturation seems to play a part here as well.  More saturation produces a deeper color with less transparancy, while less saturated colors provide more transparent glass.  I guess that part is obvious.

    I've also noticed that some surface parameters seem to effect tinted glass even while they seem not to be active.  Translucency color appears to have this efffect.  While it doesn't seem like translucency does anything at all when refraction is turned up, I've noticed that translucency color being very different from the glossy and transmitted colors matters even when translucency is off.

    Let's not forget about chromatic SSS color, not available when in mono SSS mode.  It also seems to have some affect even with mono SSS turned on.

    Post edited by Spacious on
Sign In or Register to comment.