Presentation is loading. Please wait.

Presentation is loading. Please wait.

Advanced Computer Graphics: Animation

Similar presentations


Presentation on theme: "Advanced Computer Graphics: Animation"— Presentation transcript:

1 Advanced Computer Graphics: Animation
James Gain Department of Computer Science University of Cape Town Advanced Computer GraphicsCollaborative Visual Computing Laboratory

2 Advanced Computer Graphics
Objectives To introduce the field of computer animation. To describe the principal methods of parametric animation, motion capture and physical dynamics. To cover the animation of articulated figures. To show how Quaternion rotations address the animation problems with Euler angle rotations. 23/02/2019 Advanced Computer Graphics

3 Advanced Computer Graphics
Computer Animation Animation creates the illusion of life by showing strobed discrete images which the human visual system reconstructs using persistence of vision into a continuous sequence. Computer animation controls the position and attributes of all virtual entities over time. Widely used in simulation. Temporal aliasing occurs if an animation changes too quickly relative to the frame rate. For example: objects moving rapidly across the field of view, bicycle wheels which appear to turn backwards. Modelling specifies the geometry. Rendering determines visual appearance. Animation determines evolution over time. 23/02/2019 Advanced Computer Graphics

4 Advanced Computer Graphics
Hand-Drawn Animation Created in a fairly fixed sequence, called key-frame animation: A storyboard is laid out, which roughly outlines the animation. Shows the structure and ideas of the story. The soundtrack is recorded. Key frames of the animation are drawn. These show extremes of action or characteristic expressions. Intermediate frames are filled in by inbetweeners. Together with key frames these constitute a pencil test. Pencil tests are transferred to cels (sheets of acetate film). Each cel becomes a single frame in a film (60 frames per second). The process is time consuming and expensive. Some principles are transferable to computer animation: squash and stretch; slow-in slow-out. 23/02/2019 Advanced Computer Graphics

5 Parameter-based Animation
[+] [-] Fine control Requires experience Time consuming Frustrating Key-framing: Animators specify object parameters (position and orientation) at key frames. Inbetweening: Intermediate frames generated by interpolation. Animators have control over: Path: Linear interpolation (Lerping) leads to discontinuous direction changes. Instead use Hermite curves. Speed: a linear function is highly unrealistic Slow-in Slow-out (smooth acceleration/ deceleration) is preferred 23/02/2019 Advanced Computer Graphics

6 Advanced Computer Graphics
Motion Capture [+] [-] Realistic Expensive Not Re-usable Real-world position and orientation of objects (particularly people) can be tracked and applied to computer generated characters. Track predetermined points (called markers or sensors) on the moving entity in order to reconstruct the event digitally. Capture systems are optical (cameras + markers), electromagentic (attached magnetic sources receiver) or electromechanical (exoskeleton measuring bend angles). Widely used in VFX (e.g. digital extras in “Titanic”). 23/02/2019 Advanced Computer Graphics

7 Physically-based Animation
[+] [-] Automatic Complicated to build and use Realistic Computationally expensive Kinematics (object control): Describes the position and velocity of points. Forward example: at time the cube is at . Afterwards it moves with constant acceleration in direction . Inverse example: find the constant velocity required for a cube to reach after seconds. 23/02/2019 Advanced Computer Graphics

8 Advanced Computer Graphics
Dynamics Dynamics (cloth, water, fracture simulation): Considers the physical laws (e.g. Newtonian mechanics, Navier-Stokes equations) governing kinematics. Forward example: a cube has mass of grams. Gravity acts on the cube. Inverse example: find the force required for a cube to reach after seconds. 23/02/2019 Advanced Computer Graphics

9 Exercise: Figure Animation
A Virtual Actor is the CG representation of a character’s motion and appearance. Question: Why would we want to replace real with CG actors? Solution: Actor must react in real time (e.g. computer games) Actor’s physical form is difficult to realize in reality (e.g. Jar-Jar Binks) Actor must perform impossible or dangerous actions. Actor is to be placed in a computer generated set (avoids green-screening) Actor is a member of a crowd scene (cheap rent-a-crowd). The real actor is unavailable (e.g. Marilyn Monroe in “Rendezvous A Montreal”). 23/02/2019 Advanced Computer Graphics

10 Skeletal Representation
Skeleton: Encodes the degrees of motion freedom. A set of rigid bones linked by ball (3DOF) and hinge (1DOF) joints Shoulder blade cannot be represented by a single joint because of sliding action. Spine has 33 vertebrae (96 DOF) which is unwieldy but, due to movement constraints, can be approximated by 2-3 ball joints. The skeleton can be realized as a scene graph. 23/02/2019 Advanced Computer Graphics

11 Skeletal Transformations
Kinematics: From a particular joint configuration calculate the relative position and orientation of any point on the skeleton. Terminology: Kinematic link (bone), Kinematic chain (sequence of bones and joints) and End-effector (last link, e.g. hand or foot). Solution: Each link has a local co-ordinate system and is embedded in a space provided by the previous link. Each joint provides a local rotation and each bone a local translation Concatenating and gives a local transform The transformation of a point on link is found by concatenating all previous transforms in the hierarchy: 23/02/2019 Advanced Computer Graphics

12 Advanced Computer Graphics
Inverse Kinematics Specifying pose using joint angles is difficult. Animators would prefer to position end-effectors directly. Problem: Given the position and orientation of an end-effector Find all such that translates by and rotates by Underdetermined non-linear system with many solutions. Example: a hand has constraints ( and ) and unknowns (clavicle , shoulder , elbow , wrist ). Solutions: Iterative methods: use small changes in joint angles to iteratively converge on a correct solution. Closed form algebraic solutions: only exist for particular simplified cases. 23/02/2019 Advanced Computer Graphics

13 Reducing Kinematic Freedom
The degrees of kinematic freedom can be reduced by enforcing “realistic” motion. Realism rules for human motion: Motion tends to be energy minimal (but this doesn’t account for expressive gestures). Collisions must not occur (muscles and skin surrounding the kinematic bones cannot intersect). Joint limits must be maintained (e.g. elbows don’t bend backwards) Feet in contact with the floor maintain their position unless lifted. Solutions which obey these realism rules are often even more difficult to find. 23/02/2019 Advanced Computer Graphics

14 Animation Summary Parameter-based Motion Capture Physically-based
Computer Time (Machine Hours) Low (low level control) Medium (marker tracking) High (complex simulation) Human Time (Man Hours) Very High (painstaking) (acting the scene) (specify constraints and external forces) Expressive Power (animator imparted) (expressive acting) (human emotion not considered) Realism (realism difficult to recreate) (data captured from reality) Med (only approximate) 23/02/2019 Advanced Computer Graphics

15 Advanced Computer Graphics
Euler Angles Historically popular but flawed parametrization of orientation. A general rotation is constructed as a sequence of rotations about 3 mutually orthogonal axes: rolls about , and . The order of the rolls is significant. Arbitrarily choose the ordering A roll about by , followed with a roll about by , and finally a roll about by Euler angle interpolation is not very stable. Especially with a small rotation in one axis and large rotation in another – multiplying large values by those close to zero tends to introduce numerical error. 23/02/2019 Advanced Computer Graphics

16 Advanced Computer Graphics
Gimbal Lock A gimbal mechanism consists of three concentric rings on pivots which support a compass or gyroscope. Gimbal lock occurs when two of the rings are accidentally aligned. Euler angles are also susceptible. If one axis is rolled into alignment with another then a degree of rotation freedom is lost. Unlike translations, rotations relative to separate axes are not independent. Example: a -roll of rotates the -axis onto the -axis so that rolls about and are indistinguishable. 23/02/2019 Advanced Computer Graphics

17 Advanced Computer Graphics
Lerping Euler Angles Two Euler rotations and can be linearly interpolated to obtain inbetween rotations: Problems: This does not produce a ‘natural’ steady rotation about a single vector but may instead cause weird oscillations. Reason: the rolls about are not independent. The resulting interpolation differs depending on the ordering of the Euler angles. Reason: the rolls about are not commutative. 23/02/2019 Advanced Computer Graphics

18 Example: Poor Euler Interp
The interpolations and have the same start and end orientations but different intermediate orientations. 23/02/2019 Advanced Computer Graphics

19 Advanced Computer Graphics
Quaternions Aim to: Guarantee a direct and steady rotation between any two key orientations. Define moves that are independent of any particular co-ordinate system. Quaternions were invented by Sir William Hamilton, after 10 years of work, on 16 October In his elation he carved the formulae into the nearby Broome Bridge in Dublin. They represent an orientation by a counter-clockwise rotation angle ( ) about an arbitrary vector ( ). Advantages: combining quaternions more efficient than matrix multiplication. simple to convert between angle-axis, quaternion and transformation matrix representations of rotation. 23/02/2019 Advanced Computer Graphics

20 Advanced Computer Graphics
Form of a Quaternion such that are ‘imaginary’ axes ( are imaginary numbers) and is a ‘real’ axis. and are co-ordinates relative to these four axes. In 3D a point s.t with co-ordinates and axes lies on a sphere of radius . Similarly, for quaternions the rotation with lies on a 4D hypersphere of radius . 23/02/2019 Advanced Computer Graphics

21 Lerping vs. Slerping Quaternions
Inbetweening key Quaternions and by linearly interpolating their components does not: Produce equal changes in the quaternion for equal steps in . They speed up in the middle. Ensure vectors remain on the hypersphere. Rather use spherical linear interpolation (Slerping) which step through a constant angle. 23/02/2019 Advanced Computer Graphics

22 Evaluating Quaternions
Advantages: Flexible. No parametrization singularities. Smooth consistent interpolation of orientations. Simple and efficient composition of rotations. Disadvantages: Each orientation is represented by two quaternions. Represent orientations not rotations ( about is the same quaternion as about ). Complex! References: Computer Graphics: Principles and Practice, sec 23/02/2019 Advanced Computer Graphics


Download ppt "Advanced Computer Graphics: Animation"

Similar presentations


Ads by Google