Particle Based Shading

In this post, I explore a technique to create a more natural look to procedural images for generative rendering. When procedurally creating images, I often try to avoid sharp transitions and try to embrace noise and imperfections as much as possible.

Generally, I tend to prefer analog medias for their imperfections, whether it is analog music instruments or analog photography. The grain and natural artifacts due to the physical process of capturing the signal gives a natural warmth that can be easily perceived. How can you reproduce these features with procedural images?

The above image was created using a particle based technique, trying to mimic pencil based drawings. Instead of drawing each box with two triangles, they get filled with hundreds of tiny particles represented by circles having a one pixel radius. Each particle has a very low opacity and is antialiased, has a given lifetime — and may disappear after some time — may loose or gain a bit of their opacity during their cycle and is bound by the shape that they should fill.

Sometimes a particle may be slightly offset in a random direction by one or a few pixels. This imperfection and noise gives the final image similar features to what would happen when drawing with a pencil with analog media artworks.