Toon Shader

Post Fx number 3! A toon shader!

Started this one off by grabbing the diffuse colour of the scene.

1

I then divided the post process output by it to get only the lighting.

2

Clamping that and taking the r channel gave me the lighting in black and white.

3

I used this as the uv input for a texture. At first, I used a simple texture with black at the tottom and white at the top, which made the shadows black and the highlights white.

4

Multiplying this with the diffuse gave us a shadow overlay.

5

Changing the texture’s tiling type and filter to clamp and nearest neighbor brought me closer to the toon look I was after.

89

But the effect was much too dark, so I multiplied the lighting output by 3 to make it lighter.

10

I combined it with the edge detection I setup in the last blog post and played around with brightness.

1215

In the end I settled on this.

14

I wasn’t happy with the weird fuziness I was getting on the edges though. This was to do with the normal map, so I removed the normal map from the wall to get this.

highresscreenshot00005

There’s clearly something funky going on with the normals for the wall, but I’ve left it for now.

Here’s some final shots!

highresscreenshot00004highresscreenshot00007highresscreenshot00003highresscreenshot00006highresscreenshot00002highresscreenshot00005highresscreenshot00004

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s