ISkinnedMesh joint control
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
ISkinnedMesh joint control
I'm trying to program a character scene node for my game. I'm not going to use the Irrlicht animation system though because it doesn't have animation blending. I'm using Havok Animation. So I only need to be able to set the positions to match the Havok joints. What I was going to do, was basically copy the CAnimatedMeshSceneNode over to my character. This didn't work because all I really need is to be able to set the joint positions. So if I get the positions from my mesh with ISkinnedMesh::getAllJoints() and then change the joint's Animatedposition, Animatedrotation, and Animatedscale members, before calling ISkinnedMesh::skinMesh(), will the mesh be animated to that position when I render it?
That would be illogical captain...
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
Well since you're basically treating the node like a ragdoll, you call setRenderFromIdentity(true) for the scene node.
You'll also need to call setJointMode(EJUOR_CONTROL)
(Also see: http://www.irrlicht3d.org/wiki/index.php?n=Main.HowToUseTheNewAnimationSystem)
This should cut down on the fat (and in your case useless) calculations and you will get the result you wanted.
However I'm not sure if this is THE best way.
Nor do I currently know how to enable hardware skinning.
You'll also need to call setJointMode(EJUOR_CONTROL)
(Also see: http://www.irrlicht3d.org/wiki/index.php?n=Main.HowToUseTheNewAnimationSystem)
This should cut down on the fat (and in your case useless) calculations and you will get the result you wanted.
However I'm not sure if this is THE best way.
Nor do I currently know how to enable hardware skinning.
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
I'm programming a custom scene node, I just need to be able to pose the mesh in my node before I render it.
That would be illogical captain...
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
Yeah, I know how to control the IAnimatedMeshSceneNode, I have just an ISkinnedMesh that I'm rendering with my OWN scene node.
That would be illogical captain...
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
IIRC In this case, ISkinnedMesh joints will have to have their matrices updated by hand. Then you can call skinMesh().
You can look at CAnimatedMeshSceneNode.cpp from the irrlicht sources on how to do this.
EDIT: Maybe I'm wron though, so keep waiting a little more for a proper answer form a dev or someone more knowledgeable.
You can look at CAnimatedMeshSceneNode.cpp from the irrlicht sources on how to do this.
EDIT: Maybe I'm wron though, so keep waiting a little more for a proper answer form a dev or someone more knowledgeable.
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
The matrices should be easy to update, I'll keep waiting I still have to make a character to test anyways.
That would be illogical captain...
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar