Archived

This topic is now archived and is closed to further replies.

holyburak

problems in skinning

Recommended Posts

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

Share this post


Link to post
Share on other sites
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 ^_^

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites