Jump to content
Hash, Inc. Forums

Bouncing Ball Precision


danf

Recommended Posts

So I've made my 2nd bouncing ball attempt:

http://homepage.mac.com/somniac/.Pictures/bball2.mov

 

Of note is that the first two bounces should be perfect. That's because I made an Excel spreadsheet that applies the Equations of Motion:

 

Download Spreadsheet

eqomotion.gif

 

By typing in the first contact coordinates, and then the coordinates of the first apex, as well as the coefficient of restitution, (as long as the x-coordinates stay positive) and the number of frames between the first contact and the first apex, it computes up to the first 20 frames (for now) and the coordinates of the 2nd apex.

 

Now the problem:

You'll notice the third bounce looks like crap! That's because although I've generated the most precise coordinates possible, A:M only allows coordinates entered to two decimal places! So despite my rounding and approximations, a low-value bounce is significantly less precise. Is there a way to access finer-tuning controls than the "Show Manipulator Properties" allows, or should I just work on a bigger scale next time?

 

Also I'm curious if you think this is horrendous cheating and will help me none.

Link to comment
Share on other sites

THAT's cool! Not many of us strive for mathematical perfection, so I doubt many of us even knew A:M cut you off at 2 decimel points... what is the spreadsheet assuming the ball is made of? I think you would be interested in playing with Newton Physics!

 

Thanks for making us THINK on a Saturday night, Dan!

Link to comment
Share on other sites

Well I made it so you can enter your own "C of R," or coefficient of restitution, which is the ratio of the first bounce to the second. So if you want a really barely-bouncing ball, make it low, like .05, if you want it some theoretically impossibly perfect bouncing ball, make it 1. In my example the C of R is .62, as you can see in my screenshot.

Link to comment
Share on other sites

Coefficient of Restitution? I think I saw that band open for Nirvana....

 

 

I never did so well at math... algebra in 9th grade was great because my teacher would'nt let anyone fall behind...so everyone actually enjoyed the class, learned algebra and got B's or better! Then, in High School... my geometry teacher was Kirk Gibson's dad (famous baseball player) He had great stories about his son, about fighting in WW2- but could not hold the class's attention long enough to explain x from Y... and I never took another math class again!

 

I admire those of you that know what all those buttons on a calculator actually do.

Link to comment
Share on other sites

I actually have a similar story, and don't consider myself much of a math whiz. I employed a friend's help to figure this stuff out, and it is possible to learn this stuff with just basic algebra (like balancing the equation). It's all thanks to Excel that I can make open-ended equations that solve themselves. Understand it once and forget it!

 

Oh and btw, I've now updated that link with a better version of the spreadsheet- now good for up to 40 frames from the initial ground departure.

 

If anyone would ever prefer one that starts with the falling, I could probably conjure one up too. This isn't only good for a ball, this could be great for making any object fall realistically, as far as a vacuum is realistic.

Link to comment
Share on other sites

Come to think of it, you could use this to do MOSTLY falling already, the one key is that the "S up" value (s means position, Si means initial position) still needs to be the apex of the arc. So if you knew the fall length, you could use the first term kindof like the drawstring of a bow, pull it back equal to how you want it to fall (let's say dropping from 5 to 0), you would just enter 0 for S down, and 5 for S up, enter the number of frames you want it to last, let's say 30, which is nearing the table limit (the C of R field only affects the "Next Bounce" result). The resulting numbers rise up to the apex, which you can recognize because the velocity is 0. Now if you record the (x,y) data for the frame right before the apex, enter it as your "S down" position, and change the number of frames to "1," you will have your fall with one frame before the apex, but the table auto-fills everything after the apex, as if there were no ground.

Link to comment
Share on other sites

  • Hash Fellow

The "takeoff" looks odd, partly because the spacing is inconsistent and partly because there's no anticipation prior to leaving the ground. Anticipation is a later lesson , however.

 

A more typical gambit is to have the ball enter from the side, near the apex of a hop, or just start from high and fall into the first bounce.

 

the first two hops look good, none-the-less.

 

 

 

 

Now the problem:

You'll notice the third bounce looks like crap! That's because although I've generated the most precise coordinates possible, A:M only allows coordinates entered to two decimal places! So despite my rounding and approximations, a low-value bounce is significantly less precise.

 

Are you actually keyframing on every frame? That's a worthwhile exercise and not far removed from what 2D animators have to do anyway

 

 

but the magic of CG is that by editing the "curves" you can get A:M to properly place those inbetweens and to whatever precision required. But maybe you haven't been introduced to the curve editor yet.

 

 

Is there a way to access finer-tuning controls than the "Show Manipulator Properties" allows, or should I just work on a bigger scale next time?

 

Working on a bigger scale would make sense because the long graceful hops you are doing wouldn't be possible for a ball that is only getting 2cm of altitude. And fewer decimal places are needed.

 

But I'm a little doubtful that a distance of less than .01 cm is the problem, I suspect some other error.

 

 

 

Also I'm curious if you think this is horrendous cheating and will help me none.
No, if this helps you make sense of why the motion is the way it is, then it's good. Eventually you get so you can eyeball this stuff.
Link to comment
Share on other sites

That makes sense, since it would never behave this way without a prior fall, it's weird to not show that fall.

 

And yes, I was keyframing every frame-- WHAT CURVES EDITOR??!!!! I'm suddenly suspecting this was all for nothing... I know how to see those lines in the PWS, but I don't know how to control the curves they make. Is there a tutorial for that?

Link to comment
Share on other sites

  • Hash Fellow

This isn't exactly an introduction to the curve editor (which is accessed by pressing the button with the RGB lines on it) but it shows manipulating the shape of the curves with the bias handles. CPs can be peaked or smooth, just like in models.

 

 

http://www.hash.com/two/RCHolmen/biasmagnitudeMP4Low.mov

 

 

 

Someday I'll do a bouncing ball tut that covers all this but I haven't done that yet.

Link to comment
Share on other sites

And yes, I was keyframing every frame-- WHAT CURVES EDITOR??!!!! I'm suddenly suspecting this was all for nothing... I know how to see those lines in the PWS, but I don't know how to control the curves they make. Is there a tutorial for that?

 

A long time ago in a galaxy far far away (my computer upstairs) I was TERRIFIED of fiddling with the animation curves. They frightened me. All those weird curvy lines! What did they mean? They seemed so unfriendly and strange!

 

One day I got brave and approached those channel splines looking for some help. Now we are dear dear friends. We go for walks in the park, drink wine with candle light suppers. Watch scary movies together. One time the channel splines got arrested and I had to bail it out of jail and... well you get the point. Those things are freaking awesome. You won't need your excel motion curve generator unless it's just to look at for reference to create the curves with the channel spline editor. ;)

 

-vern

Link to comment
Share on other sites

I was never intimidated by channels because I had used Adobe After Effects and it has a similar way of animating...HOWEVER, the curves/channel animation editor in Animation:Master BLOWS AWAY the one in AE by LIGHT YEARS...and that's a big thing because A:M handles MUCH more channels(one for each bone of your character, and everything else) PLUS is 3-dimensional to boot.

 

If you ever tried to make an object zoom from way far away to right past the camera with SMOOOTH mathematics in AE...you will know... it's a BITCH. The exact same thing in A:M is 'worlds' easier, not only because of an INCREDIBLY EASY choreography interface, but on top of that we have a WORLD CLASS curves editor.

 

THIS IS POWERFUL STUFF. You got your monies worth, believe you-me!

Link to comment
Share on other sites

Ahh... this looks like another one of those "Mac version is more difficult" situations. Unlike in the modeling mode, simply clicking on a timeline CP does not make the bias handles pop up. I've tried all the usual key combos, but I can't figure out how to make them appear, while in the video it seems you just click on them.

 

Does anyone know how to bring up the bias handles on a mac?

Link to comment
Share on other sites

  • Admin
I'm suddenly suspecting this was all for nothing...

 

Not at all. Its important to be fully grounded in reality before launching off toward distant stars.

 

I'm must admit I'm a sucker for those bouncing balls. I've bought books just because they contained a snippet of something I thought worthwhile or representative of one artists take on this rather simple(?) exercise. I haven't pursued the math of it all because I know in that way for me lies madness. I'm not chasing after reality here or I'd just go out and bounce a lot of balls.

 

One of the reasons the bouncing ball exercise is so important is that it teaches us how to move shapes, forms and masses in time and space in a believable way. If objects in a scene move consistently enough they create their own reality.

 

Thanks for that Excel spreadsheet. Thats rather clever.

I'm trying to think of how I'd implement it differently... or adapt it to other purposes... and failing miserably. ;)

 

I need to consider spreadsheets more in my daily wanderings.

If nothing else they make really great dope sheets.

 

Regarding Channels... woo boy... welcome to A:M! :)

 

 

(Sorry... can't help you on a Mac. I thought it'd be up there on the menu.)

Link to comment
Share on other sites

  • Hash Fellow
Does anyone know how to bring up the bias handles on a mac?

 

You do have the "Show Bias Handles" button on?

 

It doesn't have a default keyboard shortcut but you can assign one in Tools>Customize>Keyboard

 

 

On rare occasions I have encountered invisble bias handles. I think it was a graphics card problem. But I could hover my cursor over where the bias handle was supposed to be and move it. I dont 'reccommend it.

Link to comment
Share on other sites

  • Hash Fellow
I'm in love with these bias handles! Here's my first try since then- I had so much energy left over from making the bounce, I added a wall, and a little squash & stretch!

 

What do you think???

 

It's alive!

 

much easier than calculating X and Y.

 

There is a bit of tradition and formula about the frames around the bounce, but that's a lesson for another day. If you have "The Animator's Survival Kit" it's on pg 93-94

 

But I'll tell you, for the very first bouncing ball assignment at AnimationMentor they wanted people to explicitly key the ball on every frame, much like you had done as they hadn't intruduced the curve editor yet.

 

MOst of them looked absolutely awful since most of them didn't know what you knew about the math of the motion. (Me, I figured the mentor was never going to see my channels anyway so I just edited my curves and my bouncing ball bounced just fine.)

Link to comment
Share on other sites

That tradition and formula is pretty counter-intuitive to me- it seems odd for a ball to anticipate its own impact, although I see how that makes the motion smoother, and makes the ball more lively- heck, it's reacting to stimuli, that's one of the definitions of "alive."

 

So what's the next difficulty setting on this? What's the next thing to work on?

Link to comment
Share on other sites

Oh, and I couldn't help myself,

 

Here is my bouncing ball with the Ken Harris correction.

 

I had to force some of the pre-impact frames closer than they would be (usually this is the most distant moment in the ball's arc) to get the pre-squash contact down, but I think it ends up looking better and more natural, despite this cheat. It probably helps that the curve editor grabs all the keyframes and pulls them down with it, making the first contact of an impact simply represent some of the time that the ball's squashing would occupy, (the bottom-most part of the bouncing graph is slightly under the ground, and that time still needs to be represented somehow).

Link to comment
Share on other sites

  • Hash Fellow
So what's the next difficulty setting on this? What's the next thing to work on?

 

try making the ball jump itself into the air from a standstill (and fall back down to land). Unlike a frog or rabbit the ball has no legs to push itself off with, so squash and stretch is involved.

 

 

extra points if you can make it leap with sideways motion, as a frog or rabbit would do.

Link to comment
Share on other sites

  • Hash Fellow
I had to force some of the pre-impact frames closer than they would be (usually this is the most distant moment in the ball's arc) to get the pre-squash contact down,

 

Something has gone wrong here. Remember you can make special case keyframes anywhere you want and adjust the curves leading into and out of them anyway you want, so there is no need to lose the natural acceleration of the ball's falling motion.

Link to comment
Share on other sites

Right, that's what I meant when I mis-said:

"It probably helps that the curve editor grabs all the keyframes and pulls them down with it, "

by "keyframes" I meant "non-keyframed inbetweens."

 

Can you see a problem in the acceleration in the video, or was it just my mis-speaking that told you something was wrong?

Link to comment
Share on other sites

  • Hash Fellow

One quick point I'd make is ... maintain overall volume. When a ball stretches it gets a little narrower. When it squashes it gets a bit fatter.

 

 

Can you see a problem in the acceleration in the video,

 

Yes, the falling motion looks out of whack, like it's not accelerating. Tracking dots would be needed to really evaluate it and pinpoint it.

 

Okay, I made one that bounces itself! Critique? Next assignment?

 

A good start, but that one will need specific diagnosis, that i won't get to immediately. For now, go out and play in the sun again. ;)

Link to comment
Share on other sites

One quick point I'd make is ... maintain overall volume. When a ball stretches it gets a little narrower. When it squashes it gets a bit fatter.

 

Right after I posted it my girlfriend also noticed that- earlier I wasn't sure if the stretch was meant to be motion-blur or the ball actually mis-shaping. I did however get this concept right on the final landing, I'm proud of that!

 

For now, go out and play in the sun again. ;)

 

Sorry I didn't reply sooner, I was out playing soccer :).

 

PS. Speaking of soccer, I was thinking a fun short would be me and some buddies playing soccer when the ball starts running/bouncing away. It'd be a real challenge in modeling the ball, animating its motion, and compositing it into reality. Now I'm going to try out making a soccer ball. Let's hope a texture map is sufficient to convey its texture!

Link to comment
Share on other sites

Thanks a ton for the notes!

 

One decision I made, which you point out, and I think is worth discussing, is the way a ball bounces off a wall when hitting at its apex. My reasoning was the "Coefficient of Restitution" would apply to the wall in much the same way it does to a floor, only instead of bouncing X% lower, it would bounce only X% as far out as it came from. Keep in mind this was not some mathematical decision I'm not playing some trump card, this was my offhand logic, so I could be applying the principle wrong. If the bounce-back isn't the same as the CR, what is the principle balls follow?

 

Actually I think I'm going to do some trials. I'll get back to you.

Link to comment
Share on other sites

Alright, I think you're correct in saying the wall-bounce doesn't deteriorate the x velocity as much as a floor bounce deteriorates the y, but I don't know why, and I feel like I need to know what the real math here is. I'll ask my math buddy.

Link to comment
Share on other sites

  • Hash Fellow
Thanks a ton for the notes!

 

One decision I made, which you point out, and I think is worth discussing, is the way a ball bounces off a wall when hitting at its apex. My reasoning was the "Coefficient of Restitution" would apply to the wall in much the same way it does to a floor, only instead of bouncing X% lower, it would bounce only X% as far out as it came from.

 

That's valid reasoning. It just seemed to be dropping to the ground awfully short. Maybe the arc is mishapen in some way that the descent is too precipitous.

Or maybe it's just fine.. That item wasn't fatal.

 

The thing that really got my attention at first was the flat glide into the first bounce. ;)

Link to comment
Share on other sites

Yeah, somehow that one passed me by, I'll have to still keep my eyes open despite having the curves editor :) And of course, thinning for stretch and thickening for squash.

 

One extra question-

You noticed that I translated the ball slightly under the ground to simulate the bottom of the ball's squash- do you usually deform the ball on a model level to achieve that effect?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...