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.


New Year’s Eve was approaching, and with the Omicron covid variant on the rise many of us didn’t want to risk partying. Lucily, 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 surfaces.

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:

Microfacets from real geometry

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:

Microfacets compared to matte material

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.


The scene setup is the same as Kept in a Box - a light outside the scene, low this time to cast a beam of light through the door and with a bright sky to provide more ambient light. There’s no room again, just one wall with a rectangle removed to form the doorway and a box to form the door.


You can also see the floor ‘texture’ here - I’m setting the material roughness randomly. It’s pixellated, but that doesn’t matter because it’s covered.


The cloth is an SDF. The material is matt red, but with a slight reflective fresnel layer to give it a little sheen. It’s a flat disk:


To which I just added some sine waves together and added them to the height, it’s cheap and nasty and looks like a wave pool here but looks like rumpled cloth in the end 🤷‍♀️


For fine detail I just added another couple of sine waves at right angles to make it look a bit like a cloth texture.


The last step is to add some distortion parallel to the floor so it doesn’t look obviously round.



The mask is just part of a sphere, with a few boxes blended in to give it a face shape and some holes punched through for the mouth and eyes. I gave it a bit of thickness to make it look solid.


The material is a roughened gold. It’s the same technique as the floor - I just use the surface position to generate a random roughness value.


The post setup is similar to last time. Raw output:


Increased contrast:


This time I wanted warm, rich colours so I increased both saturation and warmth:


Finally depth of field and vignette: