Final Report

NON-PHOTOREALISTIC RENDERING——AN APPROACH BASED ON “TEAM FORTRESS 2” STYLE

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”

http://www.valvesoftware.com/publications/2007/NPAR07_IllustrativeRenderingInTeamFortress2.pdf

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 mixamo.com. 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.

Albedo

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

Results

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.

Project Proposal

Non-Photorealistic Rendering——An approach based on "Team Fortress 2" style

Yaohua Ma

Summary

Description: The problem I’m trying to solve is how to render characters in games with the non-photorealistic approach. As there are many styles and ways of NPR in games, I choose to focus on approaches mentioned in the paper “Illustrative Rendering in Team Fortress 2”.

link to the paper:

http://www.valvesoftware.com/publications/2007/NPAR07_IllustrativeRenderingInTeamFortress2.pdf

Importance: 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.

Previous work: Previous work on NPR includes silhouette detect and render, indication, brushstroke, Toon shading, XToon shading, and some PBR methods.

Proposal: What I'm going to do is to implement methods talked in the "Team Fortress 2" paper, and increase & decrease some of the contents. 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 the final, I hope to build up a project that users can adjust some of the parameters to change the visual effect and the overall style of the characters. If time allowed, I hope I can implement some PBR related methods to the system.

Originality: Since I will adjust the basic part talked in the paper, I think the final visual effects will be very different. Besides, PBR methods in real-time rendering is a kind of state of the art technique. If time allowed, I will figure out this part in the future report.

List of Goals

(due date)

11.17: Further paper reading and make the decision about how to implement, which tools and language. (settle details)

11.25: Paper Implement and system building

11.30: Silhouette and other artistic effects implementation.

12.10: PBR related methods.

12.12: Final report.

 

(link to the accompanying video of the paper) :