Caustics, GlassBSDF and Tricky Glass



  • I wanted to try and get some caustic reflections / refractions as I had never really played with the caustics settings in SF render settings. It was a total blow out. I was using a heavily subD plane as the water and used a voronoi texture on the Cycles surface displacement and @bagginsbill's tricky glass on the surface. I didn't get any caustics, but I did notice that light semed to penetrate better if the caustic options were selected.

    So I set up this scene (skydome and 1 infinite light) (seen here without the water plane)

    0_1527323632390_VaseNW_0001.png

    I then added the plane and rendered with causics off
    0_1527324045243_VaseTG2NC_0001.png

    and here with both caustics selected

    0_1527324074198_VaseTG2C_0001.png

    I then replaced the tricky glass with a simple glassBSDF with IOR 1.33 (same displacement) and rendered with caustics off
    0_1527324165507_VaseNC_0001.png

    The finally same set up but with caustics on
    0_1527324202535_VaseFC_0001.png

    This seemed to compensate for the water plane casting a shadow on pool floor, the reason for the lsShadowRay trick in the tricky glass material.

    Don't know if this is of any use to anyone, but thought I would share just in case



  • @amethystpendant One thing you have to remember about water is that it usually has depth. A Plane is okay for the surface, but in order for light to refract of bend it actually has to pass through a medium. Your water needs volume to do that and the only way to do that is to give it some thickness, like using a cube. Try that and see what happens .



  • @eclark1849 well said. Another complication of volumes in Cycles, is that it's essentially meaningless to transparency map a 3D object with a 2D image, since the image, being applied by the UV mapping, only applies to the surface of the volume, and says nothing about points interior to the volume, unlike a 3D function, which returns a value everywhere it's evaluated.

    0_1527332953807_Screen Shot 2018-05-26 at 9.08.47 pm.png
    The manual has great examples images for volumetric absorption, scatter, and emission, but they neglect to mention that the boundary definitions for the scatter and emission are derived from 3D functions, not user generated image maps, so you can't do transparency mapping of a closed manifold object in the same way that you would transmap hair, for instance. The existing surface interactions remain OK, but anywhere you'd expect a new surface to appear between the visible volume and the invisible, transparency mapped volume just returns black.
    0_1527333390740_Screen Shot 2017-11-13 at 2.49.01 am.png 0_1527333409849_Screen Shot 2017-11-13 at 2.54.29 am.png Not the best example, but the same effect of invisible surface facets is exhibited by a non-closed, convex surface: volume effects, except where the ray would exit the volume, but doesn't intecept a surface.


  • Poser Ambassadors

    You do not need a closed volume to bend the light - the bending happens in refraction which is a phenomenon entirely related to the boundary of two volumes, closed or not. That boundary is literally called a surface.


  • Poser Ambassadors

    While using non-tricky glass plus caustics did get you some light at the bottom of the pool it is far less. Had you not had a well-lit environment (which is the only light you're getting) you would realize why tricky glass is required.

    The particular use case that I always run into for tricky glass is the human cornea. With regular glass shader, yes you can enable caustics but the iris (under the cornea) will be very dark as it is only getting light from the environment, which is easy to hit (it's everywhere). Light from small or infinitesimal light sources are almost completely ignored and in many settings that is 90% of the light.

    The most common un-hittable light source by a path tracer is the infinite light which we all use for the sun almost every time. You could use a very small point light but you'd change the problem definition from "never hits" to "almost never hits". It hardly matters.



  • @bagginsbill said in Caustics, GlassBSDF and Tricky Glass:

    While using non-tricky glass plus caustics did get you some light at the bottom of the pool it is far less. Had you not had a well-lit environment (which is the only light you're getting) you would realize why tricky glass is required.

    The particular use case that I always run into for tricky glass is the human cornea. With regular glass shader, yes you can enable caustics but the iris (under the cornea) will be very dark as it is only getting light from the environment, which is easy to hit (it's everywhere). Light from small or infinitesimal light sources are almost completely ignored and in many settings that is 90% of the light.

    The most common un-hittable light source by a path tracer is the infinite light which we all use for the sun almost every time. You could use a very small point light but you'd change the problem definition from "never hits" to "almost never hits". It hardly matters.

    Yes, I noticed on my tests that at the bottom right there was a shadow and it got treated much differently.

    I moved the light source and camera to get a shadow from the building to fall on to the surface
    0_1527336542037_V2Scene.png

    This is the tricky glass version without caustics
    0_1527336590341_VTGNC_0001.png

    and with 0_1527336624415_VTGFC_0001.png

    and here is full glass with caustics
    0_1527336667025_VRGFC_0001.png

    this confirms what @bagginsbill said, i.e. the floor of the pool is only getting light from the environment, not the infinite light as there is no evidence of the boundary between light and shadow.

    BTW this also shows that I am getting refraction just using a plane. I believe Even if I was using volume absorbtion this would work as the volume would be treated as anything between the surface and the next surface that is encountered. (off to test)



  • Here is the same tricky glass with caustics plus absorbtion volume plugged in to the volume channel of the cycles root
    0_1527338013994_VVol.png

    And here I have tilted the pool so it is deeper at the top of the picture showing that the deeper it is the more light is absorbed
    0_1527339135753_VVol2.png



  • @amethystpendant @eclark1849 eclark is right, you need a cube for refraction and caustics to work properly. I had to figure this one out for myself several months ago with a similar outdoor pool scene/prop. The provided water was a one sided plane that lights could not penetrate. I had to make it invisible and load up a cube to replace it with to get the lights to illuminate the bottom of the pool. You'll run into the same problem with window glass if you use a cycles refract node on it. Anything behind the glass will not get the "sunlight" that is pointed at the figure. In the case of window glass I don't use refract because it's effect is subtle and not necessary, same for a figure's cornea and all the refract does is prevent the light from penetrating. Remember that this is art. Physical accuracy is sometimes not necessary if it looks good or the physically accurate method is causing problems or making your render take forever.


  • Poser Ambassadors

    Using BB's "tricky glass" nodework for the wine (and tabletop glass), Superfly got the colored caustics, even in a dimly-lit night scene! 0_1527417520808_yes_nod.gif

    This reduced and brightened image has two areas highlighted; the flet floor area under the green glass tabletop, and the neckline area on Sydni's shawl top; look at those ares in the full renders.
    0_1527417545383_have a seat have a sip - color caustics highlighted.jpg

    0_1527417687779_have a seat have a sip - G  23May2018.jpg

    0_1527417706445_have a seat have a sip - closeup.jpg

    0_1527417717964_flet cafe' table still life.jpg



  • I think I've asked before .. but this "Tricky Glass" ... can you download the shader somewhere? Or how do I get hold of it? :)



  • @trekkiegrrrl not a download, as such, but the concept is simply shown by screenshots of shaders in this thread SuperFly Coloured Glass around the point where @nagra_00_ describes the addition of the LightPath test for "Is Diffuse Ray" to @bagginsbill 's original "Is Shadow Ray" to account for the failure of prop emitters to generate shadow rays.



  • @anomalaus said in Caustics, GlassBSDF and Tricky Glass:

    @trekkiegrrrl not a download, as such, but the concept is simply shown by screenshots of shaders in this thread SuperFly Coloured Glass around the point where @nagra_00_ describes the addition of the LightPath test for "Is Diffuse Ray" to @bagginsbill 's original "Is Shadow Ray" to account for the failure of prop emitters to generate shadow rays.

    Ah I remember looking at that and trying to reassemble all the nodes on my own. Seems I'm always missing one or hooking something up the wrong way. Hm. I guess I should print it out so I can look at it WHILE I reassemble it. swapping between Poser and a screenshot is kinda hard.

    But I'll give it another go then, because I NEED this glass.


  • Poser Ambassadors

    BB's tricky glass, by @bagginsbill

    Not in runtime folder hierarchy; zip only has the MT5, PNG, and XMP.



  • @seachnasaigh said in Caustics, GlassBSDF and Tricky Glass:

    BB's tricky glass, by @bagginsbill

    Not in runtime folder hierarchy; zip only has the MT5, PNG, and XMP.

    THANK YOU! My hero <3 :D