Adverti horiz upsell
How to make a realistic cable
How to make a realistic cable
Alin Sfetcu, updated 2008-10-22 17:02:26 UTC 78,888 views  Rating:
(5 ratings)
Page 1 of 1

How to make a realistic cable

(Maya Dynamics Tutorial)

In this tutorial i`ll try to explain how to make a simple NURBS cylinder to behave like a

real cable with gravity, some elasticity and all that real stuff. In this tutorial i`m assuming

all the tools i`ll use are set to default settings.

I`ll make a new display layer (with visible tuned off), and i`ll put the cable geometry inside

because I don`t need it now. I`ll build a simple NURBS curve, for this tutorial 3 spans will

be enough. This curve will be use to deform my cable. I`ll place the curve inside the

cable. Now to be able to have full control over the curve deformation i`ll put every CV

of the curve inside a cluster. I`ll select one CV at the time (very important) and bind it

to a cluster. At the end of this "operation" my curve will have 6 clusters.

For this simulation i`ll use Maya`s dynamics system to deform the cable in a realistic way.

I`ll build 4 little poly cubes and point-snap them to clusters.

The two clusters positioned at the cable ends will be controlled by two locators,

locators which will be used for control and animation.

I`ll select all 4 cubes and make them active rigid bodies (one at the time), and with all

4 cubes selected i`ll apply a gravity field on them. Then i`ll point-constrain every

cluster to corespondent cube/locator. (the cluster will be selected last) I`ll put my

curve in the same layer with the cable, because i don`t need it right now. I`ll select

cube_1 and put a nail constrain on him, then i`ll point-snap the constrain to locator_1,

i`ll do the same thing for cube_4 and locator_2.

Between cube_1 and cube_2 put a spring constrain, i`ll repeat the action for cube_2 and

cube_3 and for cube_3 and cube_4.

My dynamic cable is done, now let`s start tweaking the setting. First i`ll set the active

rigid bodies by selecting all 4 cubes and using the channel box i set "Bounciness" to 0

and "Damping" to 2. Now it`s time to set the constrains. Select all 3 spring and using the

same old channel box set "Spring Stiffness" to 70, and "Relative to" to Mid Point.

Let`s bind the two nail constrains to their respective locators, i`ll make use of

expressions for that. I`ll select first nail constrain, in Channel Box i`ll make a right-lick on

Translate X and choose Expressions from the pop up menu. In Expression Editor i`ll type

"tx = locator_1.tx;" (locator_1 is the name of my locator). I`ll do the same thing for

translate Y and Z with right changes :D. If i move my locator nail constrain will follow,

that means i got what i wanted. I`ll do the same for my other nail constrain and his locator.

I`ll hit the play button. When the springs loose all the energy (thanks to Damping

attribute) I will have something like this.

First i`ll make a new layer (visible turned off) and put inside all the clusters, springs,

nails, cubes and the gravity field, second i`ll make visible the layer which contain the

curve and the cable. It`s time to bind the cable to the curve, for this i`ll use an wire

deformer, following the help-line instruction i`ll select the cable first and press Enter key

then i`ll select the curve and press Enter key again to complete the binding process.

Now select the wire1 entry from the cable history list and set "Dropoff Distance" to 100.

This will ensure that my cable will keep his volume.

My realistic cable is ready for animation. For that i`ll use my trustworthy locators. :D

If you want to make your cable more stiff or less you can play with Mass attribute of the

active rigid bodies or you can increase/decrease Spring Stiffness on springs or both.

cablu_9.mov

Hope you enjoy following this tutorial as much as I did writing it. Now check my

MEL script as_makeCable.mel which make the same thing and more. Don`t be mad

at me, it`s better to learn the hardway.

Alin Sfetcu - VFX Artist

aSfetcu (at) gmail.com


Comments


Please sign up or sign in to post a comment.