Toon Shader + Freestyle

I have been working on a more flexible cel-shading toon shader for Blender.  I have come up with a solution I feel is intuitive and good for live [GLSL] adjusting.  I will eventually learn how to use drivers to make this even MORE efficient for production–that way you do not have to go to another window to adjust things. This is a simple 2-toned shader with optional specular highlight.  The material requires only 1 sun-lamp to function

properly, although works well with other lights just the same. I simply use a white light with power of 1. It is easy to setup another light if you want finer control of the specular, but this seems generally adequate.

Here is the Suzanne:

[EDIT--]

Rendertime: 5.08s @ 1024x1024px

[/EDIT]

The .blend of the node setup here:  Suzanne_Toon_FS

 

And here is a RANDOM Blendswap file:

Credit: Christian– http://www.blendswap.com/3D-models/weapons/sci-fi-granade-launcher/

This file had a very simple texture applied for which I had to adjust some things in the material nodes. The Toon_Freestyle .blend here: Grenade Launcher

[EDIT--]

Rendertime: 3.86s @ 720x512px

[/EDIT]

Same CC0 by me, credit the model if you use it.

  • http://fossgrafis.com/ Aditia

    awesome, your post persuade me to delve deeper in this toon shader + freestyle thing in blender, thanks Lee

  • Light

    All the other shaders can emulate toon shader. I have tried all of them. Just use node material with ramp or ramps then combine to output. Optional are camera data and lighting nodes. But depend on what you need for the shot.

  • http://jikz.net jikz

    Light is right. I played with ALL shaders, this comes down to ramps with mat nodes. The tricky part is incorporating shadeless texture images, i had to search HIGH and low for the fix….it had to do with MIP map, whatever that is [need more research]. Update of sorts–I have a great node setup which includes an optional backlight which is STILL dependent on the one lamp object. This benefits usability–the size is adjustable but still static in relation to the lamp.

  • hikari

    how can I change the color of suzanne in your blend file?

  • jikz

    http://www.pasteall.org/pic/32201

    In the material nodes window.