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.
No comments:
Post a Comment