character animation - computer science and...

14
Character Animation Character Animation

Upload: lemien

Post on 27-Jul-2018

251 views

Category:

Documents


0 download

TRANSCRIPT

Character AnimationCharacter Animation

Keep in Mind!

• You cannot use Unity to design characters or their motionstheir motions.

• Characters and motions must be designed elsewhere (like Maya or Blender) and thenelsewhere (like Maya or Blender), and then imported into Unity.

• You can find many free characters from Unity• You can find many free characters from Unity asset store.

• You can use Unity to control animation (Your• You can use Unity to control animation. (Your Lab assignment!) 

Physically Based Character Animation• A character is made of linked rigid bodies.

Head (mass inertia )Head (mass, inertia, …)

Chest Joint(The place where two body parts meet)

No matter how body moves, the parts stay connected at the joint. (Articulated body)

Physically Based Character Animation

• The only motion allowed at eachThe only motion allowed at each joint is rotation.

• So an easier way to model the• So an easier way to model the articulated body is to model the rotation angles at the joints.

• Some joints have more freedoms to rotate than others.

• A joint angle also have a limit.

Physically Based Character Animation

• You can use physics to simulate the character body without muscle f (R d ll)forces (Ragdoll). 

• Some games use it to animate dead characters.

• See the in‐class example.

Problem?

• If we can get the muscle/joint forces of a human being we can animate itbeing, we can animate it.

• But how can we know the forces?• But how can we know the forces?

• In the real world we are driven by the goals• In the real world, we are driven by the goals.– Target: Grab the cellphoneon the table– Optimization: Our brain optimize our muscles andOptimization: Our brain optimize our muscles and joints gradually, until we reach the goal.

Inverse Kinematics• The user specifies the goal. (grab the cellphone)• The algorithm finds the joint configurations or forces to g j greach that goal.

• The solution may not be unique, so needs more t i tconstraints.

– For example, with minimal effort (energy)• Needs some mathNeeds some math– Constrained optimization– It was a lab assignment for this class… 

• Widely used animation (such as Poser) and robotics.• See a demo!

Data‐Driven Character Animation• Use some data to animate the character.

Data‐Driven Character Animation• Even this!

Data‐Driven Character Animation• Even this! Performance Capture. (Many people don’t like this…)

Data‐Driven Character Animation

• Can we do markerless motion capture?Can we do markerless motion capture?– Ongoing research…

Data‐Driven Character Animation

• Animation data can also be generated usingAnimation data can also be generated using key frames by artists.

• Let us hire some artists and have them create th d t !the data!

• So what is our job?

Data‐Driven Character Animation• Our job: animation control.M ti G h• Motion Graph– Each state can be an animation clip or a mixture of several clips.

– The clip keeps getting played within a state.

– A special state: any stateA special state: any state– The transition means we will start playing a different clip.Th i i i d h– The transition is done when a condition is met. (You can set multiple conditions.) 

Data‐Driven Character Animation• The transition– Can be done by: exit time– Can be done by user‐defined parameters– To control the animation transition, just modify those control parameters in the script.

– Remember to turn the parameters off after the transition has already been triggered!

– See the lab assignment.– Read the online manual or search for tutorials!