0% found this document useful (0 votes)
35 views

Game Engine Programming 2 Week 6

This document discusses techniques for skeletal animation and procedural generation in game development. It covers skeletal animation topics like skinning, vertex binding, and the shortcomings of blended skinning. It also discusses using procedural generation with Perlin noise to procedurally create natural phenomena like terrains and trees to reduce content creation costs. Layering different frequencies of Perlin noise can add self-similarity and complexity.

Uploaded by

Dean Levy
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

Game Engine Programming 2 Week 6

This document discusses techniques for skeletal animation and procedural generation in game development. It covers skeletal animation topics like skinning, vertex binding, and the shortcomings of blended skinning. It also discusses using procedural generation with Perlin noise to procedurally create natural phenomena like terrains and trees to reduce content creation costs. Layering different frequencies of Perlin noise can add self-similarity and complexity.

Uploaded by

Dean Levy
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 20

Week 6

SKELETAL ANIMATION AND SKINNING /


PROCEDURAL / GENERATION
Week 6: SKELETAL ANIMATION AND SKINNING / PROCEDURAL / GENERATION

OBJECTIVES:

1. Demonstrate how to evaluate game concepts


2. Demonstrate an understanding of various tools that are used in game development
3. Demonstrate an understanding of the game development process
4. Demonstrate an understanding of 3D computer environments
5. Demonstrate an understanding of game development tools
6. Demonstrate an understanding of how to analyze the different uses of textures
7. Demonstrate an understanding of level design, creation tools, and editors
Week 6: SKELETAL ANIMATION AND SKINNING / PROCEDURAL / GENERATION

Local and Global Pose Transformations: Recall from last time that, given a joint j
(not the root), its parent joint is denoted p(j). We assume that each joint j is
associated with two transformations, the local-pose transformation, denoted
T[p(j)←j], which converts a point in j’s coordinate system to its representation in its
parent’s coordinate system, and the inverse local-pose transformation, which
reverses this process. (These transformations may be represented explicitly, say, as
a ×4 4 matrix in homogeneous coordinates, or implicitly by given a translation
vector and a rotation, expressed, say as a quaternion.)
Week 6: SKELETAL ANIMATION AND SKINNING / PROCEDURAL / GENERATION

Meta-Joints: One complicating issue involving skeletal animation


arises from the fact that different joints have different numbers of
degrees of freedom. A clever trick that can be used to store joints
with multiple degrees of freedom (like a shoulder) is to break the
into two or more separate joints, one for each degree of freedom.
These meta-joints share the same point as their origin (that is, the
translational offset between them is the zero vector).
Week 6: SKELETAL ANIMATION AND SKINNING / PROCEDURAL / GENERATION

Motion Capture: For the common motion of humans and animals, the
easiest way to obtain animation data is to capture the motion from a
subject. Markers are placed on a subject, who is then asked to perform
certain actions (walking, running, jumping, etc.) By tracking the markers
using multiple cameras or other technologies, it is possible to reconstruct
the positions of the joints. From these, it is simple exercise in linear
algebra to determine the joint angles that gave rise to these motions.
Week 6: SKELETAL ANIMATION AND SKINNING / PROCEDURAL / GENERATION

Key-frame Generated: A design artist can use animation modeling software to


specify the joint angles. This is usually done by a process called key framing,
where the artists gives a detailed layout of the model at certain “key” instances in
over the course of the animation, called key frames. (For example, when animating
a football kicker, the artist might include the moment when the leg starts to swing
forward, an intermediate point in the swing, and the point at which the leg is at its
maximum extension.) An automated system can then be used to smoothly
interpolate the joint angles between consecutive key frames in order to obtain the
Week 6: SKELETAL ANIMATION AND SKINNING / PROCEDURAL / GENERATION

Goal Oriented/Inverse kinematics: In an ideal world, an animator could


specify the desired behavior at a high level (e.g., “a character approaches a table
and picks up a book”). Then the physics/AI systems would determine a natural-
looking animation to achieve this. This is quite challenging. The reason is that
the problem is under-specified, and it can be quite difficult to select among an
infinite number of valid solutions. Also, determining the joint angles to
achieve a particular goal reduces to a complex nonlinear optimization problem.
 
Week 6: SKELETAL ANIMATION AND SKINNING / PROCEDURAL / GENERATION

Representing Animation Clips: In order to specify an animation, we need to specify


how the joint angles or generally the joint frames vary with time. This can result in a
huge amount of data. Each joint that can be independently rotated defines a degree of
freedom in the specification of the pose. For example, the human body has over 200
degrees of freedom! (It’s amazing to think that our brain can control it all!) Of course,
this counts lots of fine motion that would not normally be part of an animation, but
even a crude modeling of just arms (not including fingers), legs (not including toes),
torso, neck involves over 20 degrees of freedom.
Week 6: SKELETAL ANIMATION AND SKINNING / PROCEDURAL / GENERATION

Event triggers: These are discrete signals sent to other parts of the game
system. For example, you might want a certain sound playback to start with a
particular event (e.g., footstep sound), a display event (e.g., starting a particle
system that shows a cloud of dust rising from the footstep), or you may want
to trigger a game event (e.g., a non-playing character ducks to avoid a
punch).
Week 6: SKELETAL ANIMATION AND SKINNING / PROCEDURAL / GENERATION

Continuous information: You may want some process to adjust


smoothly as a result of the animation. An example would be having the
camera motion being coordinated with the animation. Another
example would be parameters that continuously modify the texture
coordinates or lighting properties of the object. Unlike event triggers,
such actions should be smoothly interpolated.
Week 6: SKELETAL ANIMATION AND SKINNING / PROCEDURAL / GENERATION

Skinning and Vertex Binding: Now that we know how to specify the
movement of the skeleton over time, let us consider how to animate the
skin that will constitute the drawing of the character. The first question
is how to represent this skin.
Week 6: SKELETAL ANIMATION AND SKINNING / PROCEDURAL / GENERATION

Multiple Joint Binding with Weights: The trick is to allow each


vertex of the mesh to be bound to multiple joints. When this is done,
each joint to which a vertex is bound is assigned a weighting factor,
that specifies the degree to which this joint influences the movement
of the vertex.
Week 6: SKELETAL ANIMATION AND SKINNING / PROCEDURAL / GENERATION

Moving the Joints: In order to derive the computations needed to


move a vertex from its initial position to its final position, let’s start by
introducing some notation. First, recall that our animation system
informs us at any time t the current angle for any joint. Abstractly, we
can think of this joint angle as providing a local rotation, jR(t), that
specifies how joint j has rotated.
Week 6: SKELETAL ANIMATION AND SKINNING / PROCEDURAL / GENERATION

Putting it all Together: Finally, let’s consider how to apply blended


skinning together with the dynamic pose transformations. This will
tell us where every vertex of the mesh is mapped to in the current
animation. We assume that for the current-pose transformation T (t)
[M ←j] has been computed for all the joints, and we assume that each
vertex v is associated with a list of joints and associated weights.
Week 6: SKELETAL ANIMATION AND SKINNING / PROCEDURAL / GENERATION

Matrix palette: In order to blend every vertex of the model, we need only one vertex
for each joint of the skeleton, namely the skinning matrices Kj(t). Recall that a
skeleton will have perhaps tens of joints, while it may have hundreds of vertices.
Assuming that the joint are indexed by integers, the palette can be passed to the GPU
as an array of matrices.

Vertex information: Each vertex is associated with a small list of joint indices and
weights. In particular, we do not need to associate entire matrices with individual
vertices.
Week 6: SKELETAL ANIMATION AND SKINNING / PROCEDURAL / GENERATION

Shortcomings of Blended Skinning: While the aforementioned


technique is particularly well suited to efficient GPU implementation, it
is not without its shortcomings. In particular, if joints are subjected
to high rotations, either in flexing or in twisting, the effect can be to
cause the skin to deform in particular unnatural looking ways.
Week 6: SKELETAL ANIMATION AND SKINNING / PROCEDURAL / GENERATION

Procedural Generation: 1D Perlin Noise

Procedural Generation: Complex AAA games hire armies of designers to create


the immense content that make up the game’s virtual world. If you are designing a
game without such extensive resources, an attractive alternative for certain natural
phenomena (such as terrains, trees, and atmospheric effects) is through the use of
procedural generation. With the aid of a random number generator, a high quality
procedural generation system can produce remarkably realistic models.
Week 6: SKELETAL ANIMATION AND SKINNING / PROCEDURAL / GENERATION

Perlin Noise: Natural phenomena derive their richness from random


variations. In computer science, pseudo-random number generators
are used to produce number sequences that appear to be random.
These sequences are designed to behave in a totally random manner,
so that it is virtually impossible to predict the next value based on the
sequence of preceding values.
Week 6: SKELETAL ANIMATION AND SKINNING / PROCEDURAL / GENERATION

Layering Noise: Our noise function is continuous, but there is no self-


similarity to its structure. To achieve this, we will need to combine the
noise function in various ways. Our approach will be similar to the
approach used in the harmonic analysis of functions.
Week 6: SKELETAL ANIMATION AND SKINNING / PROCEDURAL / GENERATION

Wavelength: The distance between successive wave crests

Frequency: The number of crests per unit distance, that is, the
reciprocal of the wavelength

Amplitude: The height of the crests

You might also like