Object Animation CMT3317. Do you need to do animation? We consider ways of animating composite objects – that have a number of different parts e.g. a.

Slides:



Advertisements
Similar presentations
Department of nskinfo i-education
Advertisements

Animation Marco Gillies. Computer Animation Making things move A key aspect of computer graphics Non-realtime for films Realtime for virtual worlds and.
Animation in Video Games presented by Jason Gregory
Animation Parenting 1Copyright © Texas Education Agency, All rights reserved. Images and other multimedia content used with permission.
Transformations We want to be able to make changes to the image larger/smaller rotate move This can be efficiently achieved through mathematical operations.
Animation Following “Advanced Animation and Rendering Techniques” (chapter 15+16) By Agata Przybyszewska.
3D Graphics for Game Programming (J. Han) Chapter XI Character Animation.
Advanced Programming for 3D Applications CE Bob Hobbs Staffordshire university Data Structures for Human Motion Lecture 5.
Character Studio: Biped. Character Studio is a very powerful Plug-in for 3D Studio Max. aids in the creation of animation of two-legged and four-legged.
Character Setup Character Setup is the process of creating handles and controls for anything that a character animator will need to adjust in order to.
3D Game Programming All in One By Kenneth C. Finney.
Scenegraph. Scenegraph Nodes - all implement a run function Leaf/Geo Nodes - typedefs of sgNode superclass –Poly Mesh A geo node that stores a list of.
Chapter 3: Arrays, Linked Lists, and Recursion
Week 4 Lecture 3: Character Animation Based on Interactive Computer Graphics (Angel) - Chapter 10 1 Angel: Interactive Computer Graphics 5E © Addison-Wesley.
CSE 473 Dr. Charles B. Owen Fundamentals of 3D Game Development1 Skeletons and Skinning Bones and Skeletons Mesh Skinning.
CS 450: Computer Graphics 2D TRANSFORMATIONS
Introduction to 3D Graphics John E. Laird. Basic Issues u Given a internal model of a 3D world, with textures and light sources how do you project it.
Hierarchical Transformations Hierarchical Models Scene Graphs
Interactive Graphics Lecture 18: Slide 1 Interactive Computer Graphics Lecture 18 Kinematics and Animation.
Chapter 5.2 Character Animation. CS Overview Fundamental Concepts Animation Storage Playing Animations Blending Animations Motion Extraction Mesh.
Modeling and Animation with 3DS MAX R 3.1 Graphics Lab. Korea Univ. Reference URL :
Tree.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Kinematic Linkages.
Introduction to Data Structures. Definition Data structure is representation of the logical relationship existing between individual elements of data.
Brought to you by Max (ICQ: TEL: ) February 5, 2005 Advanced Data Structures Introduction.
Week 4 Lecture 1: Hierarchical Modeling Part 1 Based on Interactive Computer Graphics (Angel) - Chapter 10 1 Angel: Interactive Computer Graphics 5E ©
Hierarchical Modeling. Instance Transformation Start with a prototype object (a symbol) Each appearance of the object in the model is an instance – Must.
 The creation of moving pictures one frame at a time Literally 'to bring to life' e.g. make a sequence of drawings on paper, in which a character's position.
SE 313 – Computer Graphics Lecture 6: Transformations Lecturer: Gazihan Alankuş Please look at the last three slides for assignments (marked with TODO)
Business and Computing Deanery 3D Modelling Tools Week 3 Transformations, cloning and arrays, modifiers.
Kinematics Jehee Lee Seoul National University. Kinematics How to animate skeletons (articulated figures) Kinematics is the study of motion without regard.
CS-378: Game Technology Lecture #13: Animation Prof. Okan Arikan University of Texas, Austin Thanks to James O’Brien, Steve Chenney, Zoran Popovic, Jessica.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Computer Animation 고려대학교 컴퓨터 그래픽스 연구실.
Games Development 1 Review / Revision CO2301 Games Development 1 Semester 2.
Computer Graphics Matrix Hierarchies / Animation
CS 450: COMPUTER GRAPHICS ANIMATION SPRING 2015 DR. MICHAEL J. REALE.
Business and Computing Deanery 3D Modelling Tools Week 3 Transformations, cloning and arrays, modifiers.
Models & Hierarchies CSE167: Computer Graphics Instructor: Steve Rotenberg UCSD, Fall 2006.
Motion Graphs By Lucas Kovar, Michael Gleicher, and Frederic Pighin Presented by Phil Harton.
AVL Trees and Heaps. AVL Trees So far balancing the tree was done globally Basically every node was involved in the balance operation Tree balancing can.
1 More Trees Trees, Red-Black Trees, B Trees.
COMPUTER GRAPHICS CS 482 – FALL 2015 NOVEMBER 5, 2015 ANIMATION ANIMATION PROCESSES INTERPOLATION-BASED ANIMATION HARDWARE ISSUES KINEMATICS DYNAMICS.
Design Visualization Software Introduction / Review.
The Stingray Example Program CMT3311. Stingray - an example 2D game May be useful as a simple case study Most 2D games need to solve generic problems.
CGDD 4003 Character Animation. The Skeletal Hierarchy (aka the “rig”) Based on the concept of bones Each bone has exactly one parent Each bone has a transform.
Velocity Propagation Between Robot Links 3/4 Instructor: Jacob Rosen Advanced Robotic - MAE 263D - Department of Mechanical & Aerospace Engineering - UCLA.
Autodesk Inventor 10 Update Class
Graphical Output Basic Images.
MOM! Phineas and Ferb are … Aims:
COMP261 Lecture 23 B Trees.
COMPUTER GRAPHICS CHAPTER 35 CS 482 – Fall 2017 ANIMATION
Data Structures: Disjoint Sets, Segment Trees, Fenwick Trees
Computer Animation cgvr.korea.ac.kr.
Computer Animation Ying Zhu Georgia State University
3D Part3 CMT3317.
Bones Skeletal Unity-2D How & When
Ogre Overview.
Assignment 8 Chess Game.
Introduction to 3D Art and Animation
Kei Chibazakura and Nathan Harger
CSC4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University Transformations.
Skeletons and Skinning
Chapter XIII Character Animation
Prepared by: Engr . Syed Atir Iftikhar
Hierarchical Modeling & Constructive Solid Geometry
Computer Animation Displaying animation sequences raster animation
Dr. Chih-Kuo Yeh 葉智國 Computer Graphics Dr. Chih-Kuo Yeh 葉智國
Game Programming Algorithms and Techniques
Games Development 1 Review / Revision
Computer Graphics Matrix Hierarchies / Animation
Presentation transcript:

Object Animation CMT3317

Do you need to do animation? We consider ways of animating composite objects – that have a number of different parts e.g. a person, a tank You may want to do this for the second cswk or not – depends entirely on you and your game design

We consider Model cycling –Easiest to do, very simple, most likely to be used Articulated model animation –A bit harder, a bit better, more work, might use it Animating a skinned boned model –A lot harder, needs good animation skills, the best, but no simple demonstration, unlikely to use it

Model cycling Just like 2D image cycling (e.g. using sprite sheets) but uses 3D models instead Create a number of models and render the appropriate one at the appropriate time

Class ModelCycleObject This class is similar to the AnimatedSprite class It has a list of 3d models that it uses for animation It is used to build a green guy, who can perform a number of behaviours depending on his current state

Finite state machine of a GreenGuy

ModelCycleObject In the walk state he walks a distance down the z axis cycling between left walk, standing and right walk models In the jump state he does two continuous jumps In the look state he merely billboards to look at the camera In the sleep state he rotates increasingly position while flipping between two sitting models In the dead state the dead model is drawn

ModelCycleObject – class variables

ModelCycleObject – Update

ModelCycleObject – look

ModelCycleObject – jump

ModelCycleObject – sleep

ModelCycleObject – walk

Look at GreenGuys1.zip

Green Guys In this step a manager class that holds an array of green guys is created A bounding sphere variable is added to the ModelCycleClass to enable collision detection You can then drive over the green guys in the car

Green Guys Collision detection is done in the Game1.cs Update() function after reading input and possibly having moved the car, and updating the guys Look at GreenGuys2.zip

Synchronised guys

Unsynchronised

Articulated Object Animation Objects made of rigid segments which can rotate at their joints, like people Segments lower down the chain inherit the rotation and translation of segments higher up E.g. if you move your thigh your shin and foot will also move Such objects are hierarchies, the top of the hierarchy is the root, other segments are children

One legged teapot

Forward kinematics In forward kinematics animation is achieved by starting at the root and descending the hierarchy applying transformations on joints as you go This is tedious from a programming point of view you may well be happier just using model cycling if you need animation Tedious because nearly all transformation sequences are non-linear and hard to model in a program

Create a model Use Max to create a model, e.g. a leg Shown in left view, with a blue thigh, green shin, and orange foot

Procedure You need to set the pivot points for each component correctly You need to save components individually Save your model in MAX format first

Thigh pivot point Thigh pivot point needs to be at top of thigh Therefore position it with the top over the origin in MAX Delete the shin and foot to save the thigh individually, export to.x format

Shin Reload the leg, delete the thigh and foot Move the shin up over the origin in the top view to set the correct pivot point Process foot in a similar manner

Body Articulated object hierarchy needs a root object Create a torso for your leg to attach to In this case we used a teapot for convenience We create a class TorsoTwoLegs (which will be a torso – the teapot- which will have two legs for walking But first we need a class to represent a node in an articulated heirarchy

Class ArticulatedObjectNode A node in an articulated model can either be a root node or a child node This class is subclassed from SimpleObject and has a variable ‘parent’ to store its parent node The parent for the root node is set to null, the parent node for a child will be set to that child’s parent This class also has a matrix for its own rotation and another matrix to store the rotation of its parent

Class ArticulatedObjectNode

The class has a function to set the parent node In the classes’ Draw() function if the node is the root node ( its ‘parent’ variable is set to null) it draws as usual Otherwise it multiplies on the parent matrix before the child transformations

Class ArticulatedObjectNode

The class has a function to make it translate along the path of a circle The teapot will be simply translated whilst the legs will be animated to simulate walking The class has a function to rotate around the x axis as this is how the thighs and knees will be animated – around the local x axis

Class ArticulatedObjectNode

Class TorsoTwoLegs Having defined the class needed for an articulated structure, and 3D models needed We need a class to represent the walking teapot and to implement it’s animation It will have a torso, and a thigh, shin, and foot for each leg (are defined as class variables are counters needed for animation)

Class TorsoTwoLegs

Initialise Recall that the leg components were moved to the origin in MAX to set the pivot points Therefore we need to translate them to their correct positions in the program We can work out where the objects end by checking in MAX

Object size in MAX Put cursor a point where new object will join in top window At the bottom of the screen the 3 numbers to the left of grid show the cursor position E.g the bottom of the thigh is at ~-23 in the y from the origin

Initialize()

Update() A function is defined to make each component walk, called from the update function The feet aren’t animated so there are no functions for them

Animate the torso Only the torso is allowed to translate, it ‘drags’ the legs along with it The torso makes the object walk in a circle by rotating and translating

Animate leg components Each of the leg components had to perform local rotation around it’s axis A local static variable is defined and used as a counter, –e.g. the thigh rotates -4 degs for first 15 cycles 4 degs for next 15 cycles 2 degs for next 15 cycles -2 degs for next 15 cycles

Animate leg components Other leg components are dealt with in a similar way The result is reminiscent of walking or skating Hard to get right by programming Transformation sequence should be non- linear rather than linear

Continuous Animation Results

See Articulated.zip

Skinned Mesh A skinned mesh is a mesh which has been animated with a bone system A bone system is an articulated hierarchy (as described earlier) However the bones are not rendered, the mesh is linked to the bone system Allows the mesh to be stretched and deformed naturally Look at the skinned mesh example D3D8 program

Bones, bones and mesh, skinned mesh

Skinned Mesh The D3D example was created with the Character Studio plugin Which allows you to easily animate bipeds Support for keyframe animation is provided in D3D via Animations and AnimationSets You are unlikely to be able to get on top of this material in time for the cswk.