Computer Anmaton and Vsualsaton Lecture 4. Rggng / Sknnng Taku Komura
Overvew Sknnng / Rggng Background knowledge Lnear Blendng How to decde weghts? Example-based Method Anatomcal models
Sknnng Assume the movements of the skeleton s determned The character s skn must deform accordng to the moton of the skeleton Ths process s called sknnng http://www.youtube.com/watch?v=dnwvu55pec&feature=related http://www.youtube.com/watch?v=zqwbdk8mca&feature=related
Background A homogeneous transformaton matrx M (4x4) s defned per bone It represents the pose of the bone It converts local coordnates to world coordnates l l l g g g z y x M z y x l l l z y x
Translaton matrx z y x t t t M z y x t t t global coord local coord
Rotaton matrx For Euler angles n the order of x, y, z, the matrx can be computed by Rot x ( ) Rot ( ) Rot ( ) y z
Translaton & Rotaton matrx R R t M R : rotaton part (3x3) t : translaton vector (3x) t
What s the local-to-world transformaton matrx? What s the poston of pont A n the world coordnate system?
2 4 3 So the locaton of the pont n the world s (4,2,)
What s the local-to-world transformaton matrx? What s the poston of pont A n the world coordnate system?
4 3 So the locaton of the pont n the world s (4,,)
A local-to-global transformaton for a hand v ˆ T R T R T R v M v 3 2 2 3 3 3 3 A body composed of three segments A vertex v3 defned n a local coordnate system of segment 3 Its global poston v s computed by the above equaton ˆ
A global-to-local transformaton for a hand vˆ T R T R T R 2 2 3 3 3 3 v M v 3 Gven the global locaton, the local coordnate of the pont can be the above equaton
For robots, ths s fne Compute the local-to-global matrx for all body segments : M Multply the local coordnates v of every body segment to ths matrx to calculate ts global poston : v M vˆ Then, the global poston of all the ponts can be computed
What about polygon characters? Problem. We are only gven the polygon no skeleton structure Problem 2. Some ponts on the body do not belong to a sngle bone but to multple bones close to t
Soluton: Rggng Fttng the skeleton nto the polygon model (done manually) http://www.youtube.com/watch?v=y5efir_bnue
Rest Pose to Bone Coordnate the global poston of a partcular vertex, v, n the rest pose s defned vˆ The transformaton matrx (local to global) assocated wth bone n the rest pose s defned Mˆ
Rest Pose to Bone Coordnate for each bone,, the poston of the vertex n the rest pose s frst transformed from model coordnates ( vˆ ) to bone coordnates ( vˆ ) by applyng the nverse of the rest pose bone transformaton: vˆ Mˆ vˆ vˆ
vˆ Rest Pose to Bone Coordnate: center of (.7,.5,) elbow jont Example Mˆ.7.5 ˆ (.8,.45,) v
Rest Pose to Bone Coordnate ˆ (.8,.45,) v.5.7 ˆ M vˆ.5..45.8.5.7.45.8.5.7 ˆ ˆ ˆ v M v
Bone Coordnate to World Coordnate The vertex n bone coordnates, vˆ s then transformed back nto world coordnates by applyng the transformaton of the bone n the new pose v M : M vˆ M Mˆ vˆ the local - to - global n the new posture matrx
Problem 2: For some ponts, we don t know to whch body segment t belongs to For the ponts near the elbow jont, t mght belong to the upper arm, or the forearm or maybe both We want both segments to affect ts movements
Soluton: Lnear Blendng Lnear Blendng determnes the new poston of a vertex by lnearly combnng the results of the vertex transformed rgdly wth each bone. A scalar weght, w, s gven to each nfluencng bone and the weghted sum gves the vertex s poston, v, n the new pose, as follows: v b b w ˆ M ˆ M v w b s the number of bones nfluencng the poston of v
(4,) (,) What s the poston of pont A after the elbow s bent 9 degrees? assumng t s a pont of the upper arm assumng t s a pont of the forearm Assumng the weght s.8 for the upperarm and.2 for the forearm
(4,) (,) Assumng t s a pont of the upper arm, the poston s (3,) assumng t s a pont of the forearm, t s (5,) Assumng the weght s.8 for the upper-arm and.2 for the forearm, the poston s.8*(3,)+.2*(5,) =(3.4, )
How to decde the weghts? Decde the mappng of the vertex to the bone If vertex v s n the mddle of bone, then w and for the rest w j If the vertex s near the border of bone and +, w wll gradually decrease to and w+ wll gradually ncrease to If the vertex s affected by more than three bones, the weght can be determned accordng to ts dstance to each bone
Problems wth Lnear Blendng The meshes exhbt volume loss as jonts are rotated to extreme angles. These are called jont collapse and candy wrapper effect Smple lnear blendng n the Cartesan space causes the artefacts
Why does t happen?
Why does t happen?
One Smple Soluton Fnd the closest jont from the vertex Use ths jont poston as the rotaton center for both body parts Interpolate along the arc (can use quaternon nterpolaton, SLERP, see notes of lecture ) Works well for 2 bones
How to decde the weghts? Example: use the Eucldean dstance Surround the bones by the nner and outer capsules If the vertex s nsde only one nner capsule, the weght for the correspondng bone s, and the rest are If nsde multple nner capsules, compute the dstance to each bone, and use that to decde the weghts (longer dstance, lower weght)
How to decde the weghts? Example: use the Eucldean dstance Surround the bones by the nner and outer capsules If the vertex s nsde only one nner capsule, the weght for the correspondng bone s, and the rest are If nsde multple nner capsules, compute the dstance to each bone, and set the weghts nverse proportonal to the dstance wth normalzaton w 2 2 d d, w d d d 2 d 2
How to decde the weghts? Example: use the Eucldean dstance If nsde the nner capsule of one and n outer capsule of the other, use the dstance agan but wth a fall-off wth the other.e. 2 2 2 2 2 2 2, d d f d d d f w d d f d d w 2 2 x f x f functon :fall- off f(x) r r x-r - f(x) r f(x) r f(x)
Some advanced stuff Automatc computaton of the weghts from examples examples w Automatc skeleton fttng / extracton
Automatcally computng weghts Tran such that the weghts provde the closest possble geometrc ft to a tranng set of example poses. Computng the weghts from examples As ths system wll lkely be over-constraned, t s solved n a least-squares sense to provde the closest approxmaton to the examples. w
Decdng Parameters from Examples We have the example vertex postons poses j We need to estmate the weghts w arcmn v v, v w w n j ej ej 2 e b v ej for dfferent M Mˆ vˆ From lnear blendng From examples vˆ s computed from one of the pose and nsertng the bone structure
Anatomcal models Model the body by Muscles Fat Skn
Method. When the jonts are bent, the muscles contract 2. The dstance between the orgn and nserton pont decreases 3. The volume of the muscles are kept the same, so they pump up 4. The skn s deformed to cover the muscles
Vsble Human Project Many anatomcal models are based the Vsble Human Project dataset Two cadavers slced at mlmeter ntervals from the top to the bottom and photographed by cameras The CT scans and MRI mages were also taken http://www.nlm.nh.gov/research/vsble/vsbl e_human.html http://www.youtube.com/watch?v=wp2hnpsmyo
Sknnng Summary Lnear Blendng Example-based weght estmaton Anatomcal models
Readngs Sknnng A Comparson of Lnear Sknnng Technques for Character Anmaton Afrgraph 27 Mult-Weght Envelopng: Least-Squares Approxmaton Technques for Skn Anmaton Wang and Phllps, SCA 2 http://portal.acm.org/ctaton.cfm?d=545283 Guessng the weghts from examples Alex Mohr Mchael Glecher Buldng Effcent, Accurate Character Skns from Examples. SIGGRAPH 23 Automatc Rggng and Anmaton of 3D Characters Ilya Baran Jovan Popov c, SIGGRAPH 27 http://www.mt.edu/~baran/autorg/pnoccho.html Geometrc Sknnng wth Approxmate Dual Quaternon Blendng, SIGGRAPH 28