Final Report


By Yaohua Ma

Problem Summary

The problem I’m dealing with is the NPR non-photorealistic rendering problem.  I want to write stylish shaders for characters in games to render in real-time engines. As there are many styles and methods in this area, I chose to implement the method based on the paper  “Illustrative Rendering in Team Fortress 2”.  NPR techniques are interesting and always produce beautiful visual effects. Artists do lots of work and draw many details to show a particular artistic style. If engineers can come up with approaches that generate unified visual effects, that will greatly reduce artist’s workload and reduce time. That’s why this technique is important.

Previous Work

Previous work on NPR includes silhouette detect and render, indication, brushstroke, Toon shading, XToon shading, and some PBR methods. As for the paper “Illustrative Rendering in Team Fortress 2”

the paper talked about the artistic style and work done in the game TF2. As a game, the final visual effect was reached by the work of artists and engineers. I will mainly focus on the engineers’ part in this paper. 

The TF2 group implemented the diffuse part using this function:

w indicates the warping function for the diffuse part, I will talk about it in below. a indicates the ambient part and k indicates the albedo. I used this function to reach an effect in picture (e). I replaced the specular and rim lighting with silhouette.

Description of Work

I used Unity with CG shader language to implement the visual effects.  I downloaded a character model from At the same time, I found that the texture map from the original model has lots of details and it seems like the texture map is baked with the specular term. In order to get a clear result of this method, I remove lots of details from the texture map and replace the shading part with uniform color. The picture below shows the albedo of the original character.


I used the formula written in the paper to calculate the diffuse part. There are two interesting things about this formula. The first one is the half lambert. Instead of the conventional diffuse formula, they also applied scale, bias, and exponentiation to the n-dot-L part in order to get a better control at this part. Because they use 0.5 as the number of the scale and bias so they called this method as half lambert. The other one is the warping function. This is used to retain the shading information conveyed by the Half Lambert term and introducing the dramatic terminator observed in commercial illustration. Instead of the sharp line between the light and shade parts in most toon shadings, this method gives a smooth transition. The picture below shows the diffuse part using this warping function.

Warped Diffuse

Then I applied the ambient term(adjustable constant) and the diffuse term with the Abldedo.  As shown below.

Albedo+Ambient+Warped Diffuse


In the end, I implemented the Albedo+Diffuse+Ambient+Silhouette parts. The pictures below showed the character with different silhouette settings. As for the silhouette part, I used the front face culling and enlarge method.

Black silhouette

Blue silhouette

Orange silhouette

Analysis of Work

New results: Although I followed the method talked in the paper, I didn’t follow every detail. The paper used the specular term and rim lighting to give a better illustration on the edge and shape of the character. I used the silhouette to enhanced the visual effect. The visual effect of the character is quite different from the original one.

Meeting Goals: In the project proposal, I noticed that “I will increase & decrease some of the contents of the paper. For example, the paper now including shading components of Albedo, diffuse part, ambient part, specular part and rim lighting. All of these components making the characters really 3D and solid. I will adjust and reduce some of the components to make it look less 3D and introduce silhouette to the shading approach.” In this criteria, I think I met the basic goal wrote in the project proposal.

Future Work: I mentioned the PBR method in the project proposal. If I can carry on with this topic I will do more research on this aspect. Anisotropic materials like cloth and metals will give different visual effect in PBR system and this is really worth a trying. On the other hands, auto-generate brush strokes will increase the NPR style greatly. Previous work including some sketch patches and watercolor strokes. Generate strokes toward a specific hand drawing style will be very interesting.


电子邮件地址不会被公开。 必填项已用*标注