Fake Caustics

(English is not my language) I thought these caustics got good, so I decided to share it. I followed this tutorial, Easy Access - Fake Caustics in Blender Cycles
although I swapped the voronoi texture for a layer weight.

file: Blend file


Haven’t checked the file, but something looks wrong. Light at glancing angles (to the material) doesn’t penetrate and refract, if bounces straight off as a reflection. If light/pattern was on the inside, it might be better. But on the outside, it should be causing mostly shadow.

1 Like

First of all - welcome to BA, Plan! :wave:

I agree with CarlG.
I think the ‘caustics’ of the vase could look pretty good, if combined with a shadow.
The bright outline of Suzanne looks a bit wrong though.

1 Like

Hmm… It doesn’t look good to my eye :confused:

I prefer baking caustics. I got this as result:

Then I would try to bake with a render engine that can do caustics properly. Solid Suzanne looks more in line with what I’d expect. But if the glass has actual pyramidial geometry (as seen in the jagged shadow), there is no guessing what will actually happen with the insanely complex light paths. You might get light out on the rim, but coming from elsewhere in the glass, countering the shadow from the rim.

A common approach is to use the angle between incoming and normal, but not by fresnel (as @CarlG already pointed out, the caustics are not at grazing angles) . Instead use a dot product to get the angle and add the caustic slightly off from perpendicular incidence.

Also both the reflection and absorption for the colored case are off. You can get the reflection right by adding a glossy shader (with fresnel) in the caustic subtree. Absorption is easiest to handle with the volume shader.

Here is how it looks. The color ramp and transparent colors could use some tweaking to get the overall brightness right.

vidro_caustico.blend (2.0 MB)

@GruntAxeman: that is not much of caustics but mostly ‘filter glossy’ at work. You can get some caustics (but not sharp ones) by tweaking ‘filter glossy’. Too little and you get only fireflies (or just black), too much and you get blur.

1 Like

If you want nice caustics go with LuxCoreRender. No faking, pure power

Noticed that there was filter glossy and clamp values after I baked :joy:

No need to LuxCore Render or faking. Cycles works, and if objects and lights are static, this should be possible to animate using Eevee and still keeping result convincing.

Above image is showing only caustics baked. This is combined with floor: caustics_good2

1 Like

One way to get (relatively) fast caustics is to use experimental ‘Scrambling Distance’ feature. You can find it in Bone Studio build.

That looks indeed great. But, ehm, how does one do that? What do you mean by baking caustics?

Simply, bake lighting to surface textures receiving caustics. :hugs:

Still don’t get it. How do I bake lighting? In Eevee? I think that was about Cycles.

Here is what I can bake in Cycles:

Wow. This looks really good. Didn’t know this was possible in Eevee/Cycles.

You bake with Cycles, then use with EEVEE.

When using cycles, add texture to plane node and UV-map it to whole texture (use 32-bit floats), and select plane object. Keep only both selected and then click “bake” to render texture that gets indirect light.

Then connect this rendered texture to emission shader, strength 1.0 and use add shader to add this gathered indirect light as bake.

When you render cycles, you don’t need diffuse bounces and caustics because they are found from bake.

This is not useful when you render single frame but if you render animation, it is very useful to precalculate textures to static objects and lights.

Same trick works for Eevee too. You can use cycles rendered bake textures on Eevee renderer to render photorealistic animations fast.

Downside is that bake textures can use a lot of memory so it is most useful to precalculate indirect lighting because they don’t need to be so high resolution and you can render direct lighting using high resolution.

Okay. So you separate direct/indirect lighting by baking indirect and when rendering only render direct and add to it the indirect from bake.

That far I got it. Does it mean the indirect bake isn’t any less noisy than normal rendering with caustics enabled? You got the image above just by brute-force, using a huge number of samples?

I did use higher samples in bake. It doesn’t matter on still image.

This is useful on animation, because you can render thousands frames super fast with low samples and bounces.

If noise is issue, just adjusting clamp and denoise, or filter glossy solves that.

For still images, it isn’t useful to play with fake solutions because time that goes to tuning and setting things up, takes more time than rendering without fakes.

This baking trick is so simple that I can live with it because it doesn’t add much complexity and results are real thing.

How in the name of Naven did you do this?