mmonem / blender2ogre

Automatically exported from code.google.com/p/blender2ogre
GNU Lesser General Public License v2.1
0 stars 0 forks source link

animation incorrect #34

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. add new armature in blender
2. rotate bone by 45 degrees and animate it around its normal axis
3. port that to ogre meshy and see that its not using normal but global axis 
for rotation

What is the expected output? What do you see instead?
rotation to be like in blender

What version of the product are you using? On what operating system?
0.52; 2in7 64bit blender 2.59

Please provide any additional information below.

Original issue reported on code.google.com by Graue...@gmail.com on 23 Aug 2011 at 8:15

GoogleCodeExporter commented 8 years ago
here is a blend file with the animation i try to get into ogremeshy with lots 
of different results but never the correct one.
maybe you can either tell me how to do that or you can find where the bug is.

Original comment by Graue...@gmail.com on 23 Aug 2011 at 1:42

Attachments:

GoogleCodeExporter commented 8 years ago
I think that I am also having this problem. I am trying to export an animated 
character to my game, but when I load the animation in it is messed up.

I have been trying to debug the code for the last 2 days now and I believe it 
is something to do with the axis swap (x,y,z)->(x,z,-y). Before the latest 
version I could export animations correctly if I used the (x,y,z)->(x,y,z) 
export option. I am also having trouble with exported cameras facing the wrong 
way when this swap is enabled, but I guess that is a bug for another report.

Attached is a blender file with the character that I am trying to export. He 
lifts his leg and drops it again.

Original comment by james.sh...@googlemail.com on 31 Aug 2011 at 9:07

Attachments:

GoogleCodeExporter commented 8 years ago
swap axis is back, and i think this bug is also fixed,
please confirm if this fixes the animation problems:
http://blender2ogre.googlecode.com/files/io_export_ogreDotScene-prerelease.zip

Original comment by goatman.py@gmail.com on 1 Sep 2011 at 11:30

GoogleCodeExporter commented 8 years ago
It appears to fix the animation issues when I export using the default axis 
swap export (-x z y). It fails to export correctly when using x y z. I want to 
use x y z because the exporter incorrectly exports camera orientation correctly 
using anything other than x y z.

Also, I looked at the code that you are using when exporting the skeleton, you 
have: "self.flipMat = 
mathutils.Matrix(((1,0,0,0),(0,0,1,0),(0,1,0,0),(0,0,0,1)))" for 'xz-y'. 
Shouldn't it be "self.flipMat = 
mathutils.Matrix(((1,0,0,0),(0,0,1,0),(0,-1,0,0),(0,0,0,1)))"? Maybe I'm not 
understanding how that section works correctly yet.

Original comment by james.sh...@googlemail.com on 1 Sep 2011 at 7:08

GoogleCodeExporter commented 8 years ago
xyz should be fixed now
http://blender2ogre.googlecode.com/files/io_export_ogreDotScene-preview_xyz-fix.
zip

Original comment by goatman.py@gmail.com on 2 Sep 2011 at 1:19

GoogleCodeExporter commented 8 years ago
Fantastic, that fixed it for me. Thanks for the time spent working on this!

Original comment by james.sh...@googlemail.com on 2 Sep 2011 at 8:44

GoogleCodeExporter commented 8 years ago

Original comment by goatman.py@gmail.com on 2 Sep 2011 at 11:46