Center of Gravity

Ideas, enhancements, feature requests and development related discussion.

Center of Gravity

Postby dcuny » Wed Nov 26, 2008 11:00 pm

I've been watching a lot of CGI animation this week (thanks, public library!), and I've noticed that a lot of it has a very "floaty" feel to it. I then had a look at the Coraline trailer, and noticed that it's got a much different sort of feel to it, with a sort of "hyperstylized" feel to it.

I realize that these are different styles of animation, but it got me thinking: how come the CGI animation doesn't carry the same feeling of weight?

Part of the reason might stem from how the puppet animator works: the move one frame at a time (at least, Coraline appears to be shot on ones), where the CGI animator typically moves from pose to pose, with the computer creating the 'tween poses.

But I'm not sure that's all there is to it. Some time back, I recall reading an animator explain that "all action starts from the hips." I think this pretty well summarizes the problem with using tools such as IK - they work from the outside in, instead of from the inside out.

I've noticed that in real life, you don't move directly from pose to pose. That is, if you want:

    pose 1 --> pose 2
you'll end up shifting to an intermediary pose first, that can propel you into your target pose:

    pose 1 --> shift to intermediate pose --> pose 2
It's like the compression stage of a spring. The center of gravity shifts to a stable position, and you prepare to push off into the new pose. It's a sort of "power position", in a lot of ways directly opposite of the target pose. You've got to build enough momentum to move the center of gravity from one point to another. I think this is where the "feeling of weight" comes from.

There are rigs that automatically keep a character balanced around their center of gravity, but I'm not sure this is quite the same thing. I've heard the process of walking described as continually falling down, but catching yourself at the last moment. The "catch" is where the body moves into another stable center of gravity. I suspect that you're actually a bit unbalanced as you shift from one pose to the next. So I wouldn't want an automatic center of gravity routine on. Then again, I could be wrong. :P

This sort of feeling - that of "preparing" to move - you get automatically with spline curves that overshoot. That's great if your character is a box. But if they're humanoid, it's not quite that easy.

So here's my question: is it possible to automatically calculate the middle pose? Imagine that there were a "center of gravity" control that you could drag around. Position it in one place, and the character balances over it. Position it somewhere else, and the character balances again.

Since there's only a single drive for this imaginary animation (the COG), it would be entirely driven from the position of the COG. Add overshoot to that, and you've got pretty much everything I'm describing above. Of course, that doesn't do everything for you - but it's perhaps a different way of thinking about animating.

Now, I don't know what it would take to design a rig that would work like that. In lieu of doing that, another option might be to set up a series of poses/morphs and wire them to a set of 2D controllers.

Then again, do you trust a computer to create good animation? :|

Thoughts?
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Re: Center of Gravity

Postby dcuny » Thu Nov 27, 2008 1:56 am

I did some Googling around, but the only thing I've found so far are rigs that are constrained to have the hips midway between both feet (assuming that both feet are on the ground).

There's an interesting paper here simulating a rider on top of a horse trying to maintain balance - not quite the same thing, though. :|
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Re: Center of Gravity

Postby John VanSickle » Thu Nov 27, 2008 3:26 am

To summarize why a lot of motion appears unnatural, it's because many animators don't understand the motion of living bodies as well as they should. I especially noticed this in some of the human figures in the first Shrek film.

A fire-and-forget sim is technically very difficult to do, but it can't be that hard for the animation software to either calculate a center of gravity, or let the user specify one, show its motion and acceleration at any given moment, and flag specific areas that the user is interested in correcting. In fact, an animation package should be able to do this for each bone in a model.
John VanSickle
 
Posts: 189
Joined: Sat Feb 16, 2008 2:17 am

Re: Center of Gravity

Postby sascha » Thu Nov 27, 2008 11:01 am

You've asked, so here are some random thought about the subject :)
  • Most 2D animations (especially Disney's) do it very well - there's always a feeling of weight (watch Mowgli as he climbs a tree, for example). It appears that generating the same effect in 3D is much more difficult, perhaps because a 3D model is, in a sense, more "real" than a 2D drawing.
  • You're right, real animals (and humans) don't move from pose to pose, they try (on an unconscious, "hard-wired" level) to minimize the energy needed. Of course you could try to code some kind of energy-minimization constraint into your IK solver, but I think this is quite difficult. The actual amount of energy needed to perform a certain motion is difficult to calculate, I remember reading that it has only recently been discovered that e.g. the funny looking walk of Penguins is actually very efficient in terms of energy.
  • Computing the center of mass can be tricky, but it could easily be estimated by defining a weight for each bone, and treating bones as cylinders.
  • Computing forces that act on a model is straight forward, basically you'll need gravity and acceleration. Gravity is a constant term, and acceleration is simply the 2nd derivative of the Bézier curves used for interpolation. Many games do this automatically and in realtime, e.g. for ponytails (Lara Croft) or - Sex sells, even in video games - breasts (Dead or Alive).
  • I wouldn't do that automatically though. Lara Croft's ponytail still looks unrealistic, not to mention the breasts of the Dead or Alive characters...
  • Computing the center of mass and automatically balancing the character would be possible, but still, I wouldn't do that. Animation has to exaggerate, sometimes even when it's against the laws of physics. A classical example is the way characters fall in a cartoon: they stop in mid-air for a second and then fall down in an instant.
  • I could imagine that computing the center of mass and all forces that act on a model is still a good idea. But I'd show the results (e.g. as arrows) to the animator. This way he/she could easily see which forces act on their model, where the center of mass is, etc. and keep that in mind when animating it. You'd still have the freedom to "break the rules" though.
  • There is much room for experimentation, and I'm really looking forward to try out some of these ideas in JPatch.
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

Re: Center of Gravity

Postby John VanSickle » Thu Nov 27, 2008 4:27 pm

sascha wrote:Most 2D animations (especially Disney's) do it very well - there's always a feeling of weight (watch Mowgli as he climbs a tree, for example). It appears that generating the same effect in 3D is much more difficult, perhaps because a 3D model is, in a sense, more "real" than a 2D drawing.

Which Pixar making-of video talked about this?

Computing the center of mass can be tricky, but it could easily be estimated by defining a weight for each bone, and treating bones as cylinders.

The basic idea is as should usually be done: Do the best calculation available with the given information, and let the user replace the results with something preferred.

I wouldn't do that automatically though. Lara Croft's ponytail still looks unrealistic, not to mention the breasts of the Dead or Alive characters...

This can be improved by using Laplace transforms. They're a good tool for simulating physical systems. Implementing the math is tedious, unless you have a library that can toss polynomials back and forth.

Computing the center of mass and automatically balancing the character would be possible, but still, I wouldn't do that. Animation has to exaggerate, sometimes even when it's against the laws of physics. A classical example is the way characters fall in a cartoon: they stop in mid-air for a second and then fall down in an instant.

Getting such a system working properly would be a whole lot more work than simply having the animator put the arms and legs where he wants them to go for the desired effect.

I could imagine that computing the center of mass and all forces that act on a model is still a good idea. But I'd show the results (e.g. as arrows) to the animator. This way he/she could easily see which forces act on their model, where the center of mass is, etc. and keep that in mind when animating it. You'd still have the freedom to "break the rules" though.

One area of interest to flag is to specify the amount of force that an arm (for instance) can exert when bent at a given angle. That allows the system to quickly flag a pose when Mr. Incredible is lifting something heavy, but his body isn't bending from the effort.

There is much room for experimentation, and I'm really looking forward to try out some of these ideas in JPatch.

Ditto to that, for me. Curse that Diablo 2...
John VanSickle
 
Posts: 189
Joined: Sat Feb 16, 2008 2:17 am

Re: Center of Gravity

Postby dcuny » Fri Nov 28, 2008 10:03 am

As a programmer (and not an animator), I guess I'm just trying to figure out how to make the tool do more work for me. A good animator can do all this stuff without any tools, simply because they've learned to observe and understand how and why things move. A poor animator will remain a poor animator, no matter how wonderful the tools you give them are.

On the other hand, a word processor can't write a paper for you, but having a spell checker, a grammar checker, and auto-completion can be very nice. :)

For the first intuition - the feeling of weight comes from properly handling the center of gravity - I'm not sure what a good solution is yet. Being able to display the COG is nice, but it doesn't address the problem of animation being driven by the hips. I suspect that IK driven hips - instead of the legs driving the hips - would help. But I can't help feeling that I'm not seeing something obvious here. :?

The second intuition - actions being broken down into several keys - is something that's been bugging me for a while. Some 2D animators make various passes through the animation, doing a separate action each time. They'll even do the different parts in different colors to keep things clear. I really like the idea of multiple layers (like in Reflex) where each action can be placed on a different layer. This is something I'd really like to see in JPatch.
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Re: Center of Gravity

Postby sascha » Fri Nov 28, 2008 10:29 am

Which Pixar making-of video talked about this?

I wasn't referring any particular Pixar "making of...", but now that you mention it, I think they've used animations from The Junglebook to point out how important the feeling of weight is in some making of. I can't remember which one, I don't even know if it was one of Pixar's.
The observation that creating a feeling of weight is more difficult in 3D than in 3D is just my theory. I don't have anything to back it up, so it's safe ignore it :D
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

Re: Center of Gravity

Postby dcuny » Sun Jan 18, 2009 8:40 am

I was looking at the submissions for a Blender animation contest last week. The task was to have a character lift up a ball. They were all... let's just say there was room for improvement. :P

Now, that's not to badmouth the people who entered the contest. I don't think I'd do any better than they did. But it got me wondering why they didn't do well. What's the difference between an amateur and a professional? Besides a lot of practice, finely honed skill, an eye for detail, and that sort of thing? ;)

I got to thinking that one factor was the use of reference footage. I remember being surprised at the "behind the scenes" of Peter Pan and Cinderella at how much Disney animators relied of reference footage. Looking through the "making of" Pixar videos pretty much shows the same thing. There was also quite a lot of it in Hash's "Tin Woodman of Oz".

But that's too mundane an answer. I'm still looking for some sort of software "silver bullet" that will allow lazy non-animators to create acceptably good animation. :P

So I wondered: what sort of tool would allow me to create good animation in this case?

There were a number of problems that needed to be addressed: many of the animations were too fast. Few addressed the problem of weight in a reasonable sort of way.

It's possible to calculate the center of balance for a character. Shouldn't you be able to calculate other things as well? Imagine that you could calculate the amount of force a character could apply to an object.

Consider the act of lifting something. If it's a very light object (like a pencil), you can lift it with your fingers. If it's heavier (a plate), you might need your entire arm. For something fairly heavy (a bowling ball), you'd need to use your legs as well.

How can the program know how much force you can apply? If you're pushing against something, you've got to prepare your limbs - bend your arm, back and legs, for example. If you're pulling, you've got to have your legs bent, and body angled away from the object. Want your character to be able to jump? Bend the knees and swing the arms back. You've got to build up enough potential energy to overcome the character's weight.

I'm not sure you could (or would want to) run this as a "real" simulation. For example, imagine trying to animate a walk by having to specify the amount of energy a character puts into each step. (Actually, that would be an interesting idea).

There's no real forces acting on a puppet when you animate it, so you can put it into any position you'd want. Imagine what might happen if you push against a rock, but not hard enough to move it. Would your puppet push away from the rock instead? How would you reconcile trying to animate a character that's running a physics simulation? It's a bit like animating in reverse - normally, you guess where the character would go by applying "fake" forces to it. If you were applying actual forces, you'd have an accurate model of where the forces would put the puppet, but not necessarily a good animation.

I'm not sure a physics simulation is even a good thing, since combinations of animation and physics look wrong for some reason.

Back to the example of lifting up a heavy object. One nice thing about it would be that you could show what forces are continuing to act on it. For example, once you lift the ball up, you've got to support it against the weight of gravity. If you started to walk with it, the ball would pick a momentum. You could (in theory) have the ball animated by the "physics engine", and respond to the character's actions. For simplicity, you'd probably only want to allow a user-specified contact point. That way, the puppet could push with their hand, or kick and object, or even push against it with their back.

Although having the computer pose a character generally gives bad results, the idea of being able to pose a character to "push" something (using a specific point of contact) and then being able to "spin" a dial to automatically adjust the pose to push harder or softer is pretty appealing.
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Re: Center of Gravity

Postby sascha » Sun Jan 18, 2009 3:09 pm

Some random ideas:

* In interesting thing to have would be a kind of artificial intelligence, or rather artificial life simulation. E.g. a neuronal net that can control the (simulated) muscles of the character to move simulated limbs, all with reasonable physical accuracy. The net could be trained to do things like walk, jump, catch a ball, or some reflexes like cushioning a fall. I don't know if this would be usable for animation, but it would be very interesting nevertheless.

* I think that reference footage is very important. When doing a high-quality short, I'd like to shoot all scenes with physical action with real actors and use that footage as a reference for animation. Perhaps it's also a good idea for dialogs - to get a feeling for the facial expressions used to express different emotions or the reaction on what the other one is saying or doing.

* Motion capture! Under some circumstances, using motion-capture might make sense. Perhaps you couldn't use the "raw" data, but it could serve as a starting-point. There could be automatic tools to eliminate unneeded keys, and you could later fine-tune it manually. Today even low-cost digital cameras can record at 640x480 with 30fps - and two such cameras could be enough to do motion-capturing - so I guess one could build a poor-man's mocap stage in the garage for about 100 bucks - two cams, a light, a black wall, and a few ping-pong balls. Do you know of any freeware mocap-software? In any case, I plan to add support for importing BVH files.

* I've read that many professional animators take acting classes. I'd like to do that too - I'm confident that I'd be the worst student they ever had, but just to learn the tricks of the trade to use them in animations could be worthwhile. It also couldn't hurt to have contact to some drama students, e.g. to shoot the reference footage or mocap with them, not to mention the voice acting.
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

Re: Center of Gravity

Postby dcuny » Sun Jan 18, 2009 11:29 pm

If the simulation was good enough, you wouldn't need an animator, right? ;)

Chuck Jones used to direct his cartoons by setting all the key poses for his animators. With most studios heavily storyboarding and creating previs of the entire film before shooting a single frame, this is still in force today.

I suspect the following workflow would have helped the Blender folk come up with stronger animations:

  • Create a series of poses first. Generate an animation with no interpolation, so you can concentrate on getting strong poses and spacing.
  • Create additional animation in passes with layers (like in Reflex).
  • Fine-tune the animation by staggering motions and adjusting curves.
I've seen it laid out like this in a number of tutorials by professional animators, where they set up the animation in pose-to-pose, and then add detail.

This isn't something that's unique to any particular animation system, but I think if JPatch encourages good workflow, you're more likely to get good results. Having tools like silhouette so you can check the pose might also be good. I've also suggested that it would be very useful to "smart" editing tools, so you can make changes to the animation without everything going bonkers. (Again, layers might help).

But I'm still looking for a silver bullet. :P
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Re: Center of Gravity

Postby sascha » Mon Jan 19, 2009 12:08 am

I've also suggested that it would be very useful to "smart" editing tools, so you can make changes to the animation without everything going bonkers. (Again, layers might help).

Yes, it's a bit early to discuss these details for the animator, but I've got a similar "layered" mode for doing nondestructive editing in the modeler, and I think the concept can be applied to the animator as well.

But if you've given this more thought already, let me know the details!
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

Re: Center of Gravity

Postby dcuny » Mon Jan 19, 2009 8:10 pm

You can find an in-depth discussion of layers in this post. You didn't seem to be happy with the idea of incorporating cycles into layers, but they're in Reflex as well as Blender's NLA Editor, so I think they're pretty important.

I think it's important that layers deal with adjusting key positions as well.

One of my other suggestions had been that keys should by default be inserted relative to the last key, and not automatically start at frame 1.

Consider the case where you've got a series of poses, and you adjust a finger on pose #4. If the finger hadn't been set before, you'd get the "drifting key" problem where the animation of the finger would begin at frame #1, instead of at pose #4. This would also encourage working with this sort of workflow.

Have a look at Keith Lango's tutorial on workflow.

Traditionally, there's an "overlap" pass where the keys are offset in the dope editor. Keith talks about this in his article, and Jeff Lew covers this approach in his Learning 3D Character Animation video. Jeff mentions this briefly at 21:55 of the free footage, and refers to this as "layering" the animation. His example (shown briefly at 22:15) is a character with antenna, where he staggers the motion.

Jeff notes that this "layering" is something that has to held off until the animation is complete, because you can't go back and alter things once you've done it. Having Reflex-style layers would solve that problem.

Starting on page 232 of The Animator's Survival Kit, Richard Williams talks about "breaking joints" to get smoother action. Specifically, he talks about the successive breaking of joints, where there's an offset of each joint down the chain to create a smoother, more "cartoony" action. I've suggested that this sort of thing could be done automatically by the program.

Then again, if you look at the examples Richard gives, he's doing a lot more than simply offsetting keys. And Keith argues in an addendum to his article that "shuffling the keys" is actually a bad thing, and the overlap should be built into animation in the first place.

I've looked at both version in Keith's animation, and the difference is too subtle in my eyes. I've used the "offset your keys" in the Moai animation, and it made a big difference. Keith admits that, despite the shortcoming of the technique "is good for that "gotta get it done" quality of animation that a lot of us are paid to produce."

I recall seeing a number of animation curves applied to POV-Ray objects, and how the "S" curve automatically created the illusion of anticipation and overshoot. Now, I know that any keyframes created by JPatch will automatically be worse than any created by hand, but I still can't help thinking it would be nice to be able to select a curve and get that kind of motion "for free".

I know you can already get that by applying splines, and assigning ease in/ease out values. But I'd like to apply this at the action level - not just at the joint level. So (for example), I could select where my character raises his arm, and slaps his hand to a table. I want it to:

  • Not have "undershoot" at the start of the motion, because the hand would go under the table;
  • Overshoot at the top of the curve;
  • Come to a sudden halt when the hand hits the table;
  • Set up the action to maximize the effect of the "hit";
  • Stagger the unrolling of joints of the arm going up;
  • Stagger the unrolling of joints of the arm going down;
  • Ease the action of the joints with splines;
  • Offset the action to start 4 frames before the pose;
  • Offset the action to end 3 frames before the next pose
That's not asking much, is it? :P

More generally, what I'd like to do is be able to work with the actions on a macro level. Here's another example - the character is clenching their fist. I could select the action at the root (the wrist) and select:

  • Overshoot the fingers, so they first completely open, but leave joint limits on so they don't "break";
  • Ease in, so the action seems deliberate;
  • Accelerate out, so the hand quickly clenches;
  • "Unroll" the action, so the rotation at each joint is staggered.
I might want the character to shake their fist. This is a repeating action - how about applying an oscillating curve to an arm movement that dampens over time?

I should admit that the times I've seen this sort of thing applied, it's generally resulted in bad animation. And it's almost always a bad idea to let the computer animate for you. Still... :o
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Re: Center of Gravity

Postby sascha » Tue Jan 20, 2009 8:47 am

I really can't say much at this time.

I think with a good curve- and dope-sheet-editor you should be able to do all those things manually in a short time, so goal #1 is to get these two editors to that level of functionality.
Then we can start using it and try out various things, and then we can start thinking about automating some of these.

I like the layers idea, but I currently can't see how it would overcome the problem that the this "layering" is something that has to held off until the animation is complete.
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

Re: Center of Gravity

Postby dcuny » Wed Jan 21, 2009 8:13 am

sascha wrote:I think with a good curve- and dope-sheet-editor you should be able to do all those things manually in a short time, so goal #1 is to get these two editors to that level of functionality.

I agree.

But since I haven't got a copy of JPatch to play with (yet), I'll feel free to post whatever silly ideas I come up with. ;)

I like the layers idea, but I currently can't see how it would overcome the problem that the this "layering" is something that has to held off until the animation is complete.

The problem with doing "layering" before animation is complete is that there's no good way to undo the "layering" step. But because layers can be toggled on and off, you've got a lot more freedom to experiment and not worry about getting painted into a corner. For example, you could do a couple different versions of an action - each as a different layer - and then choose the one that you liked the best. Sort of like a multitrack tape recorder that supports multiple takes.
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Re: Center of Gravity

Postby dcuny » Wed Jan 21, 2009 11:37 am

I agree, I'm mixing apples and oranges here. Here's what Reflex advertises:
Use Layers in Reflex much as you would use layers in a common graphics editor. Layer movements to create the primary action, add secondary actions on top, try something new you're unsure of in a new Layer, or switch between two or more versions of the same movement to decide which you like better. You can cycle animation on individual layers, as well. Want to increase or decrease the amplitude of a movement? Layer envelopes work similar to Layer "opacity" in graphics editors but the envelope values can vary over time.
They're also pretty vague about details, but it seems to me that these are useful features.

It would probably be more clear if there were different types of layers - a "baseline" (which can be turned off to remove changes past that point in time), a "cycle", and "additive" layer, and so on.
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Next

Return to Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron