Follow by Email

Wednesday, March 7, 2012

Marbling

In Painter 4, we came out with several new features. One was mosaics. Another was marbling. Marbling is the application of drops of colored ink onto the surface of a liquid, playing with the ink, and imparting that color imagery onto a piece of paper. Marbling was used in the industrial revolution to make the frontispieces of books.

This technique was a bit of a lost art because the people who created them actually figured out the process and kept it secret in an unusual way. They constructed several rooms. Each one had an artist that knew his part of the process. The artwork (and sometimes a pan of liquid ink) was passed through a slit in the wall in between the rooms. After several rooms, the finished piece would emerge. In this way, no single person knew the entire process and thus its creator could keep it very secret.

The first step was dropping various colors of ink onto a liquid surface called a size. Why it's called that, I will never know. As you drop a bit of ink down, all the other bits of ink are distorted by the new drop. This creates a very interesting pattern, called stone.

Here you see a stone pattern constructed by dropping a lot of drips of ink onto the liquid surface of the size.

The stone pattern is the undistorted pattern that is used as a colorful basis of the marbling pattern. This stuff can be created in a simple way, using a conformal mapping. Let's say the new drop has radius R. We preserve the area of the colors already on the size by displaying them from the center of the drop, altering the distance function of the color you fetch using a function of R, and also of D, the distance of the pixel you are computing from the center of the blob. In this way, you can evaluate the entire stone pattern using a ray-tracing technique where all the drops of ink are taken into account for every pixel of the image.

This is done in the Painter Esoterica:Blobs... effect. That's actually how I created this image.

The second step taken by the artisans (in a separate room, and by a separate artist) was to run pins and rakes through the liquid, further distorting the ink in interesting ways. They usually moved the pins and rakes in a sinusoidal pattern.

Here you see the result of one pass with a rake. The source image was a colorful soft spiral of purples, greens, white, and browns. You can see the rake was passed from left to right. The sinusoids are quite pronounced. The ink sticks to the rake tines and gets pulled in the direction that the rake is pulled.

This is how the marbling patterns are created, by distorting the colors of the image, creating a cool-looking pattern.

This is how it starts, but the various marbling formulas usually feature several passes.

After three passes, and using a very special formula, you can get some very nice patterns, like this bouquet pattern.

It starts with a very fine rake vertically from top to bottom, and with very small tines so the distortion is just enough to create a small high-frequency pattern.

Then two larger vertical sinusoids are used to mix it up, using a widely-spaced rake with large tines. This results in the bouquet pattern you see here.

You have probably seen these marbling patterns in the old books. Binders like them a lot.

There are literally dozens of interesting marbling patterns, and each has a cool formula. Many of them are programmed into Painter as presets.

Painter still has this marbling command, Esoterica:Apply Marbling...

Here is another bouquet pattern, with different placement of the widely-spaced vertical rakes. I think I considered this to be one of the better results in the bouquet class of marblings.

You can get thistle patterns by passing one rake vertically, and passing another in between the lines of the other one in the opposite direction (this pulls up and down the ink, in alternating sections). Then you can bouquet it.

When you use circular patterns with the rake, it gets even weirder, but Painter can't do that with its Apply Marbling... effect. There might just be a bit more to explore in marbling.

This is an experimental design done by using the Blobs... effect. Here, the ink blobs were filled with an image (the pattern source) instead of a flat color. This can create some really interesting patterns, as this shows.

Use the right colors and it pops! it comes alive with vibrance. But it's a little disconcerting, since it seems to be alive and organic somehow.

The implementation of marbling was also a bit of a raytracing trick as well.

When distorting an image, all distortion functions must run backwards. This is because you are enumerating all output pixels and trying to find the source pixel for that output pixel. This is the reverse from simply taking a pixel and moving it from its source to its definition.

So the marbling implementation was really just iterating over every pixel and computing a function going from the displayed pixel to the place where it came from.

Graphics programming can be a bit complicated sometimes.

When Painter 4 came out, as far as I know, it had the first computer implementation of marbling and stone patterns ever.

It was fun figuring it out, and I always did like to show new things.

No comments:

Post a Comment