Download the full procedural methods project here. The other parts of the project are the turtle graphics and L-systems and the additive terrain faulting.
Real-time pencil rendering
In their 2006 paper Lee, Kwon and Lee developed a set of real-time techniques for rendering 3D meshes in a pencil drawing style, complete with shading. You can see an example on the right. Their method involves several stages, the most complicated of which being the generation and mapping of pencil shading textures. In section 4 Contour Drawing (page 3) they describe a technique for rendering the edges of shapes. I decided to implement a version of this as a post-processing effect. |
Below is a photo of a bicycle. On the right is the photo with the pencil rendering effect applied. The frequency and amplitude of the waves distorting the planes can be manipulated in real time, as shown in the video.
Since the turtle drawing is very fine and consists entirely of edges, the edge detection algorithm tends to solidify it and ruin the pencil effect. To combat this the edge detection post processing is disabled when the camera is at the specific position and orientation for viewing the turtle graphics. The pencil post processing is always enabled (when post processing is enabled). This means that when looking at the turtle graphics with post processing enabled there is a very clear demonstration of the pencil effect, and while flying around the terrain there is a nice combination of edge detection and the pencil effect, so that it looks like a sketch of the terrain.