[SOLVED]Dynamic Motions with Animations using CAL3d
[SOLVED]Dynamic Motions with Animations using CAL3d
Hi,
I m using Cal3d for animations in my game . I need help in mixing some dynamic bone motions with predefined ones . When i rotate any bone , i m able to do that but only when there is no animation loaded on my character, but otherwise it is not rotated. May be i know wht the reason behind this is that when an animation is loaded then it updates all bones according to the defined animation data , that is why any of my rotations are not done at the time when an animation is loaded.
Can anybody help that how can i rotate a bone along with my predefined skeletal animations ?
Edit:- I was able to do that. Here is what i did , hope this can help any other programmer in mixing runtime motions with predefined animations using Cal3d
I brought my bone to its core state ( the state where it was before animations) then i applied the rotations to this bone and updated the skeleton to calculate the original state and finally i got the o/p.
I m using Cal3d for animations in my game . I need help in mixing some dynamic bone motions with predefined ones . When i rotate any bone , i m able to do that but only when there is no animation loaded on my character, but otherwise it is not rotated. May be i know wht the reason behind this is that when an animation is loaded then it updates all bones according to the defined animation data , that is why any of my rotations are not done at the time when an animation is loaded.
Can anybody help that how can i rotate a bone along with my predefined skeletal animations ?
Edit:- I was able to do that. Here is what i did , hope this can help any other programmer in mixing runtime motions with predefined animations using Cal3d
I brought my bone to its core state ( the state where it was before animations) then i applied the rotations to this bone and updated the skeleton to calculate the original state and finally i got the o/p.
Re: [SOLVED]Dynamic Motions with Animations using CAL3d
Hi!
This post is really old... But, could you post the code part how you did that?
Thanks in advance,
Braun
This post is really old... But, could you post the code part how you did that?
Thanks in advance,
Braun
Re: [SOLVED]Dynamic Motions with Animations using CAL3d
It would do no good - it predates the "New Animation System". You probably want to set EJUOR_CONTROL on any bones you want to control. Set the bones after calling the animation function (I forget the name).
Re: [SOLVED]Dynamic Motions with Animations using CAL3d
But using Cal3D? The modeler/animator I am working with is exporting Cal3D models, but I would like to move their heads towards important assets on the scene. So far I managed to get real close, but I changed the Cal3D lib in some classes... So I believe there must be an easier way for that.
Re: [SOLVED]Dynamic Motions with Animations using CAL3d
Are you using a custom scene node to render the mesh that you get from Cal3d? If so, the animation is in your hands.
Re: [SOLVED]Dynamic Motions with Animations using CAL3d
Yes, I worked on a custom scene node, playing animations is just fine, the real problem is mixing "code animations" with the other ones already presented in the model.
"Edit:- I was able to do that. Here is what i did , hope this can help any other programmer in mixing runtime motions with predefined animations using Cal3d
I brought my bone to its core state ( the state where it was before animations) then i applied the rotations to this bone and updated the skeleton to calculate the original state and finally i got the o/p."
I believe that is the exactaly piece of code I would like to see hehehe
I will keep trying some stuff, if I manage to mix the animations I'll post here the code in case another programmer face the same trouble again
"Edit:- I was able to do that. Here is what i did , hope this can help any other programmer in mixing runtime motions with predefined animations using Cal3d
I brought my bone to its core state ( the state where it was before animations) then i applied the rotations to this bone and updated the skeleton to calculate the original state and finally i got the o/p."
I believe that is the exactaly piece of code I would like to see hehehe
I will keep trying some stuff, if I manage to mix the animations I'll post here the code in case another programmer face the same trouble again
Re: [SOLVED]Dynamic Motions with Animations using CAL3d
Maybe the real answer is to convert the animations on the model into Cal3d format. Then you can mix them as much as you want.
Re: [SOLVED]Dynamic Motions with Animations using CAL3d
Thanks mongoose, but I believe that maybe I couldn't explain correctly what I need.
I can mix and blend, without any kind of problem, predefined animations... What I can't do is mix the predefined with animations created at run time, hehehe as I said, I need to rotate their heads so they can look important assets during the game, while "walking" and etc.
I can mix and blend, without any kind of problem, predefined animations... What I can't do is mix the predefined with animations created at run time, hehehe as I said, I need to rotate their heads so they can look important assets during the game, while "walking" and etc.
Re: [SOLVED]Dynamic Motions with Animations using CAL3d
Call
then set any joints you need, then render.
Code: Select all
node->animateJoints();
Re: [SOLVED]Dynamic Motions with Animations using CAL3d
Haha, sorry to ask but, have you ever used Cal3d?
That method is Irrlicht's native, right? For b3d or X models, NOT cal3d models.
Cal3d is totally different...
http://gna.org/projects/cal3d/
The code for using it, is something like this:
"CalModel->getVectorBone[nHeadBoneID]->lockState();
CalModel->getVectorBone[nHeadBoneID]->setRotation(oQuatRot);
CalModel->getVectorBone[nHeadBoneID]->calculateState();"
Cal3d Is Character Animation Library (CAL), so it is very different than "animateJoints"... Unless you implemented (overrride) the "animateJoints" method or something like that, than I would like to see the CAL3D code for that hehe.
That method is Irrlicht's native, right? For b3d or X models, NOT cal3d models.
Cal3d is totally different...
http://gna.org/projects/cal3d/
The code for using it, is something like this:
"CalModel->getVectorBone[nHeadBoneID]->lockState();
CalModel->getVectorBone[nHeadBoneID]->setRotation(oQuatRot);
CalModel->getVectorBone[nHeadBoneID]->calculateState();"
Cal3d Is Character Animation Library (CAL), so it is very different than "animateJoints"... Unless you implemented (overrride) the "animateJoints" method or something like that, than I would like to see the CAL3D code for that hehe.
Re: [SOLVED]Dynamic Motions with Animations using CAL3d
I though you were using Cal3d with Irrlicht? So the models are not in Irrlicht, and the animations are not in Irrlicht. Therefore, you're question must have been, how can I add dynamic movements to Cal3d models in Cal3d? Yes?
Re: [SOLVED]Dynamic Motions with Animations using CAL3d
Yes
Irrlicht is responsible only for rendering.
I want exactaly what the title of the topic says...
Irrlicht is responsible only for rendering.
I want exactaly what the title of the topic says...
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: [SOLVED]Dynamic Motions with Animations using CAL3d
Uhh, in that case this is more for off-topic or 3d graphics forum...