This tutorial was written as a response to an email asking how one could go about animating a balloon flying in the air â€” complete with attached string. I believe the quickest way to create a realistic motion would be to use soft body dynamics, which is the method described here. As usual, there are many other methods. Suggestions and corrections are welcome.
Check out the following playblast to see the result:
The geometry was simplified since it’s not the issue here. Create a sphere, tweak it a bit and name it balloon. Next create a NURBS cylinder and non-proportionally scale it so that it looks like a string (the name used in this example is string1 because Maya seems to reserve the name string for internal use). The cylinder should have enough spans to deform properly later. I used six spans here.
Delete history on both objects.
A curve to deform the string
The cylinder itself could be turned into a soft body, but since it has volume (eight sections by default), deforming it directly will create irregularities in its thickness. Instead, we will use a curve.
In the side or front view, create a CV curve with six evenly spaced vertices going down straight through the cylinder. Use Snap to Grid (hold down the X key by default) in order to make it completely straight.
This curve will be used as a Wire deformer: when vertices move, they will deform the geometry they are attached to.
The Wire Deformer
From the Animation menu set, select Deform > Wire Tool and set its options to the default. Following the prompts on the Help Line, select the shape to deform (string1), press Enter, then select the Wire curve (curve1) and press Enter. You can do this through the Outliner.
This creates a new node, curve1BaseWire. To see the results of this operation, select a CV on curve1 and move it around. The string should deform accordingly.
Undo any CV tweaks so that the curve is straight again.
The Soft Body
Now for the soft body. Select the original curve (curve1) and from the Dynamics
menu set choose Soft/Rigid Bodies > Create Soft Body options. Set the options
shown to the right and click Create. In the Outliner, you will see a new Particle
object parented to the curve. This object has six particles, one for each CV
of the curve.
The curve has also been duplicated as copyOfcurve1 and is used as a Goal. This means the particles will tend to align themselves to the CVs of the duplicate curve, and while doing so will deform, or move, the CVs of the original curve.
We need to attach the string to the balloon, so that it follows it everywhere. To do this, parent the Goal curve (copyOfcurve1) to the balloon. Since that curve is hidden, the quickest way to do that is to use the Outliner: middle-mouse drag copyOfcurve1 onto balloon.
The diagram to the right (“Parents and children”) sums up the relations we just set up. Make sure you understand the relationships and the role of each node.
Particle Goal Weights
If you now keyframe a motion for the balloon you’ll see the string move along with it, although it will remain quite stiff. This is because the Goal weight for the Particle object has been set to 1. You can lower it in the Particle object’s Attribute Editor section called Goal Weights and Objects, but this won’t be enough. We need to assign a specific Goal Weight to each particle, so that the top CV stays glued to the balloon while the lower ones move more freely.
Go into Component Mode (F8), select a Pick Mask for Particles from the Status Line and drag-select the six particles in the perspective window (don’t select the particle object from the Outliner). This selects the individual particles. Go into Window > General Editors > Component Editor… and select the Particles tab. You will see a list of the particles (pt through ) with several attributes columns. At the very end you’ll see goalPP, which is the Per Particle Goal attribute.
Modifying these values requires quite a bit of experimentation to get the proper look. Start with a value of 1.00 for the first particle (the one we want to keep glued to the balloon), 0.40 for the second particle and 0.20 for the remaining four. Tweak them until you’re satisfied with the motion. These values are multiplied by the particle object’s Goal Weight attribute (the one mentioned earlier), which is why you’ll want to keep it at a value of 1.00 to get predictable results.
Now if you keyframe the balloon’s translation and rotation, you get something a little bit more interesting. The string now moves realistically.
Keeping everything together
You might find that the particles stretch the cylinder out of proportion. It order to help the particles maintain the overall length and shape of the cylinder, select the particle object and add Springs to it (Dynamics menu set > Soft/Rigid Bodies > Create Springs). Choose All as the Creation Method. This creates springs between all the particles. Since there are only six of them, you won’t get much of a hit on interactivity and frame rate. You’ll now have to play around with Stiffness and Damping to get the proper behavior. Don’t go over 1 for Damping or the simulation will collapse. I took Stiffness up to 20 which kept the shape nicely while still allowing for a fluid deformation.
For some added randomness in the string’s deformation, add a Turbulence Field to the particles. Set its Attenuation to zero, and tweak its Magnitude and Frequency to get the look you want.
The rest is basically a tweaking process between several influences which are summed up in the diagram to the left. Remember that the string will “follow through” the movement of the balloon, which should be keyframed carefully. You can make the balloon into a Rigid Body if you want, but I found it too hard to control that way.
Compare the following playblast with the previous one. The only values changed were the goalPP weights:
This method has one disadvantage. Because the Goal curve is a straight line parented to the balloon, if the balloon comes to a rest while in a non-vertical position, the string will eventually settle down somewhat horizontally, depending on the direction of the Goal curve. That said, unless you’re going to follow the balloon into the stratosphere, you should be ok.