Now I'm facing a problem with a new rigged model where the order of the skeleton joints in the selection and those in the "weights[$numJoint]" don't correspond . Effectively in the Component editor the joints are indicated in a "random" order compared the the logical hierachy (from "Root" to "toes")
Is there any way to extract the bone Id for each of the "weights[$numJoint]" so I can relink the correct values to the correct joints.
I hope my question made sense ...
Thanks in advance Guyb
Edit :
I tried hard coding the joints list by hand following the order given in the Compenent editor and still get mixed data ... ? I don't get it ...
QUOTE(failure @ 12/14/05, 11:30 AM) Component editor sorts it alphabetically unless you tell it not to. But why is this of any importance for exporter? [snapback]222348[/snapback]
The problem is to link the specific data per vertex to the corresponding joint. The syntax is H-anim compliant (the successor to VRML dedicated to real time character animation) and needs a definition by bone (name, position, influenced vertices and respective weight). So of course if you end up with the vertices influenced by the wrong bone ....)
But I found out in the mean time where the problem was coming from : at one point some bones (the last one used on the chain, useless) were deleted. It seems that the weightList is not automatically updated (I suppose its an array created at the time the model is been skinned), so the values were shifted ...
I will dig a bit more to see how to update this list ...