Jump to content
peliosis

Toon Ink Shader Possible?

Recommended Posts

I'm in heavy need for toon ink shader, just like xsi's toon ink or vray toon or max ink'n paint or at last good not flickering wren. Nothing fancy.

Is it possible to create such thing using vex? I don't know but probably not since vex operates on points only?

How one could start with planning such shader?

I never wrote anything apart from vb or jscripts for xsi, but I need a simple toon ink for work, so I'd like to know if it is possible to write one not being a C++ guru and if yes, where to begin.

Perhaps this kind of shader is already present somwhere.

Wren is nice but have NO options and flickers.

Thanks

Share this post


Link to post
Share on other sites

Do a search - I think there are quite a few resources both on odforce and out there in the wild. I suppose this would make a good wiki page.. hmm - anyone?

Also, don't forget that you can use SOPs to do some interesting things. Check out HK Toon for ideas.

http://odforce.net/codex/index.php?sec=rendering

Share this post


Link to post
Share on other sites
Do a search - I think there are quite a few resources both on odforce and out there in the wild. I suppose this would make a good wiki page.. hmm - anyone?

Also, don't forget that you can use SOPs to do some interesting things. Check out HK Toon for ideas.

http://odforce.net/codex/index.php?sec=rendering

23806[/snapback]

HK toon is great, I looked it through and back. Clear and simple idea, shader side has many advantages though.

I did some research and found your Escher style renderings :) amongst other, but nothing really of what I searched, I'll go on but thought somebody has some experience in this so trivial subject.

Share this post


Link to post
Share on other sites

If you look in the Advanced Renderman book you'll find plenty of info on this. Basically you render various passes like normals and constant shaders of different colors for each object then do a trace in cops. Add to this something like the two tone shader (there a vop for it) and comp the results together.

That's the basics.

You can also do things like clamping an edgefalloff function. I think there is a vop for edgefalloff, using this method you don't get consistent line widths but sometimes that is nicer as it looks more stroke like.

After that it's all about how you set up your geometry so that you create edges where you want them.

Easy enough. I know what you mean about Wren it's terrible.

Share this post


Link to post
Share on other sites

I think Jens had a nice in-view solution for this where he'd inflate the object a bit, colour it black and push it back along the viewing vector a wee bit to get the ink outline.

Jens?

Share this post


Link to post
Share on other sites

I know about walkarounds but I want a shader, for fast result.

In Advanced renderman there is an example of edge drawing based on color difference.

Perahps it'd be possible in vops to turn normal colours to edges?

Maybe after some color correction we'd have internal lines also.

"If contrast differnce exceeds some value draw a point"

Argh... too many of things to try :angry:

Share this post


Link to post
Share on other sites

Actually - I got it wrong. Apparently it's more about inflating the object, reversing it, colouring it black and removing backfacing polys. It was a realtime game engine trick so it won't handle a lot of stuff but has a good effect.

Share this post


Link to post
Share on other sites
Did you want something like this ?

23918[/snapback]

Cute character, Sven!

Share this post


Link to post
Share on other sites

The Character is not made by me . Christopher Desse has made him ( you can download this one and a lot more in the same style on cgtalk ) .

Sven

Share this post


Link to post
Share on other sites

Thank you very much, Simon this shader is very close but fails on hardedged geometry which is my main concern.

I need something like wren but with more options, or exactly like xsi or vray toon or many others.

Even simple: draw a line whenever angle between primitives exceeds certain value (or primitives intersect), alter it's width based on distance from camera. Add a silhouette and a few more options.

It doesn't look easy. perhaps I should make it in post but thats not very clean and introduces further problems.

Share this post


Link to post
Share on other sites
<snip> I'll go on but thought somebody has some experience in this so trivial subject.

23829[/snapback]

Everything is trivial when someone does it for you :)

Simplest solution (that doesn't involve some coding): Create the outlines in one of the other packages that have what you want, then comp it in with whatever you generate in Houdini.

Share this post


Link to post
Share on other sites
Everything is trivial when someone does it for you :)

True, but with houdini it's a bit different. How could I know to put "id ID vector" (as in Simons example) to deep raster params when it's not even included in the drop down menu.

There are many attributes not mentioned anywhere apart from occasionaly.

There are lot's of well hidden gotchas in this software.

Thanks

Share this post


Link to post
Share on other sites
How could I know to put "id ID vector" (as in Simons example) to deep raster params when it's not even included in the drop down menu.

23982[/snapback]

The helpcard in the Mantra ROP says:

Variable name: The name of the global VEX variable (or export parameter) to use as the value of the plane.

It's "id" because that's the name of the parameter that he gave to his shader.

For the next parameter, the helpcard says:

File/plane name: The name of the plane to create. For file formats capable of storing deep rasters (Houdini .pic), this is the name of the plane. For "flat" file formats, this is the name of the image file to save the plane data into.

It's "ID" because that's the the arbitrary plane name that then gets output to COPs.

The next parameter the helpcard says:

Variable type: The data type of the VEX variable.

It's "vector" because that's the type Simon put for his variable.

Hope this helps.

Share this post


Link to post
Share on other sites

Here is that other way of geometry edges - that game trick. I neglected to mention that you have to turn on Remove Backfaces not in the Object's Shading tab, but in the Display Options > Optimization tab.

Anyhow, try this out. You can also render this with Mantra and get a similar effect.

realtime_geometry_outline.zip

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×