Green Shoots (Executable Graphics)
Released at Hogmanay 2021, Executable Graphics (a single compute shader generates this image, with no external data). Released as an image only, since it takes multiple hours to render.
Background
New Year’s Eve was approaching, and with the Omicron covid variant on the rise many of us didn’t want to risk partying. Luckily reality404, Aldroid and Crypt organised an online streaming event called Silvester. This was an online demoparty with competitions, so I decided to make something but as I didn’t have much time executable graphics made sense.
With the backdrop of 2 years of pandemic and lockdowns, having not seen friends in far too long and spending another New Years at home I wanted to do something with a positive message. And with vaccination it was looking hopeful that maybe in 2022 things might start getting back to normal… could this be the first green shoots of recovery?
Brute force rendering of micro-geometry
I’ve been interested in brute force rendering complex materials for a while - see ‘Cloth’ for example - brute force rendering of cloth at fibre level. I’d also been thinking about ‘microfacet’ rendering, which is where you simulate the way light bounces around in the microscopic lumps and cracks that exist in many materials.
Normally microfacets are approximated, because they’re too small to see. But what if…
So I built a quick test setup using SDF geometry and raymarching (plus path tracing) that fills a volume with packed reflective spheres:
It works! Despite there only being reflective surfaces, once the spheres are too small to see the result is effectively a matte material.
Comparing to a standard matte material, the differences are quiet obvious:
It’s darker because as the light bounces around inside the ‘cracks’ more energy is absorbed. The colour is richer too, because each bounce reflects orange light and absorbs other colours, making it more orange. And there’s a fresnel effect - rays that glance the surface are more likely to be reflected out and rays that hit head-on are more likely to fall into a crack.
Rendering snow
I’m once again using my own path tracer for this, and the scene is procedurally generated with signed distance functions.
Snow volume
The overall shape of the snow is just a plane with some sine waves added to give it ripples. I wanted the plants to look like they’d melted the snow around them, so I think removed 3 cylinders with a smooth subtractive blend - this gives a nice smooth curve. To get the ‘ridges’ between the plants, I just took the minimum distance to the 3 cylinders (giving a hard cut-off between them) then used the smooth subtract on that to give the curves into the snow too.
Snow flakes
I can’t find a screenshot, but they’re a 3d hexagonal snowflake. I didn’t bother to randomise the shape of every flake, but it’s easily doable.
Plant shoots
Geometry
The shoots are procedural. I looked at some photos of the kind of plant I had in mind, and the leaves grow in rings out from the center.
So I started out with 3 concentric tubes (giving 3 leaves), plus a thin outer “sheath” tube with a bit of sin wave added to the top:
Then I removed part of the circle for each tube:
Finally I sheared them (by offseting on the Y axis) to form the leaf shape:
Material
The base material is just matte green, slightly lighter for the sheath:
Stripes are added, these are lighter and slightly shinier:
Finally the tops are tinted yellow. This is done by blending into a yellow material based on the normal.