Pages

Monday, February 22, 2010

Squiggle Line Tutorial

It's been a while since I've had enough free time to do anything with my Otto & Schmitty characters. But some time back I posted a little snippet of a squiggle line test animation. Since I don't know when I'll have the time to pursue this idea further, I thought to myself- Gee, why not share how I did it and see if somebody else can do something cool with the technique? I really couldn't find a good reason not to, so here it is- a quick and dirty tutorial on how I came up with the toony 'boiling ink line' look in Maya.

First, animate your character. The trick- throw away all those fancy animated goodies you've fought so long and hard to learn how to do well. The secret to success in this approach is not technical fluidity and super fine detail work. Keep it simple. No Moving holds! Seriously. Lock those poses in flat. And don't worry too much about smooth f-curves or flowing motion. We're emulating a rougher style, remember? I found the less polished the curves the better the results. Oh, and I usually do this at 12 fps, not 24. So be sure to set your time settings appropriately. Here's a good example of what I mean.

And here's the f-curve editor just so you can see. There's nothing fancy in here at all. Just solid blocking basics, really. Poses, good breakdowns and maybe an ease if you think it's needed. Maybe.

Second, apply a non-realistic looking texture. I'm including a link to one I made here. This was an earlier, simpler version of what I finally ended up with for Otto & Schmitty, but it's enough to give you the basic idea. Again, we're not out to make it look real- so one of things I focused on was breaking up that nice, smooth gradient of light to dark that is very common in CG materials. A flatter appearance is key. Here's a quick snapshot of the hypershade node tree. My final one on Otto was actually even more complex. Who knew being simple would prove to be so complicated?

Once we have the color and the simple animation, let's put the secret ingredient- the wobbleDeformer. This is a plug-in deformer that you can download for free from CreativeCrash.net (formerly highend3d.com). What it does is simple- it wobbles your geometry over time. You'll need to go to your Windows > Preferences > Plug-Ins dialog to load the plug in. Once you have it loaded , select your geometry, go to Create Deformers > wobble Deformer. You should notice your geo gets warped some. Hit play or make a playBlast and you'll see the geometry wobble. (hence the name). The default settings are kinda mushy, so we'll push things a bit to roughen it up. Try bumping up the Frequency Scale and the Time Frequency for the wobble deformers attributes in the channel box. Also, if the deformer is making things wobble too much tone down the Space Frequency X, Y and Z and maybe the Strength, too. Here's a quick sample of the settings I used for this example....

OK, so it wobbles pretty good. But that's not enough. It needs some ink lines. So now what we want to do is add some ink lines to this. We'll use Maya's built in toon-line features. Select your mesh and add a paintFX toon line. Be sure to turn on Show Strokes in your Display menu so you can see them in your viewport. Here's a quick render of what the toon line looks like right out of the box....

Meh. The typical CG curse of perfection. We can't accept the toon ink line “as is”. We need to break the line up. Let's push it some. The primary issues are that the line thickness is too thin and too even. Fixing the thickness is easy. Just select the pfxToon object in your Outliner, then adjust the Line Width attribute in the channel box. Pick something that looks good. There's no magic number really.

Fixing the uniformity of the thickness is a bit trickier. For this we'll use a 2d Noise texture and pipe it into the LineWidthMap attribute. In your Hypergraph make a new 2d Noise texture and then connect it's outAlpha to the LineWidthMap of your pfxToon using the Connection Editor. (I'm not walking you step by step through that process- I'm assuming you know how to do these things. They're pretty basic.) Anyhow, the default Noise is a good start, but we can adjust the settings to get the best effect. A good example would be what I did for Schmitty...

Here's how that looks.

Better, but still not what we want. The thickness is non-uniform alright, but it doesn't change over time. So what I do is animate the Implode attribute on the Noise texture. I use a 4 or 5 frame cycle animation on it. Vary the settings from roughly -0.5 to 0.5. By doing this the Implode value will cycle for as long as your animation is and you'll get good results. Feel free to make the cycle have more frames in it, but 5 is a decent start. Here's how that looks...

Much better. But one obstacle remains. CG is really good at keeping perfect forms. The object is wobbling and the line thickness is changing, but the line is stuck right to the edge silhouette of the geometry. If we can get the line off the geometry that'd be pretty cool. Easy enough- just do the same Noise texture trick on the Line Offset Map attribute and set the Line Offset attribute to something noticeable. Make another Noise texture (or duplicate your other one), adjust it's settings to be different, animate its Implode values on a cycle and connect its outAlpha to the Line Offset Map attribute on the pfxToonShape. Here's the result....

Pretty cool- and that's pretty much all there is to it. There are other variations you can play around with. You could put the pfxToon on a duplicate object that has a slightly different wobble deformer setting on it but has its primary visibility disabled so all that renders is the toon line. This way the the color geometry and the ink lines aren't wobbling at the same frequency or amount, further adding some random organic-ness to the thing. And you can put more than one pfxToon on the object, too. With that approach you get the effect of multiple ink lines of varying transparencies and thicknesses and noise- maybe to emulate rough pencil lines. You can also put a noise texture on your color shader and animate that to break up the shading on the main part of the geometry. I'll let you and your imagination figure out ways to expand the concept. Here's a quick example of multiple ink lines and the hidden duplicate object technique...

Lastly, you can download the Maya 2009 files for you to mess with (here and here). Just remember- you'll need the Wobble Deformer installed for these to work properly.

25 comments:

YES! Thank you Keith! I've been waiting to see this. Only wish it was sooner because I was trying to do my thesis in this/ a similar style and all my attempts were not as good, and it's too late to implement.

Interesting-- I had played with some ways to jitter lines before, but it never occurred to me to jiggle the geometry itself. The only thing that bothers me with this is that it doesn't seem possible to get the lines in front of the shader so that you in effect "color outside the lines." I'm doing some tests, and as far as I can tell you have to use render layers to get that...

@Jason:Yeah, the only way to get the 'color outside the lines' look is to use render layers and then comp the results in something like After Effects. For my earlier Schmitty tests that's what i did. Just another variation, really. I decided for the sake of this tutorial to keep it all simple.

You really are the best dude. This and your new Cartoon VTS series are so unique and amazing. You are pioneering a new genre in a way. And the fact you find time to keep helping humans with your new job etc.

Thanks a huge amount for sharing Keith, absolutely great. I was attempting to follow another technique previously, but your tutorial was much easier to follow and has the exact effect I was looking for! Brilliant.

Thanks for posting this Keith. I saw your test, and it's the kind of look I"m thinking about for my next film. I had every intention of pestering you about how you did it when the time came - you just saved yourself from an email barrage! :0)

Finally got around to trying this out for myself. Thanks for the wonderful inspiration and for sharing your techniques with us Keith, I've really learned a lot from this process that i had no idea about before.

finally..for a long time I'm looking for this "dirty" looking and now you showme the "light".thanks man.I'm try to upload this shader tree you post and warning massege,can you upload't agein or only explain't shortly.thank