Creating tweens in an animation

BlitzPlus Forums/BlitzPlus Programming/Creating tweens in an animation

QuickSilva(Posted 2003) [#1]
Hello,

Can anyone suggest a solution to this problem,

Say I have two key frames of animation, an object on the left of the screen and the same object at the right of the screen, how could I make say, 5 inbetween frames between the two and then animate through the whole lot?

Thanks for any help.
Jason.


jhocking(Posted 2003) [#2]
Blitz tweens automatically. I assume you have something specific in mind in which case you should describe what you are trying to do more specifically. For example, what do you mean by "animate through the whole lot?" Also, can you describe the inbetween frames you are after? Are they simply frames on the straight path from point A to point B or are they some sort of complex motion? Also, do you want to do this in code or do you want to do this in an animation tool and export the animated model?


QuickSilva(Posted 2003) [#3]
OK firstly I assume that when you say that Blitz tweens automatically you are talking about 3D? I basically have two frames being one on the left of the screen and one on the right and I want the program to create the inbetween frames for me. Then when it has done this I want to be able to be able to play the whole animation, that it has created consisting of, in this example the two key frames and the 5 in between ones. So in theory just imaging that I have written a paint program and I want it to create the tweens for me from my keys. (In 2D :)

Jason.


jhocking(Posted 2003) [#4]
Doh, I forgot this was the 2D forum. Yeah, I was talking about 3D. Still, my questions were all valid. You still haven't explained what you want the tweens to look like. After all, to simply move an image from one side of the screen to the other doesn't require any animation; you just increment the position used with DrawImage every frame. If on the other hand you are after a character rotating from facing one way to facing the other then you will need animation. What exactly are you animating?


QuickSilva(Posted 2003) [#5]
The actual object I am animating is irrelevant, it`s just an example. I am trying to create an animation tool, like the excellent Stick Fighter\ Editor made by Cyberseth that will allow you to set a begining and ending poses and then the program works out the rest (tweens) from these and exports the whole animation as an anim strip for later use from Blitz.

Jason.


jhocking(Posted 2003) [#6]
Actually, the process is very specific to the object. For example, in Stick Fighter you have to have an object/character comprised of, well, sticks. The tweens are generated by some sort of skeletal animation-like system which tracks how the various sticks would have to rotate to get from the first keyframe to the last. If you were using a different sort of object the process would be entirely different. For example, to generate tweens between two different arbitrary images you would need to do some sort of morphing.

That by the way gets at how, in a general sense, to accomplish something like the Stick Fighter editor. You would create a simple skeletal animation system in which you track various joints, how far apart they are (ie. how long limbs are,) and how they are connected. Then you use that information to determine how the joints are rotating between the keyframes. Finally, you just draw lines connecting the joints to generate the actual images.

For something more complicated that stick figures you may need to actually do this in 3D (depending on the specific animation.) Note I'm not saying you need Blitz3D, although that would make it a lot easier. There are after all examples of doing 3D in 2D, and there's the OpenGL lib. At any rate, you create the animation in 3D but then render out images to assemble the animation strip.

*********

Oh, and that last post finally cleared up for me what you are trying to accomplish.


QuickSilva(Posted 2003) [#7]
Thanks for the help Joe.

Jason.