Sorry for the absence. No excuses....so let's get to it. This one was requested a
little bit ago. The dynamic phone cord. There's a really good tutorial on Highend3d for
this one, and it's quite similar, but that's because the end result is the same and in
Maya there's then ways to model a skinned cat. Mush!
First, we need some geometry. I just happen to have, handy, a phone and handset modeled.
How convenient, eh? First off we need to draw a curve. After that curve is drawn, do
a Edit Curves->Rebuild Curve. Reset the tool and set the spans to a nicely spaced
number. For my cord it's 10 spans, but your curve may be longer or shorter and you
should adjust that value to a suitable amount. Just don't want the spans too far or too
close to each other.
Next, Hair->Make Selected Curves Dynamic. We go from having Curve1 to having:
Select follicle1 and set Point Lock to NoAttach. This determines which end Maya holds
when a simulation is run. To facilitate control, we're telling Maya to let go of the
curve completely. If you hit play, the curve will fall forever into the distance. This
is no good, of course, so we're gonna make two constraints. select curve1 (in the
outliner is easiest), right click and choose the first CV. Hitup Hair->Create
Constraint->Transform. You'll see a small locator-esque item appear. That's the
constraint handle, Do the same thing to the opposite end. Parent the constraints to
their respective geometry.
For now, I prefer to set Stiffness on hairSystem1 to 0 and crank the Gravity to 9.8.
Also, turn on Self Collide. This makes a simulation run quickly so I can see if it's even
working up to this point. Before you hit play, though, make sure that you're playing
Every Frame....check your Animation Preferences. Each frame of the simulation depends on
the results of the previous frame and if you play at a frame rate, but your computer
can't keep up Maya will skip frames and this could cause errors and flub-ups in the
simulation.
At the moment all we have is a dynamic curve. Looks noting like a phone cord. Let's add
a paint effects stroke to it by selecting Hair->Assign PaintFX Brush to Hair (need to
have the hairsystem1 selected for this). You won't see any results in the 3D view, but
Maya will birth pfxHair1 in the outliner. Keeping that selected, goto
Modify->Convert->Paint Effects to Polygons.
Again, you're not going to see much change except the new brush2MeshGroup and it's child
brush. Here's where we affect changes to make this mess look like a phone cord.
Select the Brush by selecting pfxHair1 and in the Attributes Editor, selecting the brush2
tab. Set the Global Scale to 1.
Now select hairSystem1 and expand the Clump and Hair Shape group. Some major changes
here, so I'll list them for easier reading.
Hairs per clump = 1 (only want one cord)
Subsegments = 10 (good to match the spans you rebuilt the curve prior)
Clump Width = 1
Hair Width = 1.5 (Global scale x Hair Width = what you see)
In the ranged areas, hit the little x's to make the position curves flat.
Type these values into the Selected Value area...
ClumpWidthScale = 2 (the diameter of the cord's curl)
HairWidthScale = 1 (this is for changing the Hair Width along the length, but we need a
unifomrly width'd cord. If you need to affect the diameter of the cord itself, then
adjust Hair Width (above)).
ClumpCurl = 2.5 (this is how many times the cord runs around itself--use more or less to
get the right look for your cord)
Clump Flatness = 0 (Smooshes the ClumpWidthScale affect, so use that value to adjust
instead)
At the moment, you see a black cord, but you can assign your shader of choice to it.
Now that you can see your cord go back to that brush2 node you were on before and expand
the Brush Profile group. Change flatness1 to a value that flattens your cord to your
liking. Too much is too much.
If you want to see the results in action, choose the Hair Tab (have you saved your file
yet? If not, here's a good time. I'll wait. Done? Alright. Cool.) then select the
handset geometry, choose the move tool, and click the green arrow on the shelf
(Interactive Playback). Move the handset around and you should see things working for
the most part. Reload your saved file just to put things back in order.
Back to that hairSystemShape1 node. Expand Dynamics and set the Stiffness Scale to look
like a soft depression like in the image below. This makes the cord rigid when it goes
into and comes out of the geometry, but soft and chewy in the center.
For the cord to interact with the environment you can either create a collision cube (via
the hair menu--have the hairsystem selected), or you can do a makeCollide (select the
hair system and then the geometry it's to collide with). Play around with these to see
which works best for your situation.
When you hit play, you'll notice that the cord sags for a bit. This is no good unless
you start all your animation on frame 20 or so. To address this we need to set the
dynamic curve in a relaxed pose. Hit play and let it go until the cord settles down. In
the outliner select curve2 from under hairSystem1OutputCurves and choose Hair->Set Start
Position->From Current. You'll see curve2 assume the current position, and when you
rewind the animation this will now be where the simulation starts.
Your cord probably looks pretty low resolution at the moment, but ignore that for now and
do your animation. When it comes time to render you can either do a polySmooth on the
geometry, or you can crank the SubSegments on the hairSystemShape1 node.
Well, now. That was easy, eh? Have Fun!

3 comments:
HAving a problem actually.
Maya crashes everytime I go to parent the constraint "locator" with my mesh.
any ideas?
(Maya 2008 + Vista)
Warren, Try grouping the locater to itself one or two times. These "pillow" nodes may help maya keep things in order. Then parent the top-most group to the geometry.
buy viagra australian cheap generic viagra viagra cheap price iframe viagra and cocaine buy viagra in london england buy sublingual viagra online viva viagra song viagra herb alternative viagra prescription uk bought viagra fuerteventura women taking viagra is there a female viagra buy viagra online at viagra rrp australia
Post a Comment