Blender projects and node experiments.
Inspired by Evan Wallace, I made caustics by distorting a mesh based on refraction.
This is the old version (using a physical light surface). It doesn't stick to walls, and isn't very useful.
Firstly it uses a Raycast
node to find where the light surface collides with the water surface (thanks Erindale!)
The animation shows how Raycast
moves depending on the ray length. It travels along the normal vector.
Next it uses Refract
from Vector Math
:
For a given incident vector A, surface normal B and ratio of indices of refraction (IOR), Refract outputs the refraction vector R.
- The incident vector is the direction light is going. Here it's the normal vector of the light surface.
- The surface normal is the vector pointing up from the water. Here it's the
Hit Normal
returned byRaycast
. - The IOR ratio depends which two materials light travels through. Here it's
IOR of air / IOR of water
.
Because different materials have different IOR values, I added a custom IOR attribute to the water.
When Raycast
collides with the water surface, it reads the water's custom IOR attribute when performing the division above.
Another example of using Raycast
to distort a mesh.
Requires Capture Attribute
due to reasons described by Garek.
Blender version of an effect originally made in Houdini.
Uses Split Edges
to separate each face, then travels along the normal to move each face outwards.
WARNING: This is slow because Realise Instances
was needed to apply the materials correctly.
Requires Blender 3.1 or above due to Vertex Neighbours
controlling the leaves shader.