skip to main | skip to sidebar

See lectures by course…

Tuesday, October 07, 2008

IMD 4003: Rigid Body I

For IMD 4003: Computer Animation, taught by Chris Joslin

1. Rigid Bodies

What are Rigid Bodies?

Rigid bodies are used to describe something that does not change shape (including the scale) when it's animated. Animating a rigid body is to animate the manipulation of a joint. Hierarchies are important for this animation in order to control the animation of a complex system.

Skeletons

Skeletons are control mechanisms for characters or objects. They are useful because they are fast and intuitive (Ex. If you move your arm, you expect your hand to move as well.). We can allow the hierarchy to control and manipulate details that would otherwise be too time-consuming to work out (Ex. You wouldn't want to manually move the hand and the fingers and the forearm when you rotate your shoulder.)

We can and do use soft body systems (these have no skeletons) but they don't necessarily follow a defined set of rules.

2. Scene Graphs

What are Scene Graphs?

Scene graphs handle hierarchies containing information about the position of the objects in space and other information specific to that hierarchy. They comprise of links (the connections between joints which can have any value, including zero) and joints (see the 5 Types of Joints in Articulated Models for different types of joints).

Parent-Child Relationships

The relationship between nodes is expressed from the top to the bottom of the hierarchy.

ROOT → PARENT → CHILD

Nodes are created incrementally. As long as your computer can handle it, you can have an infinite number of nodes.

Node Types

In general, nodes are represented as class instances which means there are data and functions associated with each node type.

Example: The Transform Node translates the attached shape in the local coordinate system.
There are many other types of nodes such as Group, Shape, Lights, Camera, Action, etc.

Scene Graph Manager

This handles the rendering and handling of each local coordinate system. It is a set of hierarchical nodes defined either through direct declaration or imported via a scene-graph based file.

3. Articulated Models

What are Articulated Models?

Articulated Models are rigid body objects connected by joints. Each element can be manipulated by the joint angle between each joint. Animation is achieved by a change in these angles over a discrete time step. Δt needs to be small enough in order to avoid jerky motions.

5 Types of Joints (BHPPB)

  1. Ball and Socket: allows free rotation in all axes (x, y, z). (Ex. Hip joint)
  2. Hinge / Revolute: allows free rotation around one axis (x, y or z). (Ex. Door hinge)
  3. Plane / Gliding: permits a slight translation along the axis of the connecting link. (Ex. Hand joint)
  4. Prismatic: allows translation along a single axis (absolutely no rotation).
  5. Bearing / Gimbal: Bearings allow a rotation around an axis (Ex. Rollerblade wheels have ball bearings that rotate around an axis). Gimbals allow rotation around all axes in turn.

Degrees of Freedom: This describes the amount of articulation that is possible within a rigid body hierarchy system. It is measured based on the sum of the number of axis rotations per joint.

Example: A mouse has 2 degrees of rotation.

There is a maximum of 3 degrees of rotation (x, y and z).

Joint Limitations: These restrict the motion to provide a natural appearance - generally, we don't want the body of one link to end up in another.

Example: Think of your finger. It can only rotate so many degrees on its axes. If you could rotate your finger back into your hand, that would be awkward and unrealistic.

4. Forward Kinematics

What is "Forward Kinematics"?

Forward kinematics describes the direction of motion that is applied to jointed objects. You start at the ROOT and travel down the kinematics tree, propagating the transformations as you go.

Why do we use it? (Practical Application)

  • Animating hierarchical joint models using rotations;
  • Updating link positions according to rotations;
  • Uses vector-matrix multiplication;
  • The transform matrix is composed of all the joint transforms between sensor/effector and the root.

The Mathematics of Forward Kinematics

Forward kinematics is used when you know the joint angles and you want to find the end-affector position:

$(p,q) = F (\Theta_{i})$ where,

  • $y = \sin(\Theta)$ and
  • $x = \cos (\Theta)$

2D Coordinate System

Let's take a look at Forward Kinematics in a 2D, left-handed system:

where,

  • $x_{e} = l_{1} \cos\Theta_{1} + l_{2} \cos(\Theta_{1}+\Theta_{2})$
  • $y_{e} = l_{1} \sin\Theta_{1} + l_{2} \sin(\Theta_{1}+\Theta_{2})$

In the local coordinate view, we calculate the translation from Left to Right (in the World Coordinate System, we read it Right to Left):

$T = (\text{rot}\Theta_{1})(\text{transl}_{1})(\text{rot}\Theta_{2})(\text{transl}_{2})$, where

  • $\text{rot}\Theta_{1}= \begin{bmatrix} \cos\Theta_{1} & -\sin\Theta_{1} & 0 \\ \sin\Theta_{1} & \cos\Theta_{1} & 0 \\ 0 & 0 & 1 \end{bmatrix}$
  • $\text{transl}_{1}= \begin{bmatrix} 0 & 0 & l_{1} \\ 0 & 0 & 0 \\ 0 & 0 & 1 \end{bmatrix}$
  • $\text{rot}\Theta_{2}= \begin{bmatrix} \cos\Theta_{2} & -\sin\Theta_{2} & 0 \\ \sin\Theta_{2} & \cos\Theta_{2} & 0 \\ 0 & 0 & 1 \end{bmatrix}$
  • $\text{transl}_{2}= \begin{bmatrix} 0 & 0 & l_{2} \\ 0 & 0 & 0 \\ 0 & 0 & 1 \end{bmatrix}$

giving us,

  • $T = \small\begin{bmatrix} \cos\Theta_{1} & -\sin\Theta_{1} & 0 \\ \sin\Theta_{1} & \cos\Theta_{1} & 0 \\ 0 & 0 & 1 \end{bmatrix} \small\begin{bmatrix} 0 & 0 & l_{1} \\ 0 & 0 & 0 \\ 0 & 0 & 1 \end{bmatrix} \small\begin{bmatrix} \cos\Theta_{2} & -\sin\Theta_{2} & 0 \\ \sin\Theta_{2} & \cos\Theta_{2} & 0 \\ 0 & 0 & 1 \end{bmatrix} \small\begin{bmatrix} 0 & 0 & l_{2} \\ 0 & 0 & 0 \\ 0 & 0 & 1 \end{bmatrix}$

3D Coordinate System

We can calculate translations and rotations in a 3D coordinate system by using 4x4 matrices, rotating about an arbitrary axis. Each segment has its own coordinate system where,

$T = J_{0} (L_{1}J_{1} L_{2}J_{2} L_{3}J_{3}\text{…})$ where,

  • $J_{0}$ = Position and orientation of the root segment
  • $L_{1}$ = First link transformation
  • $J_{1}$ = First joint transformation

Unfortunately, I had trouble understanding the last 2 slides so there aren't any notes on them.

0 comments: