View Full Version : maya toon shading?

04 April 2003, 07:03 PM
I made this simple toon shader using ramp shaders in 4.5, but how do I make it so the specular highlight faces the light and not the camera?

metal me solid
04 April 2003, 07:04 PM
[20:28] <Array[Mod]>
[20:29] <Metalmesolid> yea boss
[20:29] <Metalmesolid> boss!!!
[20:29] <Metalmesolid> THAT IS AWSOME!!!!!

04 April 2003, 07:43 PM
mmm ... what is it agine? I Don't understand! :D

04 April 2003, 07:49 PM
it's a toon shader using maya's shader network :D

04 April 2003, 08:13 PM
Hey Array,

what method are you using for this?

I was playing a bit with toon shaders in maya too the other day.

Of course mine uses facing ratio and doesn't deal well with unbevelled edges. So I'm basically interested in whatever methods other people use to do it.


04 April 2003, 08:44 PM
hmmm....ok I talked to Carina on irc and she helped me get this far. Does anyone know how I can get the effect of this image while still preserving the strong object outline of the first?

04 April 2003, 08:58 PM
Well basically there are different methods for the outlines.. but it gets quite glaringly obvious most of the simple ones have flaws..

One of the simplest way to do it is using facing ratio, that is you use a sampler info node, and then you kind of chuck in a condition node which will output pure black if the facing ratio is less than so and so much.

The problem with this is as mentioned before that unbevelled edges don't get outlined..

Others focus on edge detection, but to be honest I don't really know how to work these..

There are more advanced ways as well, but again, I don't know how to work them.

04 April 2003, 12:42 PM
a good ressource for NPR research papers is at

04 April 2003, 02:39 PM
hey fango, that's a very cool site.

*will be doing some reading*

04 April 2003, 07:00 PM
Hey Array, happy B-day man...!

Not that this is helpful in your shading group question, but another trick I picked up for toon shading was to:

-Duplicate the object to be TOONED and scale it up a bit. (Use the connection editor to tie the objects' shape nodes if its a deformable object/character)
-Open the attribute editor and turn off double sided.
-Invert the object, so all the normals are reversed.
-Give the duplicated object a solid black material.

Basically, any time the duplicated objects normals go byond 90 degrees to the camrea, its invisible, the rest of its a solid black line. Its the poor man's Sampler info.

I know this isn't really related to what you're trying to do, but if ever you need a toon solution and the shaders aren't doing it for you, this hack way works great.

Kudos to Matt Doell for his toon solutions.

Mike R

CGTalk Moderation
01 January 2006, 11:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.