Custom IAnimatedMeshSceneNode class or something alike
Posted: Tue Mar 03, 2009 10:41 pm
Hi again...
As I already mentioned in the topic title, I need to create a custom class, very similar to IAnimatedMeshSceneNode (or somewhat, since it turned to be only a virtual header class- CAnimatedMeshSceneNode.cpp). The last three days I`m exploring the Irrlicht source code to become familiar what`s going on there. I tried to create copies of IAnimatedMeshSceneNode.h, CAnimatedMeshSceneNode.cpp and some others related to them, renamed and edited their class names etc, but it looks like all the stuff is tightly connected- like IAnimatedMeshSceneNode leads to ISceneNode and on.
I`m creating my node with my custom class, everything complies well and on, but it looks like all the changes I make in my custom classes take no effect or lead to errors, not to mention that I`m still far from achieving my goal.
Everything became far too complicated for my N00B skills, so here I`m asking for some advice on how things should be done, because I`m not that fluent in Irr or C++ as well. ( I believe I`m much better modeller and artist than a programmer. )
I`m not asking for someone to do it for me. I just need someone try to explain me how such a thing will have look like done in Irrlicht. Yeah, I hardly tried HkAnimation also, but as expected I cannot integrate it to Irr.
So here`s what I`m trying to do:
1) Load animated .X (or any of the other bone-supported types)
2) From my custom class to access all joints and their key rotations from the buffer (.X)
3) Be able to call sth like: joint_Head->setAnimationLoop( beginframe, endframe, speed) and only the head will move, following the model keyframe animation- as defined in the modelling program (3dsMax9 in this case using kW exporter) and all other joints will be static, waiting for a command to animate them also.
All this is done for the idea of dividing the joints(bones) into joint groups like BONE_GROUP_UPPERBODY and BONE_GROUP_LOWERBODY and on, and this way to be able to keyframe animate particular parts of the body independantly from the others, because for now I can only keyframe animate the whole body, and for example rotate some limbs, which isn`t giving much agility to the animation.
PS: I already took a look at ray`s Skeleton Animation example(actually almost learned everything by heart), understood the CustomSceneNode tut, explored the source( the X loader too), searched the forum, googled it, and really did my best doing it myself...
Thanks for your time.![Wink :wink:](./images/smilies/icon_wink.gif)
As I already mentioned in the topic title, I need to create a custom class, very similar to IAnimatedMeshSceneNode (or somewhat, since it turned to be only a virtual header class- CAnimatedMeshSceneNode.cpp). The last three days I`m exploring the Irrlicht source code to become familiar what`s going on there. I tried to create copies of IAnimatedMeshSceneNode.h, CAnimatedMeshSceneNode.cpp and some others related to them, renamed and edited their class names etc, but it looks like all the stuff is tightly connected- like IAnimatedMeshSceneNode leads to ISceneNode and on.
I`m creating my node with my custom class, everything complies well and on, but it looks like all the changes I make in my custom classes take no effect or lead to errors, not to mention that I`m still far from achieving my goal.
Everything became far too complicated for my N00B skills, so here I`m asking for some advice on how things should be done, because I`m not that fluent in Irr or C++ as well. ( I believe I`m much better modeller and artist than a programmer. )
I`m not asking for someone to do it for me. I just need someone try to explain me how such a thing will have look like done in Irrlicht. Yeah, I hardly tried HkAnimation also, but as expected I cannot integrate it to Irr.
So here`s what I`m trying to do:
1) Load animated .X (or any of the other bone-supported types)
2) From my custom class to access all joints and their key rotations from the buffer (.X)
3) Be able to call sth like: joint_Head->setAnimationLoop( beginframe, endframe, speed) and only the head will move, following the model keyframe animation- as defined in the modelling program (3dsMax9 in this case using kW exporter) and all other joints will be static, waiting for a command to animate them also.
All this is done for the idea of dividing the joints(bones) into joint groups like BONE_GROUP_UPPERBODY and BONE_GROUP_LOWERBODY and on, and this way to be able to keyframe animate particular parts of the body independantly from the others, because for now I can only keyframe animate the whole body, and for example rotate some limbs, which isn`t giving much agility to the animation.
PS: I already took a look at ray`s Skeleton Animation example(actually almost learned everything by heart), understood the CustomSceneNode tut, explored the source( the X loader too), searched the forum, googled it, and really did my best doing it myself...
![Confused :?](./images/smilies/icon_confused.gif)
Thanks for your time.
![Wink :wink:](./images/smilies/icon_wink.gif)