Computer Graphics Soft Body Animation Skinning - PowerPoint PPT Presentation

1 / 13
About This Presentation
Title:

Computer Graphics Soft Body Animation Skinning

Description:

When they bend, the body shape bends as well. No distinct parts ... Soft body models require considerable extra detail per-vertex from the modellers ... – PowerPoint PPT presentation

Number of Views:152
Avg rating:3.0/5.0
Slides: 14
Provided by: lauren80
Category:

less

Transcript and Presenter's Notes

Title: Computer Graphics Soft Body Animation Skinning


1
Computer GraphicsSoft Body Animation - Skinning
  • CO2409 Computer Graphics
  • Week 22

2
Lecture Contents
  • Rigid Body vs Soft Body
  • Skeletons
  • Bone Influences / Vertex Weights
  • Vertex Blending
  • Technical Considerations

3
Rigid Body Limitations
  • Rigid body models are suitable for models made of
    distinct rigid parts
  • We have looked at the example of a mechanical arm
  • However, consider human joints
  • When they bend, the body shape bends as well
  • No distinct parts
  • We cannot represent this with rigid bodies
  • Or the pieces would separate, where there should
    be stretching or compression

4
Soft Body Animation
  • Such models are called soft-bodied
  • Implying that the pieces of the model can stretch
    and flex
  • Examples of soft body models
  • Humans, animals, aliens and other creatures
  • As well as other living organisms plants, trees
  • Also clothing and material, rubber-like objects
    etc.
  • This flexibility means there may not be a clear
    distinction between different pieces the geometry
  • In the previous picture, the leg is a single
    piece of geometry, though it clearly has two
    parts
  • How can we handle this?

5
Skeletons (Bones)
  • Note that these soft-bodied models appear to have
    hierarchies, much like rigid bodies
  • So we can define an independent hierarchy of
    bones assumed to lie within the geometry
  • This is called a skeleton
  • Analogous to a human skeleton
  • The movement of the bones drives the overlaid
    geometry
  • Parts of the geometry bend and flex depending on
    the nearby bones

6
Skeletons within Geometry
  • The geometry itself is often a single part
  • But it can have a hierarchy (different from the
    skeleton)
  • So how to position the vertices as the bones
    move?
  • Most vertices do follow the bones, in the
    example
  • Dark blue follow the lower leg
  • Purple remain with the upper
  • But vertices at the joints are blended between
    positions
  • Cyan area stretched between upper lower leg
    position
  • Yellow area compressed

7
Bone Influences / Vertex Weights
  • More precisely, we consider the influence of each
    bone on each vertex
  • The strength of the influence is a value from 0-1
  • Varies for each vertex and is called the vertex
    weight
  • Consider the influence of the lower leg bone
  • The purple vertices get a vertex weight of 0
  • Not affected by the lower leg
  • The dark blue vertices get 1
  • They follow the lower leg bone
  • The shaded areas have weights ranging from 0 to 1
  • Increasing closer to the lower leg

8
Bone Influences / Vertex Weights
  • For each vertex, the sum of the weights from all
    the influencing bones 1.0
  • E.g. A kneecap vertex may have two influences, an
    0.2 weight from the upper leg, 0.8 from the lower
    leg
  • In practice, most vertices are influenced by a
    small number of bones (around 1 to 4)
  • Here, most of the leg vertices have one
    influence, the joints areas two
  • Areas like the hips or shoulders may have more
    influences
  • The bone influences and vertex weights are set up
    by the artists

9
Vertex Blending
  • Each bone in the skeleton hierarchy has a world
    matrix, just as with rigid bodies
  • Again stored relative to the parent
  • We can use a bones world matrix to transform the
    vertices it influences into world space
  • But vertices are affected by multiple bones
  • So calculate all the possible world space
    positions of a vertex, one for each bone that
    influences it
  • Then linearly blend these world positions using
    the vertex weights from each bone
  • Giving a final blended world position
  • The maths follows

10
Vertex Blending - Maths
  • If a vertex V is influenced by N bones with world
    matrices M1 to MN and vertex weights W1 to WN,
    then the blended world position P is given by
  • P VM1W1 VM2W2 VMNWN
  • E.g. A kneecap vertex (N 2, W1 0.2, W2 0.8)
  • Upper leg world pos VM1 (0.5, -1.5, 1.0)
    example
  • Lower leg world pos VM2 (1.0, -1.0, 0.5)
  • Then the final position is
  • P (0.5, -1.5, 1.0) 0.2 (1.0, -1.0, 0.5)
    0.8
  • (0.1, -0.3, 0.2) (0.8, -0.8, 0.5)
  • (0.9, -1.1, 0.7)

11
Overall Process
  • To implement vertex blending for soft-bodies we
    need to
  • Store a skeleton hierarchy with model geometry
  • Store additional data for every vertex
  • A list of influencing bones usually indices
    into the depth-sorted skeleton hierarchy
  • An associated list of vertex weights (floats)
  • Perform additional per-vertex processing
  • Calculate a set of world positions using the
    world matrices from all influencing bones
  • Blend these using the vertex weights for a final
    result

12
Technical Considerations
  • Using many matrices in a vertex shader is a
    burden
  • Need to keep the number of bones per-vertex to a
    minimum
  • Add this as a modelling constraint an upper
    limit
  • But also need to keep the number of bones
    per-primitive down
  • Possibly cut the geometry up into pieces that use
    a common set of bones

13
Technical Considerations
  • Soft body models require considerable extra
    detail per-vertex from the modellers
  • Scope for modelling problems
  • Often hidden until model animates
  • Also soft-body objects may form part of a rigid
    body hierarchy
  • In this case there will be two loosely related
    hierarchies - potentially overlapping tricky
  • Can be tricky to import / export / pre-process
    such models
  • Much scope for errors, technical and/or modelling
  • Need very well tested conversion processes and
    tools
Write a Comment
User Comments (0)
About PowerShow.com