Transparencies, Refraction, and Stuff

ZamuelNowZamuelNow Posts: 744
edited December 1969 in New Users

Looking for ways to improve glass and liquid in DS4. Snippet from an unfinished render attached.

201 x 438 - 10K


  • JaderailJaderail Posts: 0
    edited December 1969

    Reflection, refraction and all that depend on the Max Ray Traced Depth in the Render settings. Example: If the Glass has two sides (inside and outside) MRTD should be set to 2 so light will be calculated to pass through both planes of the glass. Also if there is nothing in the scene for the glass to reflect on the surface all you get is light highlights. That is when The Uber Envro lights with a HDR map would help or a full set done well enough (not seen in image but in the Scene) to show in the reflections. Please note all this will push render times very high.

  • mjc1016mjc1016 Posts: 15,001
    edited October 2012 need to count the liquid, add at least one, preferably 2 to you should be at 4, at least...6 is better (it's always better to have a couple of extra 'slots' in the depth, for unexpected 'bounces')...actually add 3. There's going to be an interaction between the glass and the liquid, too (at least as far as reflections).

    Make sure the IOR setting (Index of Refraction) is 'right' for what you are rendering,or at least close...leaving it at 1 or 1.30 or whatever is the 'default' doesn't work (1 is the IOR of air and 1.33 is that of water). And yes a 0.01 difference can be noticeable, depending on the render/render settings.

    Here's a pretty comprehensive IOR table...

    Wine is not on that list...but it is somewhere around 1.35-1.37 and the wine glass, assuming it is 'crystal' should be around 1.57.

    As to things to reflect...well, obviously, the hand holding the glass is going to provide 'something'...but what Jaderail is talking about is a 'complete' environment. No 'ground plane' or ceiling/walls/floor or 'skydome' and you can end up with odd spots or really wacky reflections. If you can't provide that, faking it by plugging a reflection map into the reflection color can work, too.

    Another thing for 'realistic' glass...the glass item needs to be modelled extremely cleanly and properly. There can be NO intersecting faces in it or it won't EVER render like glass. Also it CANNOT be 'single thickness' MUST have a clearly 'two sided' mesh. Also, for best results, the liquid needs to be separate mesh that just touches (actually is the tiniest fraction of a mm away from) the inside of the glass, without intersecting (some renderers/materials/shaders can handle the setup for that without it), but it can never just be a simple plane across the top or something like that.

    Just from the looks of it, that glass is pushing the envelope on the mesh front...there's some really odd modelling there...

    The first image is an example without a 'complete' environment.

    The second adds a skydome.

    The example of a 'proper' glass shader...(the only thing it isn't doing is caustics) and yes, shadows are too 'hard'...that was my fault, I didn't set 'soft shadows' on the light...

    All three of those are 3Delight renders...actually they are probably DS3 renders (the date they were made is about the time DS4 Pro was made a 'limited time' freebie). I can't remember the exact light setup...but it wasn't Uber...and the shader is a personal build, that I should probably go ahead and release and not worry about getting caustics working the way I want them to. On the third pic, you'll notice a bright spot on the line from that, on the table, if caustics were working, would be a nice play of light, in the shadow of the glass.

    (I believe that it's just a simple spot/distant light combo...)

    675 x 900 - 196K
    675 x 675 - 266K
    675 x 675 - 236K
    Post edited by mjc1016 on
  • JaderailJaderail Posts: 0
    edited December 1969

    Wonderful, That covers it all. I need to point out one small thing. Most users never notice this but I do so I'm sure others do as well. Always use a prop that has a tilt morph for the liquid. Liquid always lays flat to the horizon or gravity. None flat liquid only happens if the container is moved very fast. A glass of wine at a angle with the wine at a angle will ruin a render so fast and is so hard to spot some times it will make your head spin.

  • mjc1016mjc1016 Posts: 15,001
    edited October 2012

    I never really finished the glass shader, because right before I did, Fisty gave out that wonderful liquid shader pack for Christmas, so I put that one on hold until I had time to incorporate caustics, the way I want them...but to build that I did A LOT of research on glass and rsl shaders. Basically, I think I got it as 'physically correct' as I's the shot of the sphere I put it on to use as the icon image...notice it actually inverts the image, as a lens should...which it would be, if it were a solid glass orb. If it were 'hollow' it wouldn't invert the image...but it would distort it, like the glass does.

    675 x 675 - 200K
    Post edited by mjc1016 on
  • ZamuelNowZamuelNow Posts: 744
    edited December 1969

    Thank you for the information. Getting a little bit of weirdness with the glass but I figure that's partially due to the way the room is built in the scene (skysphere and only one wall).

  • mjc1016mjc1016 Posts: 15,001
    edited December 1969

    The second pic I posted is just that...the 'table' and a sky sphere. So, that should be plenty to be a 'complete' environment.

    Turn everything in the scene invisible (click the little eye in the scene tab), except for the glass and the liquid. After that, go to the little globe, up along the top of the viewport and select 'wireframe' for the view. Then post a screenshot of that view.

    I'm betting you've got intersecting meshes...they can really mess up a glass render.

    Also, what shader are you using for the glass?

Sign In or Register to comment.