Hello,
I'm working on a VR project using irrlicht.
I've already integrated the P5 data glove represented by a static model of a hand.
So right now the hand can be moved in x,y,z achsis and also rotated around them.
Now i want to introduce the bending of the fingers.
So whenever a finger is bend in the glove,
its 3D representation should also bend.
How could this realtime animation be done by irrlicht?
Any ideas welcome.
Greetings
Markus
How to integrate a realtime animation?
Well, I'd love to give you some working example code with Irrlicht, but I don't have it.
The function you want to use is probably:
What I mean by that is this: say you have an arm with an elbow, a wrist, and a fixed hand (for simplicity of the explanation).
I don't know if the matrix for the wrist contains the position and angles of the hand in the real-world (after the elbow rotation has been applied), or relative to the lower arm.
I'm actually surpirsed that there is no simple setJointRotation function for this sort of stuff. Irrlicht seems to be purely geared toward pre-baked animations.
The function you want to use is probably:
Since it returns a pointer, you should be able to modify the actual matrix. I think you should be able to just use frame 0. But I'm not sure if these matrices are applied in sequence, or if the matrices are the "real-world" matrices.virtual core::matrix4* irr::scene::IAnimatedMeshMS3D::getMatrixOfJoint ( s32 jointNumber,
s32 frame
) [pure virtual]
Returns a pointer to a transformation matrix of a part of the mesh based on a frame time. This is used for being able to attach objects to parts of animated meshes. For example a weapon to an animated hand.
What I mean by that is this: say you have an arm with an elbow, a wrist, and a fixed hand (for simplicity of the explanation).
I don't know if the matrix for the wrist contains the position and angles of the hand in the real-world (after the elbow rotation has been applied), or relative to the lower arm.
I'm actually surpirsed that there is no simple setJointRotation function for this sort of stuff. Irrlicht seems to be purely geared toward pre-baked animations.
You could just construct the hand using a hierarchy of test nodes (boxes) and scaling them.
If you add a node with the previous as it's parent (the parent of Hand is Forearm, the parent of Thumb lower is Hand etc.). Then when you move or rotate the hand all it's children will move accordingly. If you got this to work then you could implement joint restrictions - the hand can only rotate so far.
Code: Select all
Forearm
Hand
Thumb lower
Thumb end
Finger 1
Finger 1 end
Finger 2
Finger 2 end
etc.
djceejay
Studying :: BSc Computer Games Technology :: UK
Studying :: BSc Computer Games Technology :: UK