Question about vertex animation exporting

alexgis

23-01-2009 01:19:48

When I export a model with vertex animation, all the information about vertext animation (such as keyframes) is exported into the OSM file. The mesh file is 'neat'.

It seems that the vertex animation could be included in mesh file (you can find some interface in ogre source files such as "hasVertexAnimation"), but how to export such a mesh file with ofusion as I wish?

btw, my ofusion is 1.8.6 CE version.

anyone could help me?

Lioric

23-01-2009 15:48:21

What is exported in the OSM file is the node animation data (the complete object transformation keyframes), not the vertex animation data, Vertex and Pose animation data are produced within the .mesh file

Probably your object has node animation and vertex animation, then the node animation is in the OSM scene and the vertex is in the .mesh file

This is from the "Vertex Animator Demo" application available from the support center, used to animate ALL vertex animation in your entity:


if(entity->hasVertexAnimation()) {
Ogre::AnimationStateSet* animStateSet = entity->getAllAnimationStates();

Ogre::AnimationStateIterator it = animStateSet->getAnimationStateIterator();

while(it.hasMoreElements()) {
AnimationState* anim = (Ogre::AnimationState*)it.getNext();
anim->addTime(evt.timeSinceLastFrame);
}
}


If you need to animate specifics animations only, get the entity's AnimationState by name