Inside the Frame Vol. I — Water

How a painting becomes a place

Each room starts as a flat image in a museum's open collection and ends as a world you can turn around in. Nothing in between is photographed or downloaded. The worlds are written as code, rendered once, and kept alive in the browser by a small viewer made for them.

Decide where to stand

A painting has one point of view, and the painter chose it. A world needs a place for the visitor. In the Great Wave that place is the bow of a fishing boat, low in the trough, so that the wave is above you. In Hiroshige's shower it is the platform of a fire watch, because he looks down on his bridge; in Monet's garden, a landing at the edge of the pond; on Turner's river, a rowing boat among the colliers.

The view each world opens on is composed to echo its painting. Everything else, to the sides and behind you, is not in the picture and had to be made up in the same hand.

Woodblock print: a towering blue wave curls over three long boats; Mount Fuji, small and snow-capped, sits in the distance.
Katsushika Hokusai, Under the Wave off Kanagawa, c. 1830–32. The Metropolitan Museum of Art, New York.
The same sea from inside it: the bow of a boat in the foreground, the great wave and its claws of foam overhead, Mount Fuji small on the horizon.
The world's opening view, from the bow of one of the boats.

Write the world

Every scene is a Python script that builds its world in Blender from an empty file. Nothing is sculpted by hand and no models are imported. The sea is a sum of waves; the long bridge is one frame of piles, repeated; every ship on the Tyne is the same function called with a different length, heading and set of sails.

Working this way is slower at first and faster ever after. A world can be rebuilt from nothing in seconds, and corrected by changing a number.

The rain world as flat areas of colour: yellow deck, grey piles, turquoise river, blue sky, with no outlines or texture.
Hiroshige's bridge as it leaves Blender: flat colour, lit by nothing.

A print is drawn, not lit

A woodblock print has no light in it, only blocks of colour and a key line. So the two print worlds are rendered with no lighting at all, and their outlines are drawn afterwards from three pictures no visitor sees: which object each pixel belongs to, which way its surface faces, and how far away it is. Where any of the three changes abruptly, there is an edge, and the edge gets ink.

The bridge in flat arbitrary colours, one per object: deck, piles, river, platform.
Which objectOne colour for each thing.
The bridge in violet, pink and blue that follow the way every surface faces.
Which way it facesThe slope of every surface as a colour.
The bridge in greys: near parts light, the far end of the bridge nearly black, the sky black.
How farNear is light, far is dark.
Dark ink outlines on paper: the deck of the bridge and the crossed timbers of its piles.
The key block: every outline, found by the computer and drawn before any colour.

Colour goes under the line, then the surface of the print: a little mottling where the pressure of the printer's pad would vary across a flat area, and the fibres of the paper. A print world renders in about ten seconds.

The bridge over the river, before the people are drawn on it. Printed.
Drag across the picture, or focus it and use the arrow keys.

The wave that looked like a shell

The first Great Wave was built like everything else, as a surface: a profile, a curl and a row of fingers. From inside the boat it was a mussel. What makes the wave Hokusai's is not its volume but its marks: the bare back, the hollow streaked with two blues, and foam that breaks again and again into the same small claw.

So that wave was thrown away, and the new one is drawn. Its curves are read from the print, and every claw on it is one shape, a hook with a swelling line of ink along its back, laid in rows and turned a little each time. There are ten colours and no texture. The sea, the mountain and the boat you sit in are still rendered; the wave is laid over them like another block.

A smooth blue dome with white facets on its inner side, like a shell, over a dark blue sea.
First attempt: a surface.
The wave drawn as in the print: white back, deep blue hollow, a lip of white claws reaching over a boat.
After going back to Hokusai: a drawing.
The sea from the bow of the boat, without and with the great wave. With the drawing.
Drag across the picture, or focus it and use the arrow keys.

Looking down, like him

The rain was first seen from the bridge itself, and it looked like a comic: round trees with thick outlines, a brown rail across the view, grey air. Hiroshige's sheet is nothing like that. His eye is high above the river; the sky is Prussian blue with black wiped into it by hand; the far bank has no outline at all; the bridge is yellow.

So the place to stand moved up. From the platform the bridge crosses as he crosses it, and the people on it are drawn with the same press as the wave, each caught in mid-stride. Then they run, unless you keep the rain off them.

A pale plank bridge seen at eye level with a thick brown railing and rounded, outlined trees under a grey sky.
First attempt: on the bridge.
A yellow bridge on grey piles crossing a turquoise river, seen from above, with people under hats and umbrellas and black cloud hanging in a blue sky.
After going back to Hiroshige: above it.
Close view of the people on the bridge: women under dark umbrellas, a man in a straw hat, two sharing an umbrella, a man under a straw mat.
The people are drawn; the bridge they run on is rendered.

Letting it fall

A drawing can do what a rendered picture cannot: move. The browser draws the wave itself, some 125 thousand flat triangles in the order a printer would lay them down, and every one hangs from a point that can be shifted. The lip bends over, the claws turn with it, the water breaks, sinks and gathers again, until it stands for a moment at the instant he chose. Then it falls.

The lip of the wave bent over, its claws reaching down towards the trough.
Falling
The wave collapsing into heaped foam that throws up claws of its own.
Breaking
The wave rising again behind the white peak, its arm of foam still short.
Rising again

An oil is strokes all the way down

Monet's pond was first made as a garden, lit and then filtered until it looked painted. It came out pleasant and wrong. The painting has no sky in it and hardly any light. It is russet and bottle green, with yellow strokes let down through the dark, and its subject is the touches of the brush as much as what they stand for.

So there is no garden any more. The world is about 430,000 strokes of paint hung in space, each a ribbon with its own bristles and its own dry end, turned to face you. Foliage, bridge, reeds, pads and their reflections are nothing but marks laid in the direction a brush would go. Every colour starts as a pixel of the part of the canvas that mark belongs to: the bridge from the bridge, the blossom from the band of blossom.

A bright green garden pond under a pale sky, with round lily pads and a small mint-green bridge.
First attempt: a garden, filtered.
A dark bridge arching over russet water and turquoise pads, under a curtain of brown and yellow-green strokes.
After going back to Monet: paint.
Close view of separate brush strokes: turquoise pads, russet water, the far band of pale blossom.
Closer to: nothing but marks.

Paint can move too. A gust crosses the leaves and every stroke in it leans; the pads rise and fall on the pond, and rings spread where the pointer passes over it. And since Monet set up again and again before the same motif as the light changed, here the light is what time changes: the afternoon of the painting goes to sunset, the blue hour, a night of fireflies, mist at dawn and noon, until it comes round to the light he chose.

The river that took three attempts

The first version of Turner's room was a believable night: a grey sky, black hulls, a small moon. It was nothing like the painting, because Turner's night is not dark. The second went back to his palette and lit the scene with it, haze, fires and all, for thirteen minutes of rendering. It had his colours and none of his hand: a place, with a filter over it.

A dim grey river at night with black ship silhouettes, thin columns of smoke and a small pale moon.
First attempt: a night.
The same river rendered with light: a blue sky with a wide golden glow, hard-edged ships, fires and heavy black smoke.
Second: his colours, not his hand.

The third starts by reading the painting as a copyist would: from the widest brush to the finest, along the forms of the picture, and with a finer brush only where the wider one has not yet said enough. That gives some ninety-five thousand strokes. They hang in front of you where he put them, and his sky, smoke and river are carried on from the margins of the canvas, all the way round, in strokes mixed from the same paint.

The fires and colliers as a few wide, blurred bars of blue, grey and orange.
The widest brush
The same part with narrower strokes: masts, smoke and fires can be told apart.
Two sizes down
The same part with all its strokes: rigging, men on the keels and the glow on the smoke.
The finest
Turner's river from a rowing boat: the moon in a wide pale glow, colliers in smoke, fires on the right and more ships beyond the edge of the painting.
The third. The canvas ends at the last tall mast on the right; the rest is carried on.

The clouds turn slowly round the moon, ships and buoys ride the water and keels are rowed across its road. The picture has two lights, and they take turns. The fires blaze up and the keelmen in front of them heave harder; then the work slows, and the road of the moon runs bright over the water. Look at either, and it holds.

Leave it room to move

A rendered panorama is a still. Two more small pictures travel with each one so that the browser can bring it back to life. The first says what may move: red where there is water, green where there is sky, blue for anything that burns. The viewer ripples the red, drifts the green and makes the blue flicker, on every frame. In Monet's garden, where there is neither sky nor fire, green is what the wind moves and blue what floats.

Over it come the strokes that have left the picture: willow leaves and petals, dragonflies, smoke, sparks, gulls, the spray of the wave. Each is one touch of a brush with a place in the world, and passes behind whatever is nearer.

The second says how far away everything is. With it the viewer can move your eye a few centimetres around the point the world was rendered from, so that near things slide across far ones as you turn your head, as the mouse moves, as the boat rocks. That small shift is the difference between looking at a picture of a place and being in it. The depth of a whole world is a picture of ten to fifteen kilobytes.

The river view in three flat colours: red water, green sky, black ships, with small blue marks where the fires are.
What may moveWater, sky and fire.
The river view in greys: the rowing boat nearly white, the water fading to black at the horizon, ships as faint grey shapes.
How farThe depth the eye moves through.

Go through the canvas

The exhibition is about one moment: the picture on the wall becoming the place you are in. It is the only transition the project has, and it is made of water and pigment, the two things every painting here is made of.

A drop lands where you touched the painting. Pigment blooms from that point like ink let into water, in the colour the painting is known for: Prussian blue for Hokusai, white gold for Turner. The surface swells and ripples, and behind the bloom the picture is already a place. Leaving runs the other way: the dark of the gallery closes in on the world until it is a painting on the wall again.

For a moment both are on the screen, and they agree. Every painting has a table of where each part of it is in its world: this post of the bridge, that mast, the tip of that claw. The world first appears pulled into the shape of the picture, so that what was painted is what is there, and lets go of it as you come through.

The Great Wave print on the gallery wall with a small dark-blue stain opening in its middle.
The drop
The stain has spread into a ragged blue-edged opening; inside it, the sea of the world.
The bloom
The opening now covers most of the print, its edge like ink in water; the wave world fills it.
Through
The wave world, complete: the great wave overhead, the bow of the boat below.
Inside

What the browser gets

One image per world, unrolled like a map of the globe, and a viewer written for this exhibition and nothing else. There is no 3D library and no sphere to wrap the image on: a single program on the graphics card works out, for every pixel of the screen, which way it is looking, and paints what lies in that direction. Worlds arrive at half resolution and, on screens that can show more, sharpen once you have settled.

The whole of Turner's river as one wide strip: the pale glow in the middle, ships to both sides, the blue sky behind the viewer at the edges, the rowing boat stretched along the bottom.
All of Room IV in one picture: 360° across, straight up at the top edge, straight down at the bottom.

The sound is made the same way, from nothing. Sea, rain, leaves, fire and the drop that takes you through a canvas are synthesised as you listen and placed around your head. The gallery keeps a note for each room you have been in, and the four make a chord. No audio file is downloaded.

Worlds, each one script
5
Pixels across each panorama
8,192
JavaScript, compressed
53 KB
Libraries at run time
None
Audio files
None

Make it for everyone

An immersive piece is easy to make for a mouse, a large screen and good eyesight. This one was built the other way round. Every world has a written description, so the exhibition can be followed without seeing it. Everything can be done from the keyboard, or with single clicks and no dragging. Animation can be paused, and is off from the start where the system asks for less motion. Without WebGL, each room is a page of pictures and text.

How the exhibition can be used is set out on the About page.

The rest is better seen from inside.