Tuesday, February 19, 2013


For lamp cords:
Make a NURBS circle and a CV curve that is the length of the cord. Be sure to add enough CV;s to make it pliable.
Select the circle, then shift select the path for the cord. 
Under the Surfaces sub-menu, choose Surfaces - Extrude = Options. It should look like this:

Screen Shot 2013-02-19 at 7.02.17 PM.png
You must choose Polygons or you can't make it an nDynamic object. Here I've set the Number of V Spans to be 12 - this is how many spans will go along the path. The U spans go around the cord object. You could do this
after the fact in the advanced tessellation folder using the attribute editor if these numbers don't work for you.

Hide the curves and delete the history on the cord.
Switch to nDynamics sub-menu.
Choose nMesh - Create nCloth.
In the Attribute Editor, you can select Presets for the cloth. They are under Presets at the top right of the dialog.
I used Burlap which was pretty good.
Create a polygon plane that intersects with the floor.
Select it and choose nMesh - Create Passive Collider.
Give yourself a few hundred games to test with.
Hit play and see if the ford falls on to the floor and collides with it.
If it does, rewind it first - then grab the lamp base and drag it over to the cord end.
Select the end of the cord's vertices in vertex mode. Shift select the base in Object mode. 
Choose nConstraint - Transform.
The cord is now constrained to the movement of the base of the lamp, but not interactively. You have to animate it. So, select the base, set a key at frame one (type S). 
Move to another frame in the timeline - Try frame 35. Ignore any odd behavior. 
Move the lamp and if Autokey is on, you're good. Otherwise, type an S. 
Continue animating the base of the lamp.
Rewind, hit play.
The cord should follow the base.
To plug it in to a wall, Rewind and move it over close enough to the wall to attach the other end to it.
Select the vertices at the other end of the cord and Shift select the wall.
Choose nConstraint - Transform. The other end of the cord should now be stuck to the wall.
Hit play.

Iv've added a working version from Maya in Courses - Adv Anim - Jon - Maya_scenes, It's called cord one.

No comments:

Post a Comment