Screenshot

Released at Solskogen 2020, 4KB Executable Graphics (a single 4KB executable file generates this image, with no external data).

Download on Demozoo

Where leaves fall in Autumn, flowers bloom in Spring

Solskogen 2020 was the last ever Solskogen party, and I wanted to make something fitting.

It was the end of an era, and a time of sadness as well as a really good party. Sunset and Autumn came to mind, and Autumn speaks to me of falling leaves the colour of flames and golden light.

So, a leaf strewn forest floor, dappled golden sunlight. The final element was the ring - discarded and left in the woods, a symbolic closing gesture.

Breakdown

Again, I started with the lighting. The ambient light has a green tint, and the main light is quite orange to hint at sunset.

I placed 2 planes between the scene and the light with holes in to create a dappled light effect (you can see the hole pattern, but with the leaves in places it’s not visible so wasn’t worth changing).

Screenshot

The ring is just a stretched torus.

Screenshot

Next, leaves. I used SDFs for this, with domain repetition to basically make a grid of leaves. Size, shape, colour and rotation are randomised, and they’re given a slight curl.

Screenshot

I then added more layers, with a random rotation and offset, to build the leaf pile.

Easy, but: the leaves all intersect.

Screenshot

I had to figure out how to pile leaves up without them overlapping. A physics sim wasn’t viable. Doing this analytically is way beyond my maths level. Time for dirty hacks :D

Compare this shot with the last one - the leaves are in exactly the same position, but they magically no longer intersect:

Screenshot

How? I built the leaf pile in layers, bottom to top. For each layer, I take the shape of the leaf and use it to clip any geometry above it. This means if there’s a lower leaf intersecting the current one, the part that intersects gets removed. Cheap, hacky, but looks ok 🙃