Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Animation Creation, Editing, and Playback LIbrary  (Read 3830 times)

0 Members and 1 Guest are viewing this topic.

Chet

  • Newbie
  • *
  • Posts: 8
    • View Profile
Animation Creation, Editing, and Playback LIbrary
« on: May 15, 2018, 05:50:45 am »
A couple years ago I created a quick proof of concept to different aspects of putting together a package to handle key frame based animations much like you can do with tools like After Effects and HitFilm. It has basic support for assets, footage, layers, and compositions along with linear, Bezier, ellipse, and spline (incomplete) path interpolation.

The code is fairly rudimentary and a bit incomplete but I figured someone else might find it useful. Since it was created as a PoC there are quite a few things that could be done a lot more effectively if some time was spent sanitizing it a bit more. Iv'e attached a snapshot of the source in case anyone is interested.

Sample playback:




Some general details.

Project files are for VS2017.
Built and tested on SFML 2.4.2 (should work on 2.5)
SFML library should be dropped into externals/SFML or change the solution macro SFMLDir to point to the location containing your copy of SFML.
Build with modern C++.
Includes test/examples.
Intended more for authoring content. Playback in games would be handled a bit more efficiently.
Modeled after concepts common in applications in HitFilm and Adobe After Effects.
Includes bugs so there's no need to buy your own.


Emjoy!


I'll push this to GitHub when I get some free time.
« Last Edit: May 15, 2018, 06:41:13 am by Chet »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: Animation Creation, Editing, and Playback LIbrary
« Reply #1 on: May 15, 2018, 07:55:56 am »
Nicly done! :)

You only show tge scene itself in the video, what does the "editor" look like?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Chet

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Animation Creation, Editing, and Playback LIbrary
« Reply #2 on: May 15, 2018, 08:11:48 am »

You only show tge scene itself in the video, what does the "editor" look like?

Thanks! There is no editor. During the development of the PoC I switched to using HitFilm Express for authoring. The XML was imported into another tool and animations were produced in the PoC as well as other libraries I was working on. Everything in the video was done programatically and the code is included in the snapshot.

I'm hoping to find the import code I wrote for it so I can throw it in there was well.

Chet

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Animation Creation, Editing, and Playback LIbrary
« Reply #3 on: June 03, 2018, 09:02:08 pm »
I found some time to make a few updates...

  • At the lower level Coordinate, Size, Point, Anchor, and Scale were reduced to a single template implementation taking both a type and a tag argument.
  • The keyframe has been split into 3 distinct types (pending reducing down to two). A basic key frame, a temporal keyframe, and a spacial keyframe. All keyframes have temporal curves but only a few have spacial curves. The basic keyframe and temporal are being merged together.
  • The temporal and spacial keyframes contain input and output arguments for the curve. These were originally contained in the interpolators but have been moved into the keyframe. The original implementation put the input argument of a keyframe in the keyframe that comes before it - terrible idea!
  • The functionality in property timeline has been split into a keyframe map (container adapter - mostly), basic property timeline, temporal property timeline and spacial property timeline. Like the keyframe the basic timeline and temporal timeline will be merged.
  • The Ellipse and Spline interpolators have been removed. Their functionality will be replaced by some type of expression that can be attached to the keyframe.
  • Removed serialization code (unnecessary at this point)
  • Added a very basic brute force loader for HitFilm project files. It supports static images (image sequences are next), compositions, layers, and the primary transform properties (angle, opacity, position, etc.). Spacial properties support constant, linear, and bezier curves. Temporal properties only support constant linear at the until I can swap out entire curve code. It supports enough features that I've eliminated the demo code in favor of using HitFilm projects. It _could_ support HitFilm composition shot files I just haven't gotten to it.

I'm going to clean up the code this afternoon and push it to github along with some additional videos to YouTube.

 

anything