|
|
|
Tell us what you think of the site.
|
|
Autodesk® 3ds Max®
|
|
Autodesk® Maya®
|
|
Autodesk® Softimage®
|
|
Autodesk® MotionBuilder®
|
|
Autodesk® Mudbox™
|
|
Autodesk® Stitcher™
|
|
Autodesk® ImageModeler™
|
|
Autodesk® Sketchbook® Pro
|
Posted: May 14, 2008
Category: nCloth
For grabbing cloth the key technique to use is to animate the enable on the constraint. When a constraint becomes enabled it reforms its connections based on the relative
distances at the time it is enabled.
In this tutorial we will grab a simple plane of cloth with a cube. In a real world scene one could substitute an animated hand for the cube and the simulation would still work
the same. A nice property is that the deformation of the hand would also be taken into account. One could instead try to grab by closing fingers of a hand around the cloth and
using friction, but that would be much more difficult to simulate than this method.
1. Create a simple cube and plane. Make the plane nCloth and on the nucleus node turn on usePlane on the nucleus node so that the cloth just sits on the ground. The cube
will represent our grabby hand. Keyframe it moving around as you wish the hand to move.
2. Select 2 or more vertices on the cube where you wish to attach along with the cloth plane and create a point to surface constraint. (You can enable collisions on the
cubes nRigid node if you additionally want the cloth to collide with the cube) Note that you need at least 3 constraining vertices if you want to be able to twist the cloth in
any direction by rotating the cube. If you had used vertices on fingers then the cloth would also respond to the relative motions of the fingers.
3. Key the enable attribute of the constraint ON when you wish the "hand" (cube) to grab the cloth and OFF when you wish to release it. This can be repeated multiple
times and the attachments will always be formed at the frame where enable is keyed ON.
In order to post any comments, you must be logged in!
|
|
Posted by JimBean on Oct 03, 2008 at 06:00 PM
|
Hi Duncan,
Now that Maya 2009 is out, just imagine this...
There's a huge crowd of, well let's face it, geeks, chanting DUNCAN! DUNCAN DUNCAN...
And what do they want? Oh, you know what they want.
|
|
|
Posted by yourdaftpunk on Aug 05, 2008 at 11:49 PM
|
|
Say you've constrained four vertices with one constraint node- is there a way to enable the effect one vertex at a time or are the all either on or off? I don't mind heavy
scripting and I think it would be useful for an effect I need to produce in an upcoming show.
|
|
|
Posted by jbanchero on Jul 09, 2008 at 01:55 AM
|
Thanks!!
What I'm trying do is create an expression node that makes any select channel "springy" (with the same, or similar, parameters you defined in the brush spring script). I often
need secondary motion on things so I build a lead/follow particle, connect the lead Y value to a controller null, then connect the value I want to be "springy" to the trailing
particle Y value. It's kinda cumbersome.
I noticed that BonusTools has a "secondary animation" function - perhaps that does what I need?
UPDATE: I think I can re-work the expression made by MakeBrushSpring!! Thank you sooo much (I haven't used PFX enough!!) Also... I looked into "DynamicSecondaryMotion" in
BonusTools - it looks specific to bones.
|
|
|
Posted by Duncan Brinsmead on Jul 09, 2008 at 01:41 AM
|
|
This script is now included in Maya and is called off the menu "Paint Effects:Brush Animation: Make Brush Spring"(there should be a little on this in the doc). Paint a simple fern
onto a sphere. Key the sphere moving back and forth. Now select the fern and do "make brush spring". It should wiggle as the sphere moves. Under "extra attributes" in the
attribute editor for the brush (fern1?) you will find "stiffness", "damp" and "travel", which can be used to control the character of the animation. If you open the expression
editor and do "selectFilter:expressionName" then you can view and play with the expression it created.
|
|
|
Posted by jbanchero on Jul 08, 2008 at 07:33 AM
|
Wow!! Great stuff!!
Hi Duncan... I came across a script you wrote about 10 years ago that applied springs to brushes/strokes. The proc is called "makeBrushSpring". Do you recall this script? Can you
point me to any documentation that may exist? I'm hoping to leverage it to do something simple.
|
|
|
|