← Blender.Today
  • Published 6 Sep 2020

Underwater interactive caustics in eevee

I,ve been planing to make an under water cinematic in blender for the past couple days and have been wondering "how would I do the caustics?" ever since. Yesterday I sat down and realized the only way to get the effect was to give the ground plane (the ocean bed where the caustics are to occur) a caustic like material (can be made very easily by using voronoi and color ramps set to b-spline). however, I found out that you can take the same texture and use it on a surface plane (above the water/volumetrics) only this time INVERTING the colors giving the opposite effect. So usually you would have the bright areas where the light would converge from the water's surface as white emission and the dark area as your sea bed shader. For the surface on, The area that would create the effect will be black and the rest white. Use a color ramp set to ease or b-spline and using a mix shader with diffuse one the bottom and transparent in the top and the actual voronoi in the factor and DON'T forget to make the transparent shader's color slightly dark or the smooth edges won't form. It is very important to set the shadow mode to either "alpha clip or hashed" and the blend mode to "alpha hashed or alpha blend".

Now you can take any light (spot works the best but sun and area can be used too) give the light a very high power and shine it through the surface plane. It will make realistic caustics that you change anytime. Any object above the bed will get the caustics as well restrain the light from passing through it. The setup is realtime meaning the angle and size of caustics can be changed by changing the position of light. Softer caustics can be achieved by increasing the radius of light.

There is one limitation though, The light that projects on the bed seems to have pores as if the surface plane has pores although it doesn't. You can hide the effect by setting the cube size in the shadow setting to 4K but it is still visible. Hopefully there is a solution to it out there that I might find. but thats it for now.

Screenshot (383).png

carbonx95
6 Sep 2020