Bone Quat rotation error

I’ve been working with Ideasman’s BVH import script so that it will create an armature and animate it. For whatever reason, it does not import the rotational animation correctly. Since the Armature uses quaterions for rotation and Ideasman’s BVH script uses x,y,z rotation of empties, I’ve been using the blender math util functions to convert the x,y,z rotation to a quaterion.

Both scripts are reading the same information, creating the same Euler rotations (same function) and generating the same quaterion, why would the armature not recieve the proper rotations? It seems that the armature bone rotations are only a small fraction of what they should be; they barely move.

Is it possible to access euler rotations for a bone or only quaterion? Has the problem with the QuatW and QuatZ been fixed in 2.34? Thansk for your help.

Cheers,

Bob

Update:

When I create a rotation matrix with the same information and then convert it to a quaternion I find that each part of the new quaternion is 10x larger than if I build the quarternion through euler rotations. It’s kinda like the decimal place is off somewhere. I think it’s in the quarternion code.

Cheers,

Bob

Found the error. It was a problem between the seat and the keyboard.

Cheers,

Bob

:smiley:

Hi,

I used your script and it amazed me to see how well it works…

I did notice that there remain some trouble on some certain bone rotation …
Moreover … when I tried to attach a mesh to the armature, I realized that the mesh was completly deformed when the armature was out of the rest position… :frowning:
So … I made my own script to build an armature upon a heap of empties
The armature which is created by this script doesn’t contain any parent-children relationship (and so, there’s no deformation )

As far as I can see there is no big mistake in the rotation … perhaps can you have a look at this script

I really got inspiration from your script. If my script can help you back … I would be the happiest man on earth …

Jean-Baptiste PERIN

Now at:
http://www.zoo-logique.org/3D.Blender/scripts_python/BVH4BLENDv10.zip

thanks jms for updating the adress of this script

I can’t help hoping that you updated this adress because you found the script useful …

I venture to suggest that you grant it the honor to be added at your script list:
http://jmsoler.free.fr/didacticiel/blender/tutor/cpl_localiserpythonscript.htm

It would be a great honor to be published on this reference page

Amicalement …
Jean-Baptiste

Sorry for englishusers.

<< On peut toujours en causer sur :
http://www.zoo-logique.org/3D.Blender/newsportal/thread.php?group=3D.Blender >>