Genuary 23: Abstract vegetation

January 23, 2022

This is a sketch for Genuary 2022, which provides a creative coding prompt for each day of January. This is day 23: "Abstract vegetation."

I wanted to see if I could recreate the look of backlit plant leaves, where light directly backlighting a leaf produces a vibrant lime green, and the colour gets progressively darker and bluer the more leaves the light has to pass through. The subsurface scattering also blurs the silhouette of leaves blocking the light.

To accomplish this, I render each leaf in sequence so that it can see the content below it. It samples a number of pixels in the area under the leaf to blur the content below it. It looks at how much red light has passed through, and uses that amount to control how deep a green to render.