Page 1 of 3

Character Animation System

Posted: Tue Jun 19, 2012 1:21 pm
by RdR
Hello,

We (Erelas and I) have been working on a Character Animation Sytem for our graduation project the last few weeks.
We designed it in a way it can be used independent from the render & physics engine, as a demo we're using Irrlicht to render the skeleton and skin.
This way its easy to integrate it in any project to animate your characters.

Features
- Arbitrary bones per skeleton
- Multiple skins per skeleton
- Multiple animations per skeleton
- Arbitrary keyframes per animation
- Animation controls for speed, direction, looping, weight control and keyframe range
- Animation mixing
- Animation interpolation (linear)
- Animation blending
- Animation synchronization
- Animation layering
- Animation mirroring
- Animation fading:
  • - Fade in
    - Fade out
    - Cross fade between 2 animations
- Procedural animation support
- Custom (binary) file formats
- 3DS Max exporters
- Multithreading
- Multiple texture per skin
- Character bone attachments
- Per bone scaling
- Per bone/per animation weighting
- Per bone/per animation scaling
- LOD
- Custom controllers
- Event callbacks
- Inverse Kinematics
- Hardware skinning
- Software skinning

TODO
- More LOD options (on multiple levels, skin, animation & skeleton)
- Bezier interpolation for animations
- Optimizations



Screenshot
Image

Video
TODO

If anyone has some suggestions for useful features, post them ^^
Btw I'm not sure if its correct to post it in this category, if not let me know.

Side note:
We're using C++11 to develop for this system.
So far it is really nice and fast development. I recommend people to try it out asap!
Its supported by GCC 4.7+ and VS 11 (VS 2012)
For MinGW: http://sourceforge.net/projects/mingwbuilds/

Re: Character Animation System

Posted: Tue Jun 19, 2012 2:01 pm
by hybrid
Yeah, definitely the correct forum and a very interesting project. Is it hardware or software skinned?

Re: Character Animation System

Posted: Tue Jun 19, 2012 2:21 pm
by Burns
Look nice!

Re: Character Animation System

Posted: Tue Jun 19, 2012 2:22 pm
by RdR
hybrid wrote:Yeah, definitely the correct forum and a very interesting project. Is it hardware or software skinned?
Oke good ^^ The characters are hardware skinned (Still WiP tho).
Focus was to implement the skeletal animation features first.
Burns wrote:Look nice!
Thanks, will upload a video soon (When I get some decent animations for a better demonstration)

Re: Character Animation System

Posted: Wed Jun 20, 2012 2:36 am
by Virion
nice. can't wait for the video. :D

Re: Character Animation System

Posted: Fri Jun 22, 2012 5:15 pm
by REDDemon
Does that do polar interpolation for rotations or just linear interpolation of matrices? :) great work. If not you can easily add that for more realistic animations even with few keyframes (very memory wise especially for mobile devices)

Re: Character Animation System

Posted: Fri Jun 22, 2012 5:46 pm
by RdR
REDDemon wrote:Does that do polar interpolation for rotations or just linear interpolation of matrices? :) great work. If not you can easily add that for more realistic animations even with few keyframes (very memory wise especially for mobile devices)
I'm not familiar with the term polar interpolation, but the interpolation is done with spherical linear interpolation (slerp).
Any good reads about polar interpolation (for quats)?

And bezier/curve interpolation is still on our TODO list.

Re: Character Animation System

Posted: Fri Jun 22, 2012 7:25 pm
by REDDemon
very nice :)

Re: Character Animation System

Posted: Fri Jun 22, 2012 8:33 pm
by RdR
REDDemon wrote:very nice :)
Thanks. But what did you ment with polar interpolation?

Added TODO list to start post:
- Multi threading
- LOD (on multiple levels, skin, animation & skeleton)
- Bezier interpolation for animations
- Optimizations

When we're finished with our graduation we would like to make this project open source.
If anyone has suggestions for features or you miss something please post it!

Re: Character Animation System

Posted: Fri Jun 22, 2012 10:21 pm
by Nadro
This project looks really interesting :)

Re: Character Animation System

Posted: Sat Jun 23, 2012 8:46 am
by REDDemon
sorry for me polar interpolation = slerp. Didn't know english term for that ^^

Re: Character Animation System

Posted: Wed Jun 27, 2012 3:54 pm
by fmx
Good work there :D
very extensive feature set already, i cant think of anything else to suggest

How about the option for custom bone control, for ragdolling etc?
I know that sounds trivial, but you haven't mentioned it in your list

Re: Character Animation System

Posted: Wed Jun 27, 2012 6:55 pm
by RdR
fmx wrote:Good work there :D
very extensive feature set already, i cant think of anything else to suggest

How about the option for custom bone control, for ragdolling etc?
I know that sounds trivial, but you haven't mentioned it in your list
Thanks!

Yes, we have thought about those cases.
The core system has a list of controllers which handle all characters each frame, by default only a AnimationController is supplied in the source.
That way its possible to create and register your own controllers, like an InverseKinematicsController, LODController and more.
Because its separated from the main system, its easy to integrate with your current applications and physics libs.
You can access the skeleton and more from the character instance supplied by Controler::animate()

A priority needs to be supplied when constructing the controller so you can order the controllers the way you like.

Controller interface:

Code: Select all

 
class Controller
{
private:
        unsigned int m_priority;
 
public:
        /**
         * Constructor
         * @param priority the priority for CAS in which order the controllers are used ( 1 = high priority )
         */
        Controller(unsigned int priority);
 
        /**
         * Destructor
         */
        virtual ~Controller();
 
        /**
         * Animate an character
         * @param character
         * @param deltaTime in seconds
         */
        virtual void animate(std::shared_ptr<Character> character, float deltaTime) = 0;
};
 

Re: Character Animation System

Posted: Fri Jul 06, 2012 4:10 pm
by RdR
After some time working on documentation (thesis), we implemented some more stuff:

- Multi threading, using a thread pool
- LOD options for animation & skeleton (more options to come)
- General optimizations

Also created a benchmark application, to test the performance of the library (without rendering).
And the results are nice imo (not sure what other library do).

Will create a video when I get some better looking animations (current animations are crappy looking).

Screenshot animating multiple characters separately (using the same controls, so they have the same pose).
Colors define the LOD level they are in.
LOD Distances are customizable per character, so its possible to prioritize characters.
Image

Re: Character Animation System

Posted: Sat Jul 07, 2012 11:50 am
by Mel
Looks awesome :)