Vertex Bone Assignments in Ogre
Posted: Thu Feb 24, 2005 7:19 pm
I am trying to debug an exporter application that I am working on. It looks like the vertex bone assignments are exporting -- but when I try to convert the binary file back to .xml, I don't see them. Is there some reason why the .xml file would not have them, but the .mesh would?
Here is the code where I'm setting the bone assignments.
for (int h = 0; h < env->GetVertexWeightCount(); ++h)
{
VertexBoneAssignment vertAssign;
vertAssign.boneIndex = boneIdx;
vertAssign.vertexIndex = (int) wtList[h].m_fVertexIndex;
vertAssign.weight = (Real) wtList[h].m_fWeight;
sm->addBoneAssignment(vertAssign);
}
Getting a .mesh file size of 75K without the bone assignments, and approximately 112K with.... but the .xml files coming from the xml converter are identical... no vertex assignments. Is there anything else I need to give Ogre other than running the 'addBoneAssignment' function to tell it that I have bone assignments?
Haven't got to serializing the .skeleton yet... but I'd like to get one piece working at a time.
Thanks in advance for anyone's help.
Here is the code where I'm setting the bone assignments.
for (int h = 0; h < env->GetVertexWeightCount(); ++h)
{
VertexBoneAssignment vertAssign;
vertAssign.boneIndex = boneIdx;
vertAssign.vertexIndex = (int) wtList[h].m_fVertexIndex;
vertAssign.weight = (Real) wtList[h].m_fWeight;
sm->addBoneAssignment(vertAssign);
}
Getting a .mesh file size of 75K without the bone assignments, and approximately 112K with.... but the .xml files coming from the xml converter are identical... no vertex assignments. Is there anything else I need to give Ogre other than running the 'addBoneAssignment' function to tell it that I have bone assignments?
Haven't got to serializing the .skeleton yet... but I'd like to get one piece working at a time.
Thanks in advance for anyone's help.