twice two . com

Thick Paint

This browser does not have a Java Plug-in.
Get the latest Java Plug-in here.

(Left-drag to draw, right-drag to erase.)

This applet implements basic 2D bump-mapping. The effect is essentially the same as "Impasto" in Painter, or the original "Deep Paint" program, but without all the useful features like color, light source control, etc. This is just an example.

Rather than recomputing the lighting for each pixel, this applet precomputes the lighting into an array. Basically it renders a unit sphere into a memory buffer. Later, we can find the lighting for a given surface normal simply by normalizing the vector and looking up its x- and y-components in the memory buffer.

The usual caveats apply: this code is unoptimized and will probably run rather slowly. There may be (probably are) bugs.