Skinning and morphing problem

AlKatar

04-11-2007 18:05:21

Hi every one,

I am looking into exporting models that can be animated by skeletal animation and pose animation.

But I have a problem :
My model is composed of two meshes : head and body both skinned to the same skeleton.
The mesh deforms fine when I play my walk animation.
But the problem is when I export my talk animation. Indeed ofusion exports both pose and skeletal animation data.
As a result when I play the talk and the walk animation the mesh do not deform fine because both walk and talk have got some seletal animation data.

So my question is : When you export pose animation how do you stop ofusion from exporting skeletal animation data as well ?

Thanks for you answer,
--
Erwan

Lioric

05-11-2007 14:38:21

Pose and skel animations are exported separately, the exported object should be played correctly in your application, when playing either of the animations or both at the same time

Could you provide more details on what is your animation issue, screenshots?

AlKatar

05-11-2007 15:02:28

In fact the problem is that when ofusion exports pose animation data it also exports skeletal animation data.
As a result I have got a "Talk" animation inside the .mesh file (pose animation)
AND a "Talk" inside the .skeleton file (skeletal animation), which is useless because the skeleton is not moving when he talks.

So when I play my "Walk" (skeletal only) and "Talk" (pose only, but there is skeletal animation that I don't want) animation, here what's hapening. Ogre is blending the two skeletal animations and as one of them is not moving the result movement is half the movement :
http://img50.imageshack.us/my.php?image ... badve4.jpg
The body is playing the correct animation, but the head is morphing and blending two skeletal animation tracks so the movement is not the one expected.

So If I remove the "Walk" skeletal animation data from the .skeleton file it works fine :
http://img212.imageshack.us/img212/8569 ... oo3.th.jpg

So the solution might be to either stop ofusion from exporting skeletal animation for the "Talk" animation or to disable the skeletal animation track inside Ogre, but I couldn't find none of those.

Thanks for your help,
--
Erwan

Lioric

06-11-2007 03:08:51

If you enable the pose "talk" animation and the skel "walk" animation only, a skel "talk" animation must be not played (or even enabled if you didnt)

Are you sure you are not enabling the skel "talk" animation?

In any case, an empty skel animation should not be created, could you provide the scene file to review this issue?

AlKatar

06-11-2007 22:51:01

Thanks for your answers !
How do you enable the "Talk" pose animation only ?

All I did for now is :

mCharAnimStateTalk = characterHead->getAnimationState("Talk");
mCharAnimStateTalk->setEnabled (true);

So that means it selects both pose and skeletal. I guess.

--
Erwan

Lioric

10-11-2007 02:24:54

You can get a pose animation only with

Entity -> getMesh -> getAnimation(name)

But you might have to update it manually each frame (apply method), or create an animationState for it to be auto updated

Or you can use the event callback system (if you are using the osm scenes) to get notified when loading animated entities and do a fast parse of the skel anim track and remove them if they dont have any sensible keyframes

As posted previously, those skel tracks (without any keyframes) should not be created, if you provide the scene i will review it