Random tidbit for those animating in MAX

Moderators: GSH, VSMIT, Red Devil, Commando

User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Random tidbit for those animating in MAX

Post by Nielk1 »

If you are making an animation in 3dsMAX you are using keyframes. The program interpolates between keyframes. The problem is that BZ2 interpolates differently than MAX does, so your animations might not look how you expect.

The interpolation can be described by these two equations:
MAX: Y = (cuberoot((X/(T/2))-1)*((B-A)/2))+((B-A)/2)+A
Game: Y = (X*(B-A)/T)+A

Where A is the value of the first keyframe, and B is the value of the second, Y is the resultant value, T is the time between frames. X is the time after the first frame and Y is the resulting value of what you are interpolating.

You could probably tweak it a bit more replacing T with (SecondFrameTime - FirstFrameTime) and making X take in the global time instead of the local (right now its time since first frame). If you do would you please post it.

Long story short, plug both these into a graphic calculator and you can see the difference between how BZ2 and MAX interpolates. It matters.
User avatar
bigbadbogie
Bull Dog
Posts: 586
Joined: Mon Feb 21, 2011 8:12 am
Location: Ecuadorian Embassy

Re: Random tidbit for those animating in MAX

Post by bigbadbogie »

That simple is it?
User avatar
MrTwosheds
Recycler
Posts: 3059
Joined: Sat Feb 19, 2011 8:37 am
Location: Outer Space
Contact:

Re: Random tidbit for those animating in MAX

Post by MrTwosheds »

Not quite sure I got it either.
User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Re: Random tidbit for those animating in MAX

Post by Nielk1 »

I had the equations switched there.

Yea, that simple...

To understand it better...
Game is y=x
Max is y=cuberoot(x)

Not counting all the extra bits.
User avatar
Zax
Attila
Posts: 1388
Joined: Sat Feb 19, 2011 6:56 am

Re: Random tidbit for those animating in MAX

Post by Zax »

Not to mention you can go in and change the actual interpolation in max through the curves. Only do this if you are making a movie, though, because you will shoot yourself unless 3DS is your occupation.
Apollo
Sabre
Posts: 456
Joined: Sat Feb 19, 2011 9:51 pm

Re: Random tidbit for those animating in MAX

Post by Apollo »

If you don't use autokey and set the keys manually, the interpolation should be ok in bz2.
User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Re: Random tidbit for those animating in MAX

Post by Nielk1 »

Apollo wrote:If you don't use autokey and set the keys manually, the interpolation should be ok in bz2.
Incorrect. This is only true if you set a keyframe on every frame, which makes it hard to maintain and edit.

Yes you can set max to linear, but its not a global setting, you have to do it per individual key frame pair.
Apollo
Sabre
Posts: 456
Joined: Sat Feb 19, 2011 9:51 pm

Re: Random tidbit for those animating in MAX

Post by Apollo »

Every frame is too much like work. ;)
User avatar
Zax
Attila
Posts: 1388
Joined: Sat Feb 19, 2011 6:56 am

Re: Random tidbit for those animating in MAX

Post by Zax »

Nielk1 wrote:
Apollo wrote:If you don't use autokey and set the keys manually, the interpolation should be ok in bz2.
Incorrect. This is only true if you set a keyframe on every frame, which makes it hard to maintain and edit.

Yes you can set max to linear, but its not a global setting, you have to do it per individual key frame pair.
Take a hybrid solution. Keep a save of pre-export for editability, which you then modify into a new iteration with keyframe on every frame.

That is, this all only applies if your animation absolutely DEPENDS on the max interpolation to succeed, so your swinging door or rotating walker arms will probably be fine.
User avatar
MrTwosheds
Recycler
Posts: 3059
Joined: Sat Feb 19, 2011 8:37 am
Location: Outer Space
Contact:

Re: Random tidbit for those animating in MAX

Post by MrTwosheds »

Hmm, seems a bit complicated to me. I just skin animated my Dalek turrets head. It was the bit where I had to make an envelope for its 247 vertex that was tricky, the actual animation to move it is really simple.
AnimationSet {
Animation anim-deploy {
{frm-hp_head}
SI_AnimationKey {
2;
2;
0; 3; 0, 0, 0;;,
30; 3; 0, -0.4, 0;;;
2 key frames -0.4 down. Animation looks great. It ducks.
User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Re: Random tidbit for those animating in MAX

Post by Nielk1 »

In BZ2, it moves a set distance every interpolated frame.
In MAX's default setup, it moves a different amount ever interpolated frame, sort of like it accelerates and then decelerates.
User avatar
bigbadbogie
Bull Dog
Posts: 586
Joined: Mon Feb 21, 2011 8:12 am
Location: Ecuadorian Embassy

Re: Random tidbit for those animating in MAX

Post by bigbadbogie »

*Slaps self*

That's what you mean!

I've just learned to imagine what the animation would actually look like in the game and ignore the way that Max does that.

I don't even think about it any more, unless I am animating walkers. Then it can actually get a bit annoying trying to stop the feet from going through the ground.
User avatar
MrTwosheds
Recycler
Posts: 3059
Joined: Sat Feb 19, 2011 8:37 am
Location: Outer Space
Contact:

Re: Random tidbit for those animating in MAX

Post by MrTwosheds »

You should be able to adjust them back to something more like the original by lightly tweaking the keyframe numbers in notepad.
Probably never going to be as smooth as they appear in Max though.
User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Re: Random tidbit for those animating in MAX

Post by Nielk1 »

MrTwosheds wrote:You should be able to adjust them back to something more like the original by lightly tweaking the keyframe numbers in notepad.
Probably never going to be as smooth as they appear in Max though.
No, no you can't, since the issue is in the actual movement between frames being an entire order higher or lower.

And yes, yes it can if you put a key-frame on every frame making the interpolation relatively unneeded. It creates a sort of system like how PCs draw curves (as a series of tiny straight lines).
User avatar
MrTwosheds
Recycler
Posts: 3059
Joined: Sat Feb 19, 2011 8:37 am
Location: Outer Space
Contact:

Re: Random tidbit for those animating in MAX

Post by MrTwosheds »

Well you can. The results may not be exactly what you wanted though.
A rotation that appeared smooth in Max, can be made to accelerate and decelerate by altering the keyframe numbers in notepad, the more frames there are the less crude the effect is, keyframe values can be tweaked to smooth it out as well.
You don't want to add a key to every frame, bz2 is smoothest with as few keyframes as possible.
If you had 30 frames, with 4 keyframes at 1 10 20 30, altering it to 1 9 21 30 or 1 11 19 30 would make it accelerate/decelerate towards 15, but not quite in the uniform manner that 3dsmax would achieve.
Post Reply