Cycles Toon Shader Enhancements

hello dear Blenderheads,

ignorant in vector math, i’m doing my best at obtaining a better toon effect with cycles

i’ve setup a node network that gives good results, but i use a Normal node to “light” the object, instead than the lights in the scene and this is quite limiting:

the problematic part is the leftmost frame, i actually am not sure about what i’m doing in there, i would like to take into account the scene lighting instead than my normal nodes, any idea?

as a bonus i added a “Fresnel Backlight” effect, inspired from Mario Galaxy

have a nice weekend!

Check this thread :slight_smile: Scroll down till you see OSL+Solidify :slight_smile:

Thank you Jamie,

the OSL solution is quite good, but a ramp would be much more intuitive and the transitions in this shader are not perfectly controllable, nor the final colors