I’m able to create a new puppet limb, align each bone to our game skeleton with maxscript, and pos and rotation constraint the game skeleton to the puppet. Everything seems to work great.
But when I import a BVH (exported from Biped) on the puppet it blows up the spine and the legs.
When I import the same BVH on a manually created puppet it works.
This is what I’m doing to create rootPuppet, pelvis, legs and spine:
-- puppet and root
nCharPuppet = puppetShop_CharHUB pos:[0,0,0] iconsize:0.01 name:"RiderPuppet" filterSpaces:true
nCharPelvis = ps_build.createRootNode nCharPuppet
-- leg
ps_build.default_leg nCharPelvis "R" green
ps_build.default_leg nCharPelvis "L" green
--spine
nCharSpineArray = ps_build.add_spine nCharPelvis
ps_build.removeBone nCharSpineArray[4]
deleteItem nCharSpineArray 4
After that I do a puppetBone.rotation = gameBone.rotation and puppetBone.pos = gameBone.pos (there’s some switch in axis, but only on the spine). And yes, our character has 3 spine bones only, and the default puppet spine has 4, so I delete one. Which could explain the problems with the spine (although the BVH also has 3 bones). But I don’t get the problems with the legs… When I import the animation they look inverted… and the copy of rotation and position is quite straight forward since all axis are pointing to the same way. The same goes for the arms, but the animation on the arms are correct.
Any ideas of what I can try?
Edit: ARGH, it seems it’s our scale, not any difference between scripted or manually created puppet. If I create another puppet manually with scale 0.01 it also blows up the animation. If I use a normal scale it works…