Friday, May 9, 2008

Final Post

Final Report can be found here

Monday, May 5, 2008

Final Post



Overview of Application:

Features highlights:
- load different obj models
- camera position control
- light position control
- different pencil textures
- paper textures
- Color overlay
- texture shaking (see "torture bunny" section in video)

During preprocessing:
Generate paper normal using noise function, pencil textures, paper textures, load obj model, calculate minimum & maximum curvature of model.

During runtime process:
There are a total of 3 passes:

In the first pass, the model's normal & depth is computed and stored in a 2D texture.

In the second pass, normal/depth texture and a min/max curvature texture is used to calculate the appropriate rotation angles to transform texture coordinates for 3-way blending. We also adjust brightness to emphasize contrast between the pencil strokes.

In the third pass, using normal & depth information from first pass, apply Sobel filter to do edge detection in order to achieve contour of model. Blend with interior texture from 2nd pass. Further blend this result with the paper texture to achieve the effect of a pencil drawing drawn on textured paper.

Frame Rate:
The frame rate is real time (20-30+) for most models but sub-real time (10-20) for very large models (~40,000 polygons). Our overall frame rate may be slowed down by the large 2D textures we are using for the pencil textures (instead of 3D textures, which are much more complicated to built). We also have some if-statements & while loops that could be slowing down our frame rate.

Thursday, May 1, 2008

New progress

Result of trial and error. By accident, we generate some cool images.
pop-artBoxy
Paint-Effect
Charcoal
after 3-way blending, with only one intensity level
Current Problem:
1. Cannot set up geometry shader, missing support for extensions, "GL_NV_gpu_program4" and "GL_ARB_texture_float", we instead use the multi-texture method suggested by the author. 3-way blending looks fine, the interior lines look kind of continuous.
2. Instead of using 3d-texture (we don't know how to set up in openGL and CG), we are using very large 2d-texture (with different intensity textures all laid out on one 2d-texture). The problem is we couldn't pass a texture with size larger than 1000 x 1000 into the program.
Future work:
Incorporate light intensity difference into the texture mapping. Give the model more 3-dimensional look. Create more pencil textures and move the preprocessing part out. Give user mouse control.