Painterly Renderer Ray Tracer



Ray Tracer

Because of Brown's interest in creating computer generated images that look like paintings or cartoons, Carolyn, Markus and I decided to create our own version of the painterly renderer.

Our system takes a scene graph (which describes the objects in a 3D world) as input, and ueses a traditional ray tracer to trace out the scene. However, unlike traditional ray tracers, our painterly renderer ray tracer puts down a paint stroke instead of a pixel of color.

In the picture below, the blue "square" is the canvas, the red ball is the object. When the computer (the little black line thing on the left is supposed to be a person's eye) looks through a particular point on the canvas and sees a small part of the red ball, it will put down a little paint stroke of red.

Then the obvioius question is, "how does the system paint this stroke?"

Stroke Length

The length of the stroke is bounded by the geometric boundaries of the object projected onto a 2D plane.

In other words, when a stroke is being placed onto the canvas, the stroke is allowed to be as long as it wants for as long as it doesn't draw itself outside of the area of the object.



Stroke Orientation

The orientation of each stroke is determined by the normal of the surface that's intersected by the ray, projected onto the 2D plane, and taking the perpendicular lines.

In other words, find the normal of the intersection surface, project the normal onto 2D plane, and draw the strokes othoganal to it.


In this example, the white lines represent the normals (projected onto 2D plane), the brown lines represent the direction of the strokes that are othoganol to the normals. The red ball shown in the upper left hand corner is drawn with strokes parallel to the normals, and the red ball shown in the lower right hand corner is drawn with strokes perpendicular to the normals.

Layering

We employed some basic concepts used in traditional painting to make the results look good. Layering gives the images depth and prevents the strokes for the background to extend into the foreground. In other words, it prevents the image to look like a baby has taken crayons and drew the scene.



Results



Limitation


Because our system only checks for geometric boundaries and not color boundaries, in the case of a textured mapped picture, the system ends up drawing a blob for the yellow sun. This is not a terribly hard problem to solve, but we ran out of time. Feel free to pick up where we left off and continue with this project... We had lots of fun with it.