fake caustics

Issue #400 resolved
Alessandro Padovani created an issue

In the daz forum I got some request for fake caustics, since cycles can’t do real ones. Personally I’m not a big fan of fake caustics, because they’re basically quick tricks that have nothing to do with the real PBR caustics. But, since the implementation is quite easy, we may provide them as an option.

The setup below is for solid glass only, thin glass won’t get caustics because there’s no refraction. Basically the dot product is used to trace the color ramp from the outside to the inside of the shadow area, so we can paint whatever we want on the shadow and make it seems a caustic effect.

Please note that the shadow will always be gray in eevee since eevee can’t do colored shadows, but the caustic intensity will be visible anyway.

# simple fake caustics
ramp color 1 = glass color * 0.5, ramp position 1 = 0.9
ramp color 2 = glass color * 10, ramp position 2 = 1.0

Comments (8)

  1. Thomas Larsson repo owner

    When checking old issues I found that this should be easy to fix. But how do you make the geometry and light path nodes show only one output? That would clean the node tree considerably.

  2. Alessandro Padovani reporter

    You can use the node > toggle hidden sockets to hide unused inputs. I agree it would clean up the materials. It is not advisable to use it on all nodes though because it also hides inputs with a value. For example in a diffuse bsdf it will hide the color and roughness if not connected.

    Personally I’d also advise to close the texture nodes, since the texture name is already reported in the label. And this too would clean up the materials.

    As for commit 8893d22 the fake caustics work fine. Below a test scene first iray then cycles. In iray I also used the caustic sampler.

    It seems the background color in the test scene is not imported correctly though and I have to fix it by hand. There’s a black background in the test scene that is imported as gray in blender. Also the ray visibility needs to be camera only because in iray the background doesn’t light the scene. I think we already fixed this in #129.

  3. Thomas Larsson repo owner

    For some reason the add-on didn’t import the background if it was pure black. Fixed now.

    The addon generates an extra lightpath node in the world material, apparently to fix something with Eevee. Is that still needed?

  4. Log in to comment