Jump to content

how to zero out bone transform?


photo

Recommended Posts

hi I need to zero out all transform of the character bones.

I tried in max to reset the transform and i can see all bones are rotaton 0 0 0, scale 1,1,1

i even use maxscript to check all bone.transform matrix are correct.

but when i export to unigine. i still see some bone are rotated as you can see from the pic.

anyone have idea how to zero out bone transfrom for unigine?

 

btw:

the reason i need zero transform is that i need use the bone local transfrom to mul a bone transform stream from network. if there is a transform already, the bone looks wrong after the mul.

i'm using skinner for this.

 

post-929-0-38864200-1385795262_thumb.jpg

Link to comment

Hello snow_zhangy,

 

is it possible that the rotations come from the bind pose? The bind pose is stored in the .smesh file.

If a bone has no transformation specified in a .sanim file the respective bind pose transformation from the .smesh file is used.

 

I'm not working with skinner, but unigine script allows to set all bone matrices manually, so it should be possible.

I guess you have to set the transformations after the skinner update() method with something like:

obejctSkinnedMeshInstance.setBoneTransform(bone, mat4_identity);

Btw if you are zeroing out all transformations (I think you mean using an identity matrix) all bones should reside at (0, 0, 0) and the axis of the bones should correspond to the axis of the world.

Your image shows that there are also translations in there...

Link to comment

hi helmut:

   I just can't figure out how to zero out for the bine pose. As you see in the pic, some bones have non zero rotation.

   If you open the sample agent smesh. you will find it also have non-zero rotation. I guess it's just no way to zero-out

Link to comment

Hmmm. If the rotations should be correct in the bind pose that has definitely to happen inside max.

So I guess you want to keep the translations and only reset the rotations?

But the translations have to be recalculated if you are changing the rotation, i.e if you swap the x and y axis for a bone than you need to swap the x and y component of the translation from all child bones attached to this bone.

Link to comment
  • 1 month later...

hi

maybe it is a joint orientation issue?
and has nothing to do with rotation?
post-302-0-20526900-1389290690_thumb.png post-302-0-02701500-1389290698_thumb.png post-302-0-76114800-1389290683_thumb.png

like in example - joints have 0 0 0 rotation - still orientation is different
not sure how to preview orientations in max, but pretty sure you can find out how to orient joints correctly in max.

i am only guessing that this might be your problem , would need to see the skeleton as fbx

regards
Phil

 

Link to comment

hi Phil:

   We have found the way to zero out bones. which is quite simple in 3dsmax. Just click don't affect children and then zero out all transform manually. This does work for us. Otherwise the bones looks wrong when we multiply the incoming transforms.

 

Yang

Link to comment
×
×
  • Create New...