Looking for libraries to animate a human avatar in C++

If your topic doesn't fit anywhere else, put it here.

Moderator: joepal

Looking for libraries to animate a human avatar in C++

Postby pierard » Wed Feb 04, 2015 10:08 pm

I need some knowledge this community most probably has, since a large part of what I am looking for is very very close to MakeHuman. For research purposes, I need to have a realistic 3D human avatar walking along arbitrary, sometimes curved, paths, in realtime in a C++ program (for linux). So, nothing precomputed in blender or something like this. Moreover, I need to be able to tune its morphological characteristics (musculature, height, etc.). This leads me to three questions.

(1) I do not find anywhere a list of libraries providing human avatars that can be animated. Of course, I am aware of the existence of the MakeHuman. This project was exactly what I am looking for, but the development was interrupted and left incomplete a few years ago after version version 0.9.1. After that, the developers shifted a little bit their target and started developing a new version (1.0) from scratch, in python. It seems that it is not possible anymore to animate the avatar directly with the software provided by the MakeHuman team. Since I need to animate the avatar by myself inside my application, blender is not a solution for me. I am not sure if using the old version (0.9.1) of your project (even if it does nearly exactly what I need) is a good idea since it not supported anymore. Thus, is there any alternative? The “only” thing I need is to provide the pose parameters, the morphological parameters, and to recover the avatar's geometry (e.g. a mesh) to perform computations on that.

(2) I am also wondering if there exists libraries to apply a pose to an avatar. On the one hand, the pose parameters of MakeHuman 0.9 are related to angles, some of them expressed in degrees, but not all of them (note that I observed that for some joints the unit used for positive bending if different that the one used for negative bending). On the other hand, the pose parameters provided by pose recovery methods (for example the one provided with Microsoft's kinect) are the 3D cartesian coordinates of each joint, and these joints are different of those of MakeHuman. Another difficulty is that the pose parameters derived from the kinect are not always anatomically possible (strong asymmetry and variability of bones length, joint angles that are not anatomically possible, etc.) I spend some time writing code to convert the set of pose parameters of the kinect into the set of pose parameters of MakeHuman. My code works, but there remains some imperfections due to assumptions I made that are not completely true in practice. It turns out that the mapping between such two sets of pose parameters is an interesting, but quite complicated problem. So, I am wondering if there exist specialized libraries to do that.

(3) Last but not least, does it exist any library that can compute the motion of a human, with any morphological characteristics, walking along a given path. I saw a very nice demo at http://www.biomotionlab.ca/Demos/BMLwalker.html, but there is nothing I can reuse. I also discovered the nice work of Joëlle Tilmanne (http://tcts.fpms.ac.be/~tilmanne) but I found nothing I can use out-of-the-box in her webpage. I would like to get the motion for any shape of path, and to tune parameters such that the gender, the age, the weight, the height, etc. If possible, I would like also to be able simulate gait pathologies. The more realistic the gait is, the better it is.

To summarize, I would like to be able to do something like:
Code: Select all
Avatar avatar; avatar.setAge (...); avatar.setHeight(...); avatar.setGender(...);
avatar.setPoseFromMocap (...);
Mesh mesh = blender.getMesh ();

and also:
Code: Select all
Avatar avatar; avatar.setAge (...); avatar.setHeight(...); avatar.setGender(...);
avatar.setWalkingPath (...);
for ( unsigned int frame_id = 0 ; frame_id < ... ; ++ frame_id ) { Mesh mesh = avatar.getMesh ( frame_id ); ..... }
pierard
 
Posts: 2
Joined: Wed Feb 04, 2015 9:53 pm
Location: Liège, Belgium

Re: Looking for libraries to animate a human avatar in C++

Postby Manuel » Wed Feb 04, 2015 11:11 pm

Hi Pierard,
we are working for bvh support in MH 1.1, but it's python.
Manuel
 

Re: Looking for libraries to animate a human avatar in C++

Postby duststorm » Thu Feb 05, 2015 10:57 am

CAL3D has long been the open source reference implementation.
It's not very maintained anymore, then again, I think it's mostly finished and working.

http://home.gna.org/cal3d/
MakeHuman™ developer
User avatar
duststorm
 
Posts: 2569
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium

Re: Looking for libraries to animate a human avatar in C++

Postby Ghastly » Sat Feb 07, 2015 7:07 pm

There's also the classic CMU .BVH library of animations. Some of the animations as a whole aren't too useful, but if you have software capable of cutting and pasting segments of the BVH files you can use bits and pieces to create some pretty good animations. There's some nice walking segments in there to be had.

They're all at a ridiculously high frame rate which you would never use (I think something like 150 frames per second) but you can decimate them down to a more managable 15fps which is more than fine for animation (most classic cel animation is only drawn at 12 frames per second and motion pictures were only 24 frames per second).

http://mocap.cs.cmu.edu/

Some of the animations look really weird without the props. Like the ones of people swinging on monkey bars or other playground equipement. There are some weird artifacts too in some of the animations. But hey, public domain is public domain.
Ghastly
 
Posts: 98
Joined: Tue Nov 27, 2012 2:42 am
Location: Hamilton, Ontario, Canada

Re: Looking for libraries to animate a human avatar in C++

Postby pierard » Fri Feb 13, 2015 12:34 pm

Thank you very much for your fast replies!

I will take a closer look at CAL3D. It seems to be a good starting point.

And for the motion, thanks for pointing the database, but I was hoping something more like an algorithm predicting the pose at each instant. In the scientific literature, there are numerous papers given statistical characteristics of the gait, for men, women, young, old, etc people. I see there the possibility not only to reproduce the gait of a given individual, but also to synthesize gait for new “virtual” persons, and to have “an average gait”. This makes sense in the context of my research project. I continue to look for it.
pierard
 
Posts: 2
Joined: Wed Feb 04, 2015 9:53 pm
Location: Liège, Belgium

Re: Looking for libraries to animate a human avatar in C++

Postby duststorm » Sat Feb 14, 2015 12:55 am

You could also check out the smartbody project, its pretty nifty
MakeHuman™ developer
User avatar
duststorm
 
Posts: 2569
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium


Return to General discussions about makehuman

Who is online

Users browsing this forum: No registered users and 3 guests