Hello everybody. As i understand it, you create models in 3DSMax and include their movement/motion data inside this model. Then in Irrlicht, you can chose from any of the included animations in that model-file. So, when you have 2 models which have the same motion (jumping), they still each must have their own jumping-motion included in their own model file. Isnt there already a way to separate the motion-data from the model-data? I imagine this: you have 1000 different models (which all have a humanoid skeleton), but only one motion-data file. inside irrlicht, you can then make all those different models jump anyways, beacause you apply that one motiondata file to their skeletons on the fly. isnt that already possible with irrlicht?
thanks for answeers, bye bye.
Model & separate motion data
Re: Model & separate motion data
It seems it is possible.
In my test project I have created many model with bones(biped) and applied skin modificator and without animation.
After that I created one biped that has the same bone structure as in the models. Then I made walk animation in biped and exported all models in X format.
In irrlicht I loaded all models and biped, and write following code:
And after that:
After that my models have animation from biped.
I did not tested this way very much, but it seems, that model's skeleton and biped's skeleton should have equal size, in other way all animations will be messed.
And I am wonder, can I remove bipedMesh after animation copy. or "useAnimationFrom" creates just reference to animation data inside bipedMesh...?
In my test project I have created many model with bones(biped) and applied skin modificator and without animation.
After that I created one biped that has the same bone structure as in the models. Then I made walk animation in biped and exported all models in X format.
In irrlicht I loaded all models and biped, and write following code:
Code: Select all
ISkinnedMesh*modelMesh=dynamic_cast<ISkinnedMesh*>(model->getMesh());
if(modelMesh==NULL){
Utils::errorLog(L"Mesh is not ISkinnedMesh. Cannot make \"useAnimationFrom\"");
return false;
}
modelMesh->useAnimationFrom(bipedMesh);
Code: Select all
biped->setVisible(false);
I did not tested this way very much, but it seems, that model's skeleton and biped's skeleton should have equal size, in other way all animations will be messed.
And I am wonder, can I remove bipedMesh after animation copy. or "useAnimationFrom" creates just reference to animation data inside bipedMesh...?
Re: Model & separate motion data
Hello Otaka, I totally forgot to say thanks for your reply. Bye bye!
Re: Model & separate motion data
And notice for some one,who is very inattentive as I am!
You should check, if Irrlicht library compiled with enabled RTTI. Without RTTI operator "dynamic_cast" stops to work, and you will spend time to understand why.
You should check, if Irrlicht library compiled with enabled RTTI. Without RTTI operator "dynamic_cast" stops to work, and you will spend time to understand why.