For my procedural shading project, I decided to depart
from the typical realistic rendering and tackle
cartoon shading. I used renderman to do this. Here
is my first image:
The two main features of this image are the hard-edged boundary
between the illuminated and shadowed portions of the sphere,
and the inked sillhouette edge. In cel animation these are
created with paint and ink.
For my project I tried to produce a simple but general and
pleasing implementation of cel ink and paint using renderman.
I also wanted to combine this "2D" looking style with raytraced
effects such as reflections in order to render more interesting
One problem that I ran into remains unsolved in my
implementation. As you'll see in my final images, the ink
lines on objects are not of a uniform width. While this
is not always undesirable, often we want uniform ink lines.
The variation in width is caused by the variation in surface
curvature of the surface. This is because we detect
silhouettes using the cosine of the angle between the viewing
direction and surface normal. I made several attempts to
compensate for this, including using renderman's derivative
functionality to actually compute the surface curvature along
the direction of view. I was unable to accurately compute and
use this to keep a constant ink width. With more time and
trials, I think I could do it. I think I could also provide
the ability to vary the line width with other factors, such as
depth. The other problem I had was with BMRT's raytraced
shadows: I couldn't get them to work.
In the images below, you will notice several features:
Cel paint incorporates diffuse, specular, and ambient
illumination components. Note that unlit portions have ambient
contributions, and there are specular highlights.
Raytraced reflections (I plan to add refraction, but I
didn't because I didn't want it in these images).
(Raytracing provided by BMRT)
Glossy reflections through distribution raytracing. (BMRT)