Currently, Irrlicht is supporting skinned animation only by loading MS3D files, and if I am not wrong, a vertex can be attached to only one bone. To be able to get smooth animations, a vertex must have the possibility to be attached to more than bone, and must have a weight associated to each bone.
Also, Irrlicht is doing skinned animation by computing a static mesh (the calculation is done by the CPU in the function getMesh), and then this mesh is rendered. So there is no hardware support for skinned animation computing.
As I needed .x file support before the release of Irrlicht 0.5, I have added some code to be able to load .x files. From a Niko's advice, I did this with the help of DirectX3D sample found on Internet and DirectX9 SDK. Of course this works only on Win32 platform.
The sample I found on internet, provides some very cool features : it loads directly .X file by calling Direct3D functions, it can do the animation computing on the video card, and it provides skinned animation blending. The sample provides also a skeleton .x file sample with several animations.http://www.petra.demon.co.uk/XFiles/body_index.html
There's also a sample from DirectX (skinnedmesh) which is releveant to measure the speed improvment when the skinned animation is done on the cpu, if, of course, you have a video card which support this feature. My video card is a GF4 4200, and there's a dramatic improvement when I switch from software skinned animation to hardware animation (from about 300 fps to 500 fps on a sample).
I know that my topic is very Direct3D specific, but I hope that all of these cool features will be supported in Irrlicht 0.5.
Skinned animation
Would be nice if they would be in there, right. I cannot really say what exactly will be in there, as always. But I can definitively say, that hardware skinning will not be supported then. But will/should be added later, of course.
In worst case there won't even be .x animations in 0.5, only static meshes, but I don't think so.
In worst case there won't even be .x animations in 0.5, only static meshes, but I don't think so.
Yes, I know that this is a huge job. Animation is certainly is the most complex part in a 3D engine.
The way I add .x file support is a bit dirty and non-portable. First, I port Irrlicht to DirectX9, which was pretty easy, in order to be able to implement DirectX9 sample. Second, I created a new animated scene node, and I overloaded the render method. This render method call directly DirectX rendering functions... I told you, it is not portable and then I created a new IAnimatedMesh derivated class.
The way I add .x file support is a bit dirty and non-portable. First, I port Irrlicht to DirectX9, which was pretty easy, in order to be able to implement DirectX9 sample. Second, I created a new animated scene node, and I overloaded the render method. This render method call directly DirectX rendering functions... I told you, it is not portable and then I created a new IAnimatedMesh derivated class.