<< Little update | Home | miniLD#20 - greedy fishing >>

jME2 meshAnimation

Ok, I finally made a version for jME2. To achieve that I also created a userfriendly way to create MeshAnimations programmatically and not only as import from ogre-files. Now you can create MeshAnimation keyframe-based on time,pose and weight like this:

MeshAnimationWrapper manualAnimationWrapper = new MeshAnimationWrapper(face);   
manualAnimationWrapper.addPoseKeyFrame("MouthOpen", 2f,0);
manualAnimationWrapper.addPoseKeyFrame("MouthOpen", 4f,1);
manualAnimationWrapper.addPoseKeyFrame("MouthOpen", 4.5f,1);
manualAnimationWrapper.addPoseKeyFrame("MouthOpen", 5f,0);
// once we created all keyframes we can create an the meshAnimation with the
// specidifed name and register it to meshAnim (which means that you can use it by name
// e.g.: meshAnimController.setAnimation("animation");
MeshAnimation meshAnimation = manualAnimationWrapper.createMeshAnimation("animation",animContr);

This animation can be added to the attached MeshAnimationController….the sample combines Mesh- and skeletal-animation and looks like this:

I commited all relevant files and the demo can be found in the jME2-repository:


Tags : ,

Export this post as PDF document  Export this post to PDF document

Social Bookmarks :  Add this post to Slashdot    Add this post to Digg    Add this post to Reddit    Add this post to Delicious    Add this post to Stumble it    Add this post to Google    Add this post to Technorati    Add this post to Bloglines    Add this post to Facebook    Add this post to Furl    Add this post to Windows Live    Add this post to Yahoo!