McGill University
Computer Science Dept.


A Project for CS767 - Non-Photorealistic Rendering

Michael Batchelder and Kacper Wysocki

Winter 2005

Project Description:

Non-Potorealistic Rendering is a very wide field. Often it is associated with techniques created with the intent to mimic human artists. They may emulate various painting styles (such as impressionism or pointillism) or they might give the digital artist a more interactive tool to create images after a certain medium such as water color or stippling. In other instances they create a new medium, such as image mosiacs. NPR, however, does not stop there. There are areas of study that are more technical in nature.

There has been a fair amount of research in the field of technical illustration and rendering. Specifically, computers can be used with 3D models to produce images that are easier to understand than those produced by the human hand. Some of the common effects that have proven useful include silhouette enhancement, non-photorealistic shading and lighting to better potray shape and contour, and transparency.

Most of the research in this area has been applied to static scenes but as computers become more powerful there is an opportunity to take these techniques into a real-time realm. Imagine, if you will, the ability to perform a "walk-through" of a 3D technical model - whether it be an engine block, a silicon chip, or a building - in which features have been enhanced so that you better understand the scene.

This project's aim is to bring some of these technical enhancements to a 3D real-time engine, along the lines of Gooch, et al [1][3] and Rasker [2]. Specifically, we have chosen the Quake 3D engine [5] provided by ID Software as our rendering tool. It uses OpenGL to render sets of polygons to the screen, often applying texture maps to these polygons to simulate various surfaces. We will use the NPRQuake [4] extension to the Quake engine, which abstracts the drawing calls out of the engine, making it easy to implement new rendering styles. NPRQuake has already been used to produce a number of styles including a pencil sketch style [4] and a cartoon style [6] (see images below). As in these styles, it is our goal not to produce any technical models, but to use the very maps and models provided by the Quake game to produce a visually improved 3D world in which features such as edges, creases, and contours are more obvious and easily understood.

NPRQuake Sketch StyleNPRQuake Toon Style
The Sketch [4] and Toon [6] Styles for NPRQuake

There is more than one way to skin a cat, however. Many enhancements can be accomplished in different ways, each with their pros and cons. Sometimes the result is better but the performance (such as frames per second) is worse than another approach. In this project we look closer into these various techniques and compare them.

Project Details:

Some examples:

one line, thin
One line per silhouette/crease, thin.
The scene isn't as jittered, but silhouettes and creases are very indistinct.

eight lines, thin
Eight lines per silhouette/crease, thin.
Creases are pronounced, but provide little fine detail.

one line, thick
One line per silhouette/crease, thick.
We see lots of aliasing. Creases and silhouettes are unpronounced and hard to find.

eight lines, thick
Eight lines per silhouette/crease, thick.
Creases are distinct, but do not suggest shape accurately enough.

crease detail
Crease detail.
Drawing multiple jittered lines makes a cool sketchy effect while losing detail.

toon shading far toon shading medium toon shading detail
Ainpr silhouette and crease details
In the far away model, creases appear rasterized. We could include a parameter to avoid drawing creases that are too small and too far away.
At medium distance, we already see that creases have radically different widths, and this is even more pronounced in the detail on the right. Creases appear wider in some places because the crease width is drawn without regard to the eye vector. The silhouettes are drawn by just increasing the glLineWidth attribute, and nearly disappear as bold creases are drawn over them when the model is closer.

Project References:

[1] Bruce Gooch, Peter-Pike J. Sloan, Amy Gooch, Peter Shirley and Richard Riesenfeld. Interactive Technical Illustration. Symp on Interactive 3D Graphics, 1999

[2] Ramesh Raskar. Hardware Support for Non-photorealistic Rendering. In Graphics Hardware, 2001

[3] Amy Gooch and Bruce Gooch and Peter Shirley and Elaine Cohen. A Non-photorealistic Lighting Model for Automatic Technical Illustration. ACM Siggraph '98 Conference Proceedings, 1998

[4] Alex Mohr, Erik Bakke, Andrew Gardner, Christopher Hennman, and Steve Dutcher. NPRQuake. At

[5] ID Software. Quake 1 Source Code. At

[6] Adrian Ilie. COMP 238 Final Project: Non-Photorealistic Rendering Techniques for a Game Engine. At

[7] Adam Lake, Carl Marshall, Mark Harris, and Marc Blackstein. Stylized rendering techniques for scalable real-time 3d animation. Proceedings of NPAR 2000, 13--20