Maya 2020 fundamentals - modelling the real world
Get halfway through a model and find it's an unworkable mess? Can't add edge loops where you need them? Can't subdivide a mesh properly? If any of this sounds familiar check this course out.
# 1 16-12-2003 , 04:40 AM
grunze's Avatar
Registered User
Join Date: Nov 2002
Posts: 117

dynamic wires

Hi,

I have these wires here attached to this mechanical arm.
I want them to do a few things.

A) They have to stretch as the arm opens and closes. (that i can do easily by binding it to the skeleton)

B) I want them to droop and be dynamic as the robot moves.
I know i can make them droop and sway as a softbody, but how do i make that happen while having it attached to the skeleton, and while keeping the ends of the wires attached to the arms of the machine.

Any suggestions, or better ways to do it?

Thanks!:bgreen:

Attached Thumbnails

Thanks,
Ari
# 2 16-12-2003 , 05:35 PM
ragecgi's Avatar
Registered User
Join Date: Sep 2002
Location: Minnesota, USA
Posts: 3,709
Never tried this in practice, however, I AM in the process of doing a SM video tut for something similar.

The fact that you are comfortable with bones, and softies is a help here, as you will need that underlying knowledge to achive something like what you wantuser added image

You "may" have to start over depending on how your current setup differs from my explanation below, but seeing how you are only working with 3 "wires" that should be no sweat once you do it a few timesuser added image
(like anything)


Ok, here we go:

My technique is CLOSELY based on a tut I saw a while back on 3DCafe, however since there was no mention of the authors name, I couldn't thank themuser added image

I've edited this old idea for Maya 2.0 to better suit our 4.5+ needs, however even though much has not changed regarding the actual process, please excuse any GUI reference mistakes, and investigate accordinglyuser added image


1. Start by creating a cord attached to something on each end. (like you have)
*My preferences are for the Y axis to be up.

2. Draw the curve (Create -> CV curve tool), snapping the cv's to the grid one unit at a time.


3. Next place skeleton joints along the curve using Skeleton -> Joint Tool, starting at the point where you created your first cv. (2 joints should work for your setup)

4. Place an IK handle (Skeleton -> IK Handle Tool) on the skeleton from base of the skeleton to the other end.


5. Now select the skeleton and the curve and select Skin -> Bind Skin -> Smooth Bind. Pick the curve and turn it into a soft body Bodies -> Create Soft Bodies with "Duplicate, Make Copy Soft" selected and Hide Non-Soft Object and Make Non-Soft Goal Selected and weight set to 1.000.

6. Select the new soft body, and create springs (Bodies -> Create Springs). The min/max setting are determined by where your cvs have been placed. In this case they were placed with 1 unit spacings, so I set min .1 and max 1.1.


7. Reselect the soft body, go to component selection mode with particle selecting on. Pick all of the soft body particles except the first and the last ones.


8. Open the Attribute Editor (Window -> Attribute Editor), go to the Per Particle (Array) Attributes section and with the right mouse button click in the gray box beside goalPP.

9. Select Component Editor from the menu that appears. Change the goalPP to 0.00 for each of the selected particles then close the Component Editor and Attribute Editor.


10. Return to Object mode and select the soft body again. Create a gravity field (Fields -> Create Gravity). (If you play back the animation now the middle section of the curve should just fall straight down, the springs will eventually kick in but as long as the middle section falls you are in good shape)


11. Now is a good time to add the extrusion to your object. Create a circle and snap it to the first cv/particle of the soft body at the same end as the base of the skeleton and rotate it so that the circle is aligned to your curve direction.

12. Select the circle then the soft body and perform an extrusion (Surfaces -> Extrude).
*Scale the circle to give the cord a nice diameter.


There you go, in a nutshell.




**NOTE - IF YOU ARE USING A FLOOR:
Create a nurbs plane which will act as the floor and our collision object and make it a collision object by selecting Particles -> Make Collide. Now click on Window -> Relationship Editors -> Dynamic Relations. In this editor you should select your soft body object (copy of Curve1) from the left side, then on the right side under Selection Modes check "Collisions" and select the floor object we created, nurbsPlaneShape1 or pPlane1 for a polygon floor.

Tweaking may be needed to get the cord to act like you want.
A few channels affect this, the floor's Resilience and Friction and the Spring's Stiffness and Damping.
For the above example that I have created I set the Stiffness at 20, Damping at .5, Resilience at 0 and Friction at 0.2. You may need to increase the oversampling by using Solver -> Edit Oversampling to keep the Damping and Stiffness in the springs under control.

OR, you can always add another set of springs ot the same particles or cv's for more stiffness.

The floor will need to be slightly lower than the rest position of the particles so that the chord won't drop through the floor on the first frame.

To test your settings, just animate the IK handle however you see fit.




***[b]MORE NOTES and floor fyi's[b/]***
I created my cord in a straight line in order to space the springs evenly and to make as few of them as possible to speed up calculation time. You could create the cord in its curled position or move the IK handle end around until the cord animates to where you would like it and then select the soft body Solvers -> Initial State -> Set For Selected.

You might notice that half of the cord sinks below the floor plane. You can move the circle for the extrusion into a position so that the bottom edge of the extrusion is in the same place as the soft body curve.

Always extrude the circle on the softbody not the original curve and keep the construction history or the extrusion will not animate with the curve. (not sure if this is true with 4.5+)




Good luck!


Israel "Izzy" Long
Motion and Title Design for Broadcast-Film-DS
izzylong.com
# 3 16-12-2003 , 06:21 PM
grunze's Avatar
Registered User
Join Date: Nov 2002
Posts: 117
Boy oh boy...
Well, thanks so much for the help, I'll get to it ASAP

Thanks again,
Grunze


Thanks,
Ari
# 4 16-12-2003 , 11:41 PM
ragecgi's Avatar
Registered User
Join Date: Sep 2002
Location: Minnesota, USA
Posts: 3,709
No problemuser added image

It's actually easy once you do it once or twice.

Took me about 7 times to get it.
I am a dumba$$ sometimesuser added image hehe..


Israel "Izzy" Long
Motion and Title Design for Broadcast-Film-DS
izzylong.com
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads