2
\$\begingroup\$

So I have an animated sprite of 15 frames, needless to say, at 15 frames, it plays jumpy with a low frame rate.

I want to increase that, by somehow tweening or generating intermediates between the authored animation frames.

I found tools that do frame interpolation for video, and I'm wondering whether similar techniques could be applied to sprite sequences.

Do you know any methods I could use to tween my sprites?

\$\endgroup\$
  • \$\begingroup\$ We don't do tool requests here, so I've edited your post to ask for methods to solve the problem instead. (Those methods could include "try using this tool..." but now the question also supports DIY implementations and techniques that use a mix of tools and custom work). It may help if you share an example of the type of sprite animation you're trying to tween - some animations lend themselves to different techniques. Also, can you describe the process used to create the frames? Sometimes going back to the source (like a layered PSD/flash or 3D model) can help create better intermediates. \$\endgroup\$ – DMGregory Mar 27 '17 at 17:00
  • 1
    \$\begingroup\$ Just happened across an interesting technique using hand-tagged control points to "morph" sprite frames into one another: twitter.com/LxFrancis/status/853011516005597184 \$\endgroup\$ – DMGregory Apr 15 '17 at 14:49
1
\$\begingroup\$

Well, in traditional pen and paper animation. tweening is just adding another frame between two frames and drawing it, and doing it over again until when each image is display back to back in short succession it creates the illusion of fluid motion.

one way of artificially tweening is to alpha blend between each frame a extra one. for example, frame 1 and frame 2 have an additional frame placed inbetween which is frame 1 at at 50% opacity/transperency sitting on top of frame 2. your can add more transitions as you like to make it even longer just like regular animation. typically the more frames you add the shorter you want the duration each frame gets displayed.

Rinse repeat for each frames in order.

This will sort of "blend" the frames into one another.

you can hard code this into the animation by manually doing this in your image editor. or you can do it within your game engine. there is alway the option to code it yourself as well.

I think of this like interpolation of the frames.

Now personally. I like to adjust how long each frame is shown(usually in milli-seconds), make it longer or shorter till the animation feels right easier.

I usually make my stuff in PhotoShop. and then code the animation graphics in C++ and SDL2 and SDL_image.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.