IK Tutorial - Piston Animation

In an object hierarchy, parents normally transform their children as they are themselves transformed. For example, when a parent rotates 90°, its child also rotates 90°. These transformations are defined by rotation around pivot points and motion and scaling along pivot axes. Each object applies its parent's transformation to its own. This way, all of the objects in the hierarchy get transformed. This method of applying transformation is called forward kinematics.

In order to have the objects at the end of the hierarchy do something particular, it may be necessary to add additional keyframes to objects in the middle of the chain. This is rarely accurate and usually has to be redone every time something changes. To avoid this, a system must be applied that will let objects at the end of the chain achieve the transformation (movement, scaling, rotation) goal. Since this involves working out the motion from the goals back to the beginning of the chain, this system is called inverse kinematics (IK).

An IK structure is basically a chain of parent/child relationships between objects having a start and stop (goal) point. IK calculates the behavior of the objects in the chain. 

Tutorial: Use IK to Animate a Piston

In this section, you will use Bongo 2.0 to animate a piston. 

Before you start, if you don't have any previous experience with Bongo. You might want to have a look at how animation hierarchies works in Bongo 2.

 

Open the example model

  1. Open the model PistonStart.3dm.
  2. From the Bongo menu or toolbar, open the Timeline and Animation Manager.

 

Use hierarchies to Link Objects

We will link parts of the piston together and control it's movements through these links.

 

  1. From the Bongo Menu Select Utilities, and then Link Chain.
    -Or-
    Click on the Link Chain icon in the toolbar.
    -Or-
    Use the BongoLinkChain command.
  2. At the Select Parent prompt, select the base (Object 0).
    At the Select Point To Move Pivot To prompt. Select the end of the line by having Osnap to End on, see image below.

  3. At the Select new link prompt, select the next part of the piston - the long arm (Object 1). At the Select Point To Move Pivot To prompt. Select the point down in the middle by having Osnap to Point on, see image below.

  4. At the Select new link prompt, select the next part of the piston - the top (Object 2). At the Select Point To Move Pivot To prompt. Select the point down in the middle by having Osnap to Point on, see image below.
  5. At the Select new link prompt, press Enter to end the command.
  6. From the Bongo Menu Select Utilities, and then Select Children.
    -Or-
    Click on the Select Children icon in the toolbar.
    -Or-
    Use the BongoSelectChildren command

  7. At the Select Parent prompt, select the the long arm (Object 1).
  8. At the Select Children prompt, select the point (Point 2) down in the middle of the top by having Osnap to Point on, see image below.
  9. At the Select Children prompt, press Enter to end the command.
  10. Now your hierarchy tree in the Animation Manager should look like this:

Add the movement

  1. Select the base (Object 0).
  2. In the Timeline, click the Animate button.
  3. Move the Timeline Slider to tick 99.
  4. In the Timeline, Switch to rotation mode.
  5. Click the Y-Axis button and enter 360 in the edit box.
  6. Scrub the Timeline Slider or click the Play button to see that all the objects rotate.

Set up IK Constraints

We would like the top to stay in place and that only the base would be rotating. By turning objects into joints gives Bongo permission to move the objects in order to solve the calculation.

  1. Select the the long arm (Object 1).
  2. From the Properties tab, choose Bongo > Part of an IK chain > Joint.
    For type choose Hinge, and Rotation Y, since we want the object to only rotate in the direction of the Y-axis.

  3. Select the point (Point 2).
  4. From the Properties tab, choose Bongo > Part of an IK chain > Constraint.
    Press the Select Object -button, to constrain the point to an object.
  5. Select the line called Object 3. See image.
  6. Scrub the Timeline Slider or click the Play button to see what the animation now looks like. Play video.

 

Get the top to look in the right direction

Use the Look At constraint to get an object to face in the direction you want to.

  1. Select the Top (Object 2).
  2. From the Properties tab, choose Bongo > Simple Constraint.


  3. Add a Look At constraint, when prompt Pick New Heading Vector, select the point at the end of the line by having Osnap to Point on, see image below. 

    The constraint heading determines the direction the object will use to face an object to which it is constrained.

  4. When prompt Select target object, select the same point at the end of the line by having Osnap to Point on, see image above.
  5. Scrub the Timeline Slider or click the Play button to see that the pivot moves correctly now.

© 2017   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service