Wet and Sticky: A Novel Model for Computer-based Painting

By Malcolm Tundle Cockshott

I got a PDF copy of the microfiched version of this 1991 dissertation from the website of Bill Baxter. This is one of the first works on making painting on the computer something approaching real painting, with real viscous, thick paint.

The dissertation is a riveting read — that’s to say, I finished it in two evenings. It’s light on math, and in the microfiche version all screenshots have turned to blurs and none of the colour plates have survived.

The basic idea behind wet & sticky is to add attributes other than colour to the individual pixels — liquid content, weight, drying speed — and to give each pixel a substrate with an absorbency factor and a gravity. (That’s a fun thing: you can have clusters of pixels with a gravity opposed to the main run of gravity.). Then there’s an automaton,
more or less a permanently running filter, that moves paint around according to gravity and some other rules, and that dries paint up.

There exists an implementation of this model, originally created for a Sun box in 1991, and never really released; but when I asked Dr. Cockshott whether it would be possible to open source the software he said he’d like that to happen, and when I mailed one of the original authors (Dr. David England — the other is Kevin Waite — he immediately mailed me a zipfile
with all the original source, released under the GPL.

I spent an evening porting the source over to Linux — an easy task really, the makefiles were a bit borked and there was a copy of netpbm included that we could do without, that was all. I didn’t manage to get the OpenGL interface working, just the old Athena widgets interface. Good grief… Unix GUI toolkits have come some way since 1991… In any case, being 1991 code, this wouldn’t run in my true-colour display, so I restarted X with an 8-bit visual and started
playing a bit:

I didn’t make an animation, but the paint is slowly dripping downwards in a quite realistic movement, and if you manage to make a few marks on the canvas before the application crashes, you can see it giving a pretty effect to your brush strokes.

Of course, this code (a mere 2000 lines of Kernighan & Ritchie C) is only a research example. But it’s clear enough that I think I can incorporate it as a separate color model into Krita; that will give us an opportunity to really exercise Casper Boemann’s new tile code, because now we have fourteen channels of which three are floats (or maybe doubles) and the rest small ints; I want to have the filter run in a separate thread (or maybe async using timers) so it can offload work to the second processor, and there needs to be a way for a color model plugin to add stuff to the gui; a settings docker, a special colour mixing
palette and some other things. Quite a challenge — and I really should be finishing the littlecms integration, and the selections, but this is so much fun — and the reason I started hacking on Krita in the first place…