Node Cel-Shading

OK, I’m pretty sure somebody has posted this before, but here is my version of some cel-shading using Nodes.

This was a bit more complex, but it seems that they made some fixes to Blender, so the ramp settings work as they should, both in perspective and orthographic mode.

Dot product of the view and normal of the geometry goes into the Factor for the Color Ramp, which gets multiplied with the diffuse color and multiplied by the actual color of the material. This should allow you to use textures and lighting models (e.g. Lamber, Toon, Fresnel, etc) as usual, but have the cel-shading effect on top, so to speak. This means that the cel shading effect itself should probably just be black and white, or gray scale so as not to intefere with the “actual” material (though the example does have yellow coloring to show the highlights).

MaterialCelShadeDynamicFixed.blend (540 KB)


good stuff :slight_smile:

Thanks. It doesn’t really work with orthagonal view (only for perspective). To do orthagonal, take out the view multiplication, I believe.

Wow thats cool, thanx for sharing

Thanks, aone. The reason I made this is that the normal GLSL ramp commands only affect around 30% of the whole mesh. I wanted a higher level of fidelity, so this is what I came up with.

and how can I aply this on a game? cos i press p to start the game and I don’t see the cell shading but on render…

You don’t see the shading in-game? It should work. Perhaps you don’t have a GLSL capable graphics card.

you can apply nodes to the game engine! how?

Well, you select the Node editor option for the material (it’s the little button next to the material browser; it looks like two nodes) , and then edit the nodes as you need to. What you output in the node editor will show up on the character. It’s pretty nice. you don’t have a GLSL capable graphics card.

I am getting a black ball, is it work with the current blender build?

It seems that they fixed some bugs, so I went and updated it. It’s working for me now in the current-ish build (re-download the blend file).