problems in skinning
hi all,
I first rotate my bone and then go to skinning.
But the vertex does not realize the previous position of the bone to make a weighting calculation , as it gets only the updated global matrix of the bone so when i ;
fig->RotateBone("bone02", "Z", 30 );
fig->RotateBone("bone02", "Z", 15 );
i get a 30 + (30+15) = 75 degree rotated bone instead of 45 degrees. How can i come over the problem efficiently?
Thanks in advance
Burak
Well you have a simple algebra problem then:
30 + (30 + x) = 45
because it is all addition, the parathensis are not need
60 + x = 45
x = -15
give it a try ^_^
30 + (30 + x) = 45
because it is all addition, the parathensis are not need
60 + x = 45
x = -15
give it a try ^_^
I used to have the global matrix of every weighted bone in the recursive
void CAnBone::UpdateSkin(CAnBone *bone)
routine. Instead, i revised as ;
void CAnBone::UpdateSkin(CAnBone *bone, CAnBone *wbone, Matrix3 *mt)
I put a if{vertex->wbone == wbone..} realising the wbone in the vertex loop. and changed the global matrix to applied mt. Its okay now! I know to add and subtract, but as i was lazy to tell the whole story the answer was algebra. Anyway thanks for the answer , i always learn a lot from the kind people here.
void CAnBone::UpdateSkin(CAnBone *bone)
routine. Instead, i revised as ;
void CAnBone::UpdateSkin(CAnBone *bone, CAnBone *wbone, Matrix3 *mt)
I put a if{vertex->wbone == wbone..} realising the wbone in the vertex loop. and changed the global matrix to applied mt. Its okay now! I know to add and subtract, but as i was lazy to tell the whole story the answer was algebra. Anyway thanks for the answer , i always learn a lot from the kind people here.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement