Using the android port for GLES 1.1.
There are about 15,000 polygons in the scene.
Terrain, skydome, static and animated 3D objects are models of the scene.
FPS is 28 - 30.
Using skeletal animation.
To play the animation using two meshes of format .X.
One for basic animation of running.
Second to play advanced animations: attack, defense, etc.
The second model contains a sequence of 114 frames for 8 animations and takes 250 polys.
Now, what is the actual problem.
When the scene is fully loaded and rendering starts
even the basic animation is not played immediately.
It takes 0.8 - 1 second before the animation begins.
At the same time the rest of the scene is rendered without any problem
and demostrate a decent FPS for mobile devices (28 - 30).
And of course the main problem is switching between animations in the model,
where a few animations.
I do not think this is actually true, but there is a feeling
as if the animation has a lower priority than the rest of the scene rendering.
It seems that the engine pays less attention to the operation of animated models,
than all the rest.
The following snippets of code that I use to load and switch the animation.
Code: Select all
Parent = smgr->addEmptySceneNode(0);
// Load main node with basic (walk) animation
Node = smgr->addAnimatedMeshSceneNode(smgr->getMesh(modelPath), Parent);
// Load node with extended animations
ExtAnimNode = smgr->addAnimatedMeshSceneNode(smgr->getMesh(extAnimModelPath), Parent);
ExtAnimNode->grab();
ExtAnimNode->remove();
================
Switch to fight for example
ExtAnimNode->setPosition(Node->getPosition());
ExtAnimNode->setParent(Parent);
ExtAnimNode->drop();
ExtAnimNode->setAnimationSpeed(ANIMATION_SPEED);
ExtAnimNode->setLoopMode(true);
ExtAnimNode->setCurrentFrame(55.f);
ExtAnimNode->setFrameLoop(55, 64);
ExtAnimNode->setVisible(true);
Node->grab();
Node->remove();
================
// animation speed
const f32 AnimationController::ANIMATION_SPEED = 24.0f;