For this assignment, write an OpenGL program that can display a 3-D object
in various non-photorealistic styles, in real-time.
Also turn in animation created with this program.
You are to work individually on this assignment.
Tips
The following are tips, not requirements.
-
There's no starter code for this assignment.
You could work from your assignment 2 code, perhaps.
-
It's OK if your program synthesizes geometry (e.g. subdivision surface,
fractal, ...).
-
Silhouette edges can be found in (at least) two ways:
(1) 2-D post-process on image, looking for depth discontinuities,
or (2) check all polygon edges to see if one adjacent face is front-facing
while the other is backfacing, or if it's a boundary edge (only one adjacent
face).
The latter method is probably faster.
If using that approach, make sure your silhouette edges are drawn
into the z-buffer so they're properly occluded by surfaces in front.
You'll probably want to use glPolygonOffset().
-
Pointillist effects can be done in (at least) two ways:
(1) 2-D post-process, where brushstrokes are (more or less) stationary with
respect to screen space,
or (2) drawing brushstrokes in 3-D as z-buffered splats or sprites.
With either method, each brushstroke can be a square (ugly -- points off),
circle, or any other shape, perhaps drawn with a soft matte.
It could even be a photograph or sketch of a single brushstroke.
You'll have to experiment with point placement to tune brush size and
number to avoid excessive gaps or overlaps.
-
For better temporal coherence:
if your pointillist method uses random numbers, you can make them
repeatable by, for example, using vertex numbers or edge numbers and
hashing them into an integer that is then used to look up an array
of psuedo-random numbers.
-
If generating animation by hand (rotate object, save image, repeat)
the resulting motion can be very
jerky unless you're very smooth and consistent over time.
To reduce this problem, you could make your interactive controls affect
not the value of parameters (rotation angle, translation, ...) but their
first derivatives. That way, the camera/rotation changes will have
momentum, and things will continue to move linearly unless you change
the settings.
Non-Photorealistic Rendering Examples
We suggest you look at the pictures at the following web sites for
visual inspiration or for optimization tips.
Reading the papers below in full is not necessary to do this assignment,
but you might find them interesting.
-
Ramesh Raskar's silhouette edges,
nice images
-
Real-Time Hatching,
Emil Praun, Hugues Hoppe, Matthew Webb, Adam Finkelstein,
SIGGRAPH '01.
Hatching (parallel lines for shading) in real time,
using texture mapping.
-
Illustrating smooth surfaces,
Aaron Hertzmann,
Denis Zorin,
SIGGRAPH '00.
We recommend this paper for its short section on fast (sublinear)
computation of silhouette edges on a polygon model.
That is, it's not necessary to visit all edges in order to find the
silhouette edges!
Note that use of the simple, linear-time algorithm is probably
good enough for this assignment, however.
Paper also describes a slow but good algorithm for cross-hatching.
-
Pointillism carried to its extreme: polka dot style.
A blobby model
(PS)
by Paul Heckbert and Andy Witkin, SIGGRAPH '94.
-
Video Gogh image processing software
from RE:Vision Effects
Traditional Paintings
-
Paintings.
See, e.g. Impressionism.
You might want to check out the artists Seurat, Signac, Monet, and Van Gogh.
-
Go to the
Light
exhibit currently on display at the Carnegie Museum of Art
down Forbes Ave.
(see
announcement on 463 web page)
Grading Criteria
Out of 12 points:
-
4 points: cartoon style (we'll check for speed & image quality)
-
4 points: pointillist style (ditto)
-
4 points: nice animation
Extra credit for real-time
-
halftoning (use OpenGL stencil buffer?)
-
hatching
-
Kandinsky, Mondrian, or Matisse, ...
-
photomosaics.
This is just a variation on the pointillist idea above
where small pictures are used as brushstrokes, and a picture is found whose
desired color (and frequency content?) matches that desired.
You could scour the web to collect a few thousand pictures.
A few sources for images:
ditto.com ,
astronomy pic of day ,
Yahoo picture gallery ,
Getty Museum ,
Photo Bank ,
-
interactive placement of brushstrokes using cursor
-
other cool ideas
Change log:
16 Apr. 2001: revision 1
18 Apr. 2001: minor clarifications & photo source list added
15-463, Computer Graphics 2
Paul Heckbert