blender md5 export mirrored mesh and animation

Software: Away3D 4.x

Avatar
oladitan, Member
Posted: 21 July 2012 08:51 PM   Total Posts: 71

hello. I am using the blender 2.59 md5 export script. It works however my model as well as the animations are mirrored on the x-axis. I tried to solve this by scaling on the x-axis :

mesh.scaleX = -1

but my geometry just gets turned inside out instead of morrored.

I also tried scaling the model in blender before exporting. This had catastrophic results. Thank you for the help.

   

Shegl, Sr. Member
Posted: 21 July 2012 09:30 PM   Total Posts: 134   [ # 1 ]

material.bothSides = true—> will help

   

Avatar
oladitan, Member
Posted: 21 July 2012 09:55 PM   Total Posts: 71   [ # 2 ]
material.bothSides true

did help. i just needed to rotate my model:

mesh.rotate(new Vector3D(010), -90);
mesh.rotate(new Vector3D(100), 180); 

to make it look right-side up again. thank you Shegl.

   

Shegl, Sr. Member
Posted: 21 July 2012 10:05 PM   Total Posts: 134   [ # 3 ]

You can also flip faces in blender. If you didnt want to use all models with bothSides render.

   

Richard Olsson, Administrator
Posted: 22 July 2012 11:26 AM   Total Posts: 1192   [ # 4 ]

If you’re not already, make sure you use the Gold version of Away3D 4.0, as there were some fixes related to the orientation of MD5 models. This particular issue sounds like it might just be an incompatibility between the blender exporter and Away3D though.

   

Avatar
Matse, Sr. Member
Posted: 22 July 2012 11:36 AM   Total Posts: 149   [ # 5 ]

Richard, there’s the same issue with MD5 files coming from Max. Every single MD5 I’ve seen in Away3D was mirrored : if you play the “leftslash” animation from the hellknight you’ll see him attacking with his right arm.

Looks more like a general issue with MD5 and Away3D smile

   

Richard Olsson, Administrator
Posted: 22 July 2012 11:44 AM   Total Posts: 1192   [ # 6 ]

Matse, thanks for letting us know. Please file a bug and we will take a look!

The format, as far as I know, doesn’t actually specify axis alignment so it’s up to the implementer to guess. If our guess is incompatible with most encoders it is of course a good idea to revise it.

   

Avatar
Matse, Sr. Member
Posted: 22 July 2012 12:48 PM   Total Posts: 149   [ # 7 ]

No problem, opened an issue on github : https://github.com/away3d/away3d-core-fp11/issues/364

Yeah exaclty, it seems the current alignment is not the one most MD5 exporters use but then it would also just be 3DSmax and Blender, not sure what other people are using, nor if anyone is getting non-mirrored MD5 in standard away3d (without a fix of some kind).

   

Avatar
oladitan, Member
Posted: 22 July 2012 05:36 PM   Total Posts: 71   [ # 8 ]

flipping the normals of my model’s faces directly in blender works also. thank you.

   

kloff, Newbie
Posted: 04 September 2012 04:57 PM   Total Posts: 4   [ # 9 ]

Hello. I’m still facing some rotation issues while viewing md5 mesh and animation. I’m using Blender 2.63 and away3d-core-fp11_4_0_9_gold. When I tried to view the model in an external viewer (AssimpView for example, or modelviewer from http://www.katsbits.com), everything looks the same as in Blender. And here is what I’ve found:

When I just show md5mesh (without playing animation), the model is rotated along Y axis 180 degrees, so I need to rotate it 180 degrees along Y (mesh.rotationY = 180;) to appear the same way as in Blender or the model viewers.

And when I play animation with the same model I need to rotate it along Y axis 90 degrees (mesh.rotation=90;).

I know that the coordinate systems in Away3d and Blender are different, but if I’m looking at the model from e.g. front view in Blender (or the model viewers) I’d expect the same behaviour in Away3d. I’m just recalling that to look from frontview in Away3d the coordinates are oriented this way: X axis goes to the right, Y axis goes up and Z axis goes away from the monitor screen (so camera is positioned at let’s say z=-100 and the model at z=0).

And I’m wondering if someone is facing this too.
I’m able to export md5mesh and md5anim that looks good (no vertices with 0 weight etc.), so it is only Y-orientation issue. It is weird that the rotation changes when animation is started. I thought it’s a Blender’s md5 exporter problem, but it seems to me strange that in other viewers it does render the same way as in Blender.

Thank you for any suggestions!

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X