Stiff b3d animation

Blitz3D Forums/Blitz3D Programming/Stiff b3d animation

Wigwam(Posted 2009) [#1]
Okay, I think the best way to describe the problem I'm having is to say that every time I create a .b3d file in Milkshape (1.6.6) and export it to Blitz 3d, whenever I play the animation in a loop or "to end" animation, there will always be a "stiff" frame at the point the animation starts, as if it stayed on the first frame for longer than the others.

This is a real problem when animating anything as simple as running. When previewing animations in milkshape, they have this stiffening too, but when exported to, for instance, a .x (JT) file, the animation is perfectly smooth. I'll also note here that I finish animations by having the last frame a complete copy of the first frame to avoid it "snapping" straight to the first frame in a loop animation. I also tried not including the copied frame, but then it snaps *and* stiffens.

I'm sure other people have exported .b3d files without this problem. Thanks in advance if you know the answer.


Ross C(Posted 2009) [#2]
Have you tried extracting the animations, but chopping the first or last frame off. It sounds like your last frame and first frame are the exact same. The frames generated inbetween each of the keyframes, will interpolate between the keyframes, so if you have two frames the exact same, you will experience some sort of pause, or sticking. ( i know you said you tried this above, but i'm talking about extracting the frames in blitz, and missing out the last or first frame. Try also messing about with the smoothness of keyframe transition option, in the animate command.

If that fails, post your code. You may be doing something in your code that is causing the problem :)


Tom(Posted 2009) [#3]
Could I check the b3d file out?

My email addy is in my profile.

Sup Ross!? :)


Ross C(Posted 2009) [#4]
Hey man, not much :) Plodding away in my new surrounding. Sup wit you!


Wigwam(Posted 2009) [#5]
Well, the code's pretty phat in its entirety, as I've been working on it for about 5 years now, and only recently converted to .b3ds from .xs for compatibilty's sake- Here's the whole of the animation code:

Function animateplayer()
If playeranimseq<>lastplayeranimseq Then playeranimrun%=1
If playeranimrun%=1
 Animate player,playeranimtype,playeranimspeed#,playeranimseq,playeranimtrans#
EndIf
playeranimrun%=0
playeranimspeed#=0.08
playeranimtype=1
playeranimtrans=4
lastplayeranimseq=playeranimseq
End Function


Basically, if the animation sequence changes at any point in the code before this function, it changes the sequence. It can also change any of the other properties of the animation whenever the sequence changes. the transition defaults to 4.

I think the problem is probably the deal with the first and last frames being the same, but it still sticks on the last frame even when they're not the same, along with the jump back to the first frame. I haven't tried extracting / missing out the frames yet, how do you do that?