View Full Version : NPR a go-go!
Wigaru Wiyamoto 09-17-2002, 06:11 AM I've been interested in getting a good toon/NPR shader in Maya without using any plugins. I've seen a lot of shaders on highend3d and other places, and of all them Yinako Minako's (http://www.3dtotal.com/ffa/tutorials/maya/non_photo_realistic_shading/realistic_shading.asp) is my favorite. The shading network is VERY simple and easy to understand.
However, all of the shaders I've seen have a common problem, the "ink" outline. The quality of the line varies wildly, thin one second, very thick the next. This makes these shaders unsuitable for animating. Here's (http://stu.aii.edu/~vtp361/toon.avi) a short divx5 test I made. It looks fine until you get up close to the hand and move the angle.
So here's the question, without using a plugin is it possible to get consistant quality of line?
|
|
MaDSheeP
09-17-2002, 12:28 PM
i'm not sure about the whole line issue, but Maya 4.5 now comes with a 'Ramp Shader', essentially a Toon/Cell shader...
heres a link to how it works =)
http://www.aliaswavefront.com/en/products/maya/complete/movies/rampshader.shtml
playmesumch00ns
09-17-2002, 02:46 PM
The problem with the thick/thin line is caused by the way most "toon" shaders fake it.
They work on the observation that the silhouette of a surface coincides with the point at which the surface normal (projected to camera space) hits 90 degrees. This works OK for spheres but breaks down on almost every other shape. Some 'researchers' in NPR even had the cheek to claim that this was a desired effect and called it "charcoal rendering".
It's actually not very hard to write a shader to do what you want, i.e. get a line of consistent (and controllable) width, at least not in Slim. Since what you want to do is effectively a 2.5D process (you're drawing the outline in 2D, not in 3D, but using 3D information), you need to do it in post. If you get hold of a RenderMan-compliant renderer such as BMRT you attach a shader called NiZID to your objects and then use the resulting information to draw your outlines in Shake or whatever.
I am in the process of writing a non-photorealistic renderer at the moment. Which will handle toon-shading (along similar lines to Yinako Minako's method, but with fully controllable line drawing). However, unless someone nice (and technically minded) replies to my other post about the Maya API, it may well be a RenderMan prog.
Be sure I'll post updates on my work as it progresses, but it could be several months before I get a finished version out!
oops, seem to have rambled a bit there. To answer your original question in short, no, it's not possible to get a consistent quality of line without a plugin as it's a render-time effect, not a shader effect.
Wigaru Wiyamoto
09-17-2002, 07:25 PM
I wasn't aware of the ramp shader. That should be fun to play around with.
Good luck on that project playmesumch00ns, I hope you get the help you need so you can do it in Maya. :thumbsup:
beaker
09-18-2002, 08:42 AM
playmesumch00ns mentioned the Nzid shader in renderman. Well some guy wrote a similar free plugin for maya called "XMB Cartoon Tool Set v1.1" that is based off that same thing. It uses and external tracer for the lines.
You can download it off highend3d:
http://www.highend3d.com/maya/plugins/?group=mayaplugins§ion=rendering
CGTalk Moderation
01-13-2006, 04: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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.