Bug with skinned .X files

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
Haddock
Posts: 15
Joined: Tue Dec 16, 2003 7:19 pm

Bug with skinned .X files

Post by Haddock »

This bug occurs with .x files where joints can influence more than one mesh.
In CXAnimationPlayer.cpp, line 225, the line

Code: Select all

Joints[jnr].MatrixOffset = mesh.SkinWeights[w].MatrixOffset;
assumes that there is one weight group ("SkinWeights" in .x file) which is linked to one particular joint.
Unfortunatelly, for some .x file, that's not the case.

To fix this bug, I changed SJoint struture, and now MatrixOffset and CombinedAnimationMatrix are arrays of matrix4. I also changed SVertexWeight structure by adding index[4] array, to be able to apply the right MatrixOffset matrix.

I hope I'm clear.
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Yes, that's right. I should have written somewhere that this is currently not supported, meshes show up quite strange in Irrlicht when they've got more than one matrix offset. Going to change that sometime.
If you like, you could send me the mesh you are using, so I can test it out with it when I'm adding that functionality. Generally I've got a little lack of test meshes. :)
SmOrliwiz
Posts: 30
Joined: Thu Jan 01, 2004 10:39 pm
Location: CH
Contact:

Post by SmOrliwiz »

-----Generally I've got a little lack of test meshes-------

Is this a shy call for test models ?
Just put a list of what you need, and I can make you some that you can use.
Not very good at anymating though.

(To be honest, I just visit this site anyway only with the faint hope to someday find out how to use an engine to get my models on screen, and not because I am a programmer.)


A thing I have to add:
This excludes guns and pistols, because it would absolutely bore me to model them.
Anything else, OK.
.
Post Reply