Download: swingingLight01.rar
Movie: lightbulbrender.mov
In this example I first push the light bulb with a pbomb force and then with a wind with the turbulance turned up.
Elements for this tutorial are as follows.

  1. A spline the length of the cord all the way to the tip of the light bulb.
  2. A cylinder the length of the cord.
  3. A model of the light bulb.
  4. A gravity force.
  5. A wind force or pBomb. I have used both in the example.

Setup:

  1. The splines needs enough verts along it to be controlled my flex and be able to bend. Add a normalize spline to it and dial the length down till you have about 25 knots in it.
  2. Next move the pivot to the top of the spline and then reset Xform on the spline using the tool in the Utilities panel. This will allow the path deform to work correctly.
  3. Apply a Path Deform WSM to the cylinder that will be used for the cord. Press the move to spline button and make sure the axis is correct.
    1. If the cylinder isn't long enough don't use the stretch in the Path Deform but instead chang the length parameter for the cylinder.

  4. For the light bulb we can't use a Path deform as it would look very strange. So create a point helper and add an Attachment constraint to it and pick the cylinder. Use the Set Position button in the motion panel to attach the point helper to the bottom of the cylinder where the light bulb should be attached. Try to make sure that it is centered.
  5. Align the light bulb to the point helper and link it to it.
  6. To get the nice over lapping animation on the light bulb and to make it feel heavier then the cord we will need to have the light bulb look at the end of the spline.
    1. Create another point helper and this time add a Path Constraint to it and select the spline.
    2. Delete the frist key in the Path Constraint so that the point helper drops to the bottom of the spline.
    3. Select the light bulb and add a Look At Constraint to it and have it look at the second point helper.

  7. Now for setting up Flex.
    1. Add Flex to the spline.
    2. Turn off Use Weights.
    3. Set the Strength to 0.15 and Sway to 0.64.
    4. Set solver type to Runge-Kutta4 with samples at 3.
    5. Change to Edge Vertices SO mode and select the very top vertex in the spline.
    6. Change to Weights & Springs SO mode and select all the verts.
      1. Enable AdVanced Springs in the Advanced Springs rollout.
      2. Select Options and change to Hold Shape Springs with the Hold Shape Radius at around 7 for the example that I created. If you spline is longer or shorter or has more or less verts you will have to adjust this.
      3. Adjust the Shape Str and Shape Sway to the Suggested Strength value to start with.
      4. Turn on Hold Length and set it to about 7 to 10. We need it to stretch a bit or it will just start to curl up.

    7. Add gravity and wind or pbomb to the Forces menu and scrub the time line.
    8. Adjust the Shape Str and Shape Sway up slowly until you get the desired results.