COMP-767 - Winter 2005
Advanced Topics in Graphics
Non-Photorealistic Rendering
Prof. Allison Klein

By Dmytro Prykhodko
and Leonid Gaiazov

 
Introduction
Our project is to implement Real Time Non-Photorealistic Rendering System with Multiple Styles. It will use a high level shading language, such as HLSL. This shading language allows us to create fragments of code that can be executed by modern GPU, instead of the CPU - which yields much better control and performance. We will refer to these code fragments as shaders. These shaders will be applied to 3D scene to produce an interactive non-photorealistic animation. Different object in a scene can be rendered with a style determined by a different shader. We will use Microsoft DirectX technology to implement this project. The project will be coded in C++ and HLSL. We will attempt to use object oriented design techniques to make a reusable code for the future work.
 
Goal
The goal of our project is to implement a set of NPR shaders and a real time viewer. We will concentrate on implementation of different style shaders such as toon shader, hatching, silhouettes, etc. Also, we will implement a viewer for testing and viewing animations. Ideally, we would like to create a scene that will demonstrate all implemented styles and techniques using a scene script.
 
Tasks
Shaders
# Description Status
1 Toon Shader Done (2/05)
2 Toon Shader with different grading Done (2/05)
3 Hatching Done (2/13)
4 Depth buffer Done (2/14)
5 Billboarding using vertex shader Done (2/20)
6 Loading and drawing tree foilage with alpha blending Done (2/24)
7 Normal Mapping and multiple render passes using render targets Done (3/01)
8 Sobel Filtering to find edges Done (3/11)
9 Compositing pass and edges for the trunk Done (3/15)
10 Different lighting model (Gooch?) Done (4/7)
11 Sorting to improve speed Done (3/25)
12 Distorting edges for handrawn look N/A
Viewer
# Description Status
1 Load and display one object Done (2/14)
2 Manually change camera view Done (2/20)
3 Style selection for an object Done (2/14)
4 Scene loader Done (2/21)
5 GUI changes Done (3/10)
5 Animation script loader Done (3/25)
6 Demo scene Done (4/7)
7 Editor features N/A
 
Progress
February 14, 2005 - Despite the lover's day, we made a good progress and took some snapshots.
Toon Shader Toon Shader
with different grading
   
Hatching Depth buffer
(will be used for silhouettes)
 
February 15, 2005 - Uploaded cool demo movies for presentation (in .exe format):
toon.exe ~6Mb
hatch.exe ~10Mb
 
February 16, 2005 - Realized and satisfied the need for CALLBACK's in the viewer. Performance is up!
 
February 21, 2005 - Scene loader is done. Also, we can change the view plane and light direction manually.

 

March 17, 2005 - Despite St. Patrick's day, we made a good progress and took some snapshots (once again!)

Trunk with regular shading Trunk with normal mapping
and smooth shading
Trunk with normal mapping
and toon shading
 
Billboards after alpha mapping Depth buffer for foilage and
normal information for the trunk
Applying Sobel filter gives us edges,
but kills framerate.



Trunk with normal mapping and toon shading + Compositing edges (Sobel filter) and normal rendring gives us trees.

The gui had some minor changes as well

And finally, a short video!

tree.exe ~3.5Mb
 
April 7, 2005 - Final Presentation

Today in class we will have the last presentation of our project. We will show a live demo of our system. All of the features that we planned were implemented. Noticeably, we added several effects since the last presentation, most notably we added image-space effects, a different lighting model and a rich script system.

Some nice final pictures, demonstrating a new lighting model that uses 2 base colors - cool and warm colors. By adjusting the colors, we can get completely different mood in the scene.



As you can see from these images, there are several image-space effects that we used. Here you can see the pipeline used for the image space effects. Its a bit complicated, but the speed of image space shaders doesnt depend on the actual scene, it only depends on the resolution of image being rendered. For gaussian blur, we use an image buffer of 1/4th size - this speeds it up dramatically and also results in larger blur, thanks to billinear filtering. The downside is that the blur is a little bit noisy, but it actually looks a bit artistic. Since we used shader model 2, which limits to 16 texture samplings per pixel, we had to use gaussian of size 15 which means our radius is 7 pixels. However, combined with 1/4th buffer size, it results in total radius of 28, which is sufficient. A common trick of blurring in 2 directions was used as well.


Another addition is the new shader for the ground. Its an improvised shader that uses BOTH real time hatching and cool/warm colors to achieve nice effect. For hatching, we used Tonal Art Maps.

 
April 13, 2005 - Final report is here!