Skinning CS418 Computer Graphics John C. Hart. Simple Inverse Kinematics Given target point (x,y) in position space, what are the parameters ( ,  )

Slides:



Advertisements
Similar presentations
Animation in Video Games presented by Jason Gregory
Advertisements

Computer Graphics 2D & 3D Transformation.
Links and Joints.
Denavit-Hartenberg Convention
Kinematics & Grasping Need to know: Representing mechanism geometry Standard configurations Degrees of freedom Grippers and graspability conditions Goal.
3D Graphics for Game Programming (J. Han) Chapter XI Character Animation.
Forward and Inverse Kinematics CSE 3541 Matt Boggus.
Linear Blend Skinning.
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.
1cs426-winter-2008 Notes  Collision notes part 1 (primitive operations) should be up on the weekend.
Screw Rotation and Other Rotational Forms
Design Realization lecture 7 John Canny 9/15/03. Preamble  Blog for Maya is up now, but you need to be added as an author. Mail one of the current authors.
Week 4 Lecture 3: Character Animation Based on Interactive Computer Graphics (Angel) - Chapter 10 1 Angel: Interactive Computer Graphics 5E © Addison-Wesley.
Linear Algebra Review CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2005.
2IV60 Computer Graphics 2D transformations
CAP4730: Computational Structures in Computer Graphics
CSE 473 Dr. Charles B. Owen Fundamentals of 3D Game Development1 Skeletons and Skinning Bones and Skeletons Mesh Skinning.
2D Transformations. World Coordinates Translate Rotate Scale Viewport Transforms Hierarchical Model Transforms Putting it all together.
Animation CMSC 435/634. Keyframe Animation From hand drawn animation – Lead animator draws poses at key frames – Inbetweener draws frames between keys.
Algirdas Beinaravičius Gediminas Mazrimas.  Introduction  Motion capture and motion data  Used techniques  Animating human body  Problems.
Algirdas Beinaravičius Gediminas Mazrimas.  Introduction  Motion capture and motion data  Used techniques  Animating human body  Problems  Conclusion.
The linear algebra of Canadarm
An Introduction to Robot Kinematics
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology 3D Engines and Scene Graphs Spring 2012.
Advanced Graphics (and Animation) Spring 2002
Computer Graphics Group Tobias Weyand Mesh-Based Inverse Kinematics Sumner et al 2005 presented by Tobias Weyand.
Geometric Transformation. So far…. We have been discussing the basic elements of geometric programming. We have discussed points, vectors and their operations.
Graphics Graphics Korea University kucg.korea.ac.kr Transformations 고려대학교 컴퓨터 그래픽스 연구실.
2D Transformations.
CSC418 Computer Graphics n Animation Principles n Keyframe Animation.
Week 5 - Wednesday.  What did we talk about last time?  Project 2  Normal transforms  Euler angles  Quaternions.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Kinematic Linkages.
1 CS 430/536 Computer Graphics I 3D Transformations World Window to Viewport Transformation Week 2, Lecture 4 David Breen, William Regli and Maxim Peysakhov.
Hierarchical Modeling. Instance Transformation Start with a prototype object (a symbol) Each appearance of the object in the model is an instance – Must.
Hierarchical Modeling CS418 Computer Graphics John C. Hart.
Algirdas Beinaravičius Gediminas Mazrimas.  Introduction  Motion capture and motion data  Used techniques  Animating human body  Problems  Conclusion.
16/5/ :47 UML Computer Graphics Conceptual Model Application Model Application Program Graphics System Output Devices Input Devices API Function.
Transformational Geometry CS418 Computer Graphics John C. Hart.
Algirdas Beinaravičius Gediminas Mazrimas.  Introduction  Motion capture and motion data  Used techniques  Animating human body  Problems  Conclusion.
Just a quick reminder with another example
1/50 CS148: Introduction to Computer Graphics and Imaging Transforms CS148: Introduction to Computer Graphics and Imaging Transforms.
ECE 450 Introduction to Robotics Section: Instructor: Linda A. Gee 10/07/99 Lecture 11.
CS 450: COMPUTER GRAPHICS ANIMATION SPRING 2015 DR. MICHAEL J. REALE.
Animation CS418 Computer Graphics John C. Hart.
3-D Transformational Geometry CS418 Computer Graphics John C. Hart.
Skeletal Animation and Skinning A (hardware friendly) software approach By: Brandon Furtwangler.
University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell Hierarchical Modeling.
1cs426-winter-2008 Notes. 2 Kinematics  The study of how things move  Usually boils down to describing the motion of articulated rigid figures Things.
Learning Objectives Affine transformations Affine transformations Translation Translation Rotation Rotation Scaling Scaling Reflection Reflection Shear.
KINEMATICS ANALYSIS OF ROBOTS (Part 5). This lecture continues the discussion on the analysis of the forward and inverse kinematics of robots. After this.
CS559: Computer Graphics Lecture 13: Hierarchical Modeling and Curves Li Zhang Spring 2010.
3D GRAPHICS RENDERING PIPELINE CS / TECHNICAL BACKGROUND PAGE 11.
Geometric Transformations Ceng 477 Introduction to Computer Graphics Computer Engineering METU.
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.
Rotation about Arbitrary Axis oOften we need rotation about a vector U that is not a coordinate axis (not X, nor Y, nor Z) and may not pass through the.
Denavit-Hartenberg Convention
Denavit-Hartenberg Convention
Bones Skeletal Unity-2D How & When
F o r w a r d K i n e m a t i c s.
Skeletons and Skinning
Computer Animation and Visualisation Lecture 4. Skinning
Real-time Skeletal Skinning with Optimized Centers of Rotation
Transformations IV Week 3, Wed Jan 20
Chapter XIII Character Animation
Transformations 고려대학교 컴퓨터 그래픽스 연구실 kucg.korea.ac.kr.
Prepared by: Engr . Syed Atir Iftikhar
UMBC Graphics for Games
Transformations IV Week 3, Wed Jan 23
Hierarchical Modeling
CSCE 441: Computer Graphics: Hierarchical Models
Presentation transcript:

Skinning CS418 Computer Graphics John C. Hart

Simple Inverse Kinematics Given target point (x,y) in position space, what are the parameters ( ,  ) in configuration space that place the hand on the target point? Use Law of Cosines to find  d 2 = a 2 + b 2 – 2ab cos  cos  = (a 2 + b 2 – d 2 )/2ab cos  = (a 2 + b 2 – x 2 – y 2 )/2ab And to find  cos  = (a 2 + d 2 – b 2 )/2ad cos  = (a 2 + x 2 + y 2 – b 2 )/2ad Use arctangent to find  then   = atan2(y,x)  =  –  (0,0)  a b (x,y)(x,y)  a b (x,y)(x,y) d   a (x,y)(x,y) d  

Skinning Elbow joints don’t look realistic because geometry detaches Transformation hierarchy: –R(  1 ) rotates upper-arm cylinder about its shoulder at the origin –M 1 moves upper-arm cylinder from the origin to its position in world coordinates –R(  2 ) rotates forearm cylinder about its elbow at the origin –M 2 moves forearm elbow from the origin to the end of the upper-arm cylinder when its shoulder is based at the origin When  2  0 the elbow end of the upper-arm does not align with the elbow end of the forearm M1R(1)M1R(1) M 1 R(  1 ) M 2 M 1 R(  1 ) M 2 R(  2 ) R(2)R(2) M 2 R(  2 )

Skinning Solution is to interpolate matrices from the undetached coordinate frame into the correctly oriented coordinate frame per-vertex Let M straight = M 1 R(  1 ) M 2 R(  ) M bent = M 1 R(  1 ) M 2 R(  2 ) Distribute (“paint”) weights w on vertices of forearm cylinder –w = 0 at elbow end –w = 1 after elbow Transform vertices using M(w) = (1 – w) M straight + w M bent M1R(1)M1R(1) M 1 R(  1 ) M 2 R(  ) M 1 R(  1 ) M 2 R(  2 ) M 1 R(  1 ) M 2 R( 1 / 3  2 ) M 1 R(  1 ) M 2 R( 2 / 3  2 ) w = 1/3 w = 2/3 w = 1

Build an Elbow glPushMatrix(); glColor3f(0,0,1); glTranslatef(0,-2,0); drawquadstrip(); glPopMatrix(); glPushMatrix(); glColor3f(1,1,0); glRotatef(elbow,0,0,1); glTranslate(0,0,2); drawquadstrip(); glPopMatrix();

Two Coordinate Systems glPushMatrix(); glColor3f(0,0,1); glTranslatef(0,-2,0); drawquadstrip(); glColor3f(1,1,0,.5) glTranslatef(0,4,0); drawquadstrip(); glPopMatrix(); glPushMatrix(); glRotatef(elbow,0,0,1); glColor3f(1,1,0); glTranslatef(0,0,2); drawquadstrip(); glColor3f(0,0,1,.5); glTranslatef(0,0,-4); drawquadstrip(); glPopMatrix(); Blue limb in yellow limb’s coordinate system Yellow limb in blue limb’s coordinate system

Interpolate the Transformations for (i = 0; i < 8; i++) { weight = i/7.0; glPushMatrix(); glRotatef(weight*elbow,0,0,1); glTranslate3f(0,0,-3.5+i); drawquad(); glPopMatrix(); }

Interpolate the Vertices glBegin(GL_QUAD_STRIP); for (i = 0; i <= 8; i++) { weight = i/8.0; glColor3f(weight,weight,1-weight); glPushMatrix(); glRotatef(weight*elbow,0,0,1); glVertex2f(-1,-4.+i); glVertex2f(1,-4.+i); glPopMatrix(); } glEnd(/*GL_QUAD_STRIP*/);

Interpolate the Matrices glLoadIdentity(); glGetMatrixf(A); glRotatef(elbow,0,0,1); glGetMatrixf(B); glBegin(GL_QUAD_STRIP); for (i = 0; i <= 8; i++) { weight = i/8.0; glColor3f(weight,weight,1-weight); C = (1-weight)*A + weight*B; glLoadIdentity(); glMultMatrix(C); glVertex2f(-1,-4.+i); glVertex2f(1,-4.+i); } glEnd(/*GL_QUAD_STRIP*/);

Matrix Palette Skinning Each vertex has one or more weight attributes associated with it Each weight determines the effect of each transformation matrix “Bones” – effect of each transformation is described by motion on bone from canonical position Weights can be painted on a meshed model to control effect of underlying bone transformations (e.g. chests, faces)

Interpolating Matrices Skinning interpolates matrices by interpolating their elements Identical to interpolating vertex positions after transformation We’ve already seen problems with interpolating rotation matrices Works well enough for rotations with small angles Rotations with large angles needs additional processing (e.g. polar decomposition) Quaternions provide a better way to interpolate rotations… From: J. P. Lewis, Matt Cordner, and Nickson Fong. “Pose space deformation: a unified approach to shape interpolation and skeleton-driven deformation.” Proc. SIGGRAPH 2000 (aA + bB)p = a(Ap) + b(Bp) a,b = weights A,B = matrices p = vertex position