Page 1 of 1

What to do to efficiently use an external animation library?

Posted: Tue Sep 14, 2010 10:44 am
by eye776
I'm trying to cut as much as possible out of irrlicht's keyframe "animation pipeline", to remove overhead.

I'm using EJUOR_CONTROL to position bones with an external animation library.

Sorry, for stating questions in bold to attract attention.
Many people use the TL;DR way of reading. :D

Is this enough ?
1) Strip animation and
2) Call setRenderFromIdentity(true) for the scene node

This is how keyframes are stripped:

Code: Select all

ACTORTOOLDLL_API void ACTORTOOLDLL_CALLCONV EditStripAnimation()
	{
		if(__AT_CONTEXT->__AT_WORK_MESH == NULL)
			return;

		if(__AT_CONTEXT->__AT_WORK_MESH->getMeshType() == scene::EAMT_SKINNED)
		{
			core::array<scene::ISkinnedMesh::SJoint*> joints = 
				((scene::ISkinnedMesh*)__AT_CONTEXT->__AT_WORK_MESH)->getAllJoints();
			
			for(u32 i = 1; i < joints.size(); i++)
			{
				//Clear all joint animation keys - model takes less space on disk
				joints[i]->PositionKeys.clear();
				joints[i]->RotationKeys.clear();
				joints[i]->ScaleKeys.clear();
			}
		}
	}
Is there something else that can/ has to be done for better performance ?
Is this enough for using the same mesh with multiple scene nodes ?

EDIT: Well, nevermind, the question is badly written. I'll think it over and ask later.