Presentation is loading. Please wait.

Presentation is loading. Please wait.

Software Engineering and Game Development

Similar presentations


Presentation on theme: "Software Engineering and Game Development"— Presentation transcript:

1 Software Engineering and Game Development
Lecture Skeletal animation Software Engineering and Game Development Elias Holmlid

2 Today’s plan First, going to finish off what we did yesterday
Then... animation Keyframed animation Skeletal animation Elias Holmlid

3 Key framed animation Also called per-vertex animation or morph-target animation Define a few frames, then fill in the blanks (tweening) Elias Holmlid

4 Key framed animation on meshes
Static mesh model for each frame Only the key frames are exported Good for facial animation Used in Quake II and Quake III for example Elias Holmlid

5 Skeletal animation A hierarchical set of bones
Possible to blend different animations together (smooth run->idle for example) Elias Holmlid

6 Skeletal animation Each frame, we can represent the transform for each bone as a matrix This is called a matrix palette, i.e. an array of matrices Elias Holmlid

7 Skeletal animation Vertex blending
Each vertex in the mesh can be influenced by several bones Final position of vertices calculated as a weighted average of the influencing bones Thus, smooth transitions can be achieved at joints Usually, four bones / vertex is enough Each vertex contains blend indices and blend weights. Elias Holmlid

8 Skeletal animation Only bones... Elias Holmlid

9 Skeletal animation Skinned bones... Elias Holmlid

10 Inverse kinematics Find out how to rotate bones in order to end up at a desired position Elias Holmlid

11 Ragdoll physics Often used in death animations
Place constraints on how the skeleton’s bones can move in relation to each other Then use physical simulation on bones Elias Holmlid

12 Ragdoll Physics http://www.youtube.com/watch?v=gbuA-HEbROk
Elias Holmlid

13 Skeletal animation in XNA
.X and .FBX formats support skeletal animation .FBX concatenates all tracks into a single timeline .X supports more than one track I’ve had most luck using the kW X-port plugin for 3D-studio ( Elias Holmlid

14 Skeletal animation in XNA
Content pipeline needs to be extended Elias Holmlid

15 What has to be implemented?
Animated Model Processor ContentTypeWriter ContentTypeReader Classes for storing the data during runtime Compiled as a library Keyframe (stores a keyframe for one bone) AnimationData (stores one animation) AnimatedModelData (stores skeleton+all animations) Skinned Effect Elias Holmlid


Download ppt "Software Engineering and Game Development"

Similar presentations


Ads by Google