AWD2 vs MD5?

Software: Away3D 4.x

Alex Bogartz, Sr. Member
Posted: 20 September 2011 11:35 PM   Total Posts: 216

As some of you may have noticed, I’m trying to do a crash course in Away3D this month.  Next up is animation for characters.  I’ve made a little character and animated it in Blender with 3 “actions” in the dopesheet.  I’ve followed the instructions for exporting md5 files and done it several times, but my model ends up distorted and completely unusable.  This is not a problem exporting the same character as obj file (which of course doesn’t animate).

So any tips on md5?  Also, should I even be worrying about md5 if the new version of prefab will export to as3 and the Away team is making an awd2 exporter for Blender?

Just curious if help is around the corner or if I should continue trying to solve the md5 issues?

   

Avatar
Choons, Sr. Member
Posted: 21 September 2011 12:35 AM   Total Posts: 281   [ # 1 ]

I feel your pain- been having ongoing problems with the Blender + Away3D flow too. I tried a while back to get the AWD2 Blender export script working without success. It requires a bunch of compiling currently and apparently doesn’t work with new Blender/Python. Maybe that’s different now, but I never got an answer in the thread I had going for it.

Which version of Blender are you using? I assume as well you have the right MD5 export script for your version? I think the latest one for Blender 2.59 plus is on katsbits.

A common problem is the backwards coordinate systems with regards to Blender vs Away3D. You might try exporting your model in a Y-up config from Blender. Also, setting scaleX = -1 in Away3D is a common hack to “fix” reversed models, although it also can cause other problems.

Have you tried compiling the Away3D MD5 examples? I usually just modify their examples to make sure I’m not causing any other code problems.

   

Alex Bogartz, Sr. Member
Posted: 21 September 2011 12:44 AM   Total Posts: 216   [ # 2 ]

Thanks for the reply.  Yes, I’m using the latest version of both Blender and that katzbits python script.  It exports with no complaints, but when I import to Away or that md5 viewer util (I think you were the one who linked to that in one of the other threads?) the mesh is sort of twisted around.  I think the bones are not exporting their vertex influence correctly, perhaps?  I’m new enough to Blender that I can’t be sure where my mistake is. 

I’ll try that hell knight model tomorrow and see if I get better results.  I’ve officially shut down for the night grin

   

Avatar
Choons, Sr. Member
Posted: 21 September 2011 12:54 AM   Total Posts: 281   [ # 3 ]

yeah I actually edited that part about the hellknight out as I realized there isn’t a decent MD5 import script for Blender that I know of. The AWD2 Blender script and the new preFab will definitely solve it, but you may be waiting many months for them.

   

Samuel Girardin, Member
Posted: 21 September 2011 07:49 AM   Total Posts: 74   [ # 4 ]

Exporting MD5Mesh works fine with 3dsMax (I know it’s not free sick) with a script you can find here : http://www.doom3world.org/phpbb2/viewtopic.php?t=1914

Samuel

   

Richard Olsson, Administrator
Posted: 21 September 2011 07:53 AM   Total Posts: 1192   [ # 5 ]

The AWD2 Blender exporter currently doesn’t support skeletal animation I’m afraid. Writing exporters is really killing me. In maya the API is a complete mess, but once you finally get to the data it’s formatted nicely. In Blender, the API is lovely, but the storage formats for bones in particular is not at all like the AWD storage format, so it needs some heavy translation, which isn’t in place yet.

If you’re doing your class this month, you should not count on AWD2 in Blender. If you can, try using Maya instead which is proven to work fine at this point.

   

Avatar
Baush, Sr. Member
Posted: 21 September 2011 01:22 PM   Total Posts: 135   [ # 6 ]

I share your pain.. After countless attempts, I have managed to get an animated model working using the following flow:

- Blender model export to FBX
- Load FBX in Unwrap3D PRO (cheap) and export to MD2
- Load MD2 in Away3D

Unwrap 3d PRO may have a MD5 export, but I haven’t tried it.

Hope this helps!

   

Alex Bogartz, Sr. Member
Posted: 21 September 2011 03:52 PM   Total Posts: 216   [ # 7 ]

Thanks for more suggestions.  I tried using Unwrap 3D and the model is still distorted, which makes me think it’s likely something in the way my bones are set up.  Maybe they have too much weight or not enough.  Something like that.  I also used Blender’s “remove duplicates” function to remove extra vertices, and it improved somewhat.  So I think the issue is in Blender.

And for the record, when I said “crash course”, I meant “three weeks of no projects so now’s a great time to cram in some learning”.  I don’t have an official class, so I can afford to wait for the Away team to finish their exporters.

grin

   

Avatar
Baush, Sr. Member
Posted: 21 September 2011 04:13 PM   Total Posts: 135   [ # 8 ]

Try with a very simple geometry first, as it may be something wrong with your mesh.

   

Avatar
sebbdk, Jr. Member
Posted: 21 September 2011 10:38 PM   Total Posts: 39   [ # 9 ]

If your mesh is twisted in md5, you might have either got more than one root bone or your bone vertex groups are messed up in blender try using bone envelopes instead and make sure to delete any unused vertex groups

i had a lot of problems with twisted md5 models in blender and the katbits exporter, making sure to only have one root bone and working with my bones groups as descriped solved the problem smile

   

Alex Bogartz, Sr. Member
Posted: 21 September 2011 11:25 PM   Total Posts: 216   [ # 10 ]

Ok, solved I think.  It wasn’t that I had too many vertex groups, but that I had too few!  I added in the other bone names into my vertex groups and it seems like that did the trick.

Or, at least now I have the model in Open Asset doing its thing.  Next up, A3D where I can texture….

   

Alex Bogartz, Sr. Member
Posted: 21 September 2011 11:44 PM   Total Posts: 216   [ # 11 ]

Success!  Ok, a little weirdness with the weights, I think, but the model is in, it looks correct, and it’s moving.

   

B. Jalowitz, Newbie
Posted: 30 September 2011 04:40 PM   Total Posts: 11   [ # 12 ]

Did you end up still having to go the FBX route or did the MD5 end up working fine with the armature and animation? 

   

Alex Bogartz, Sr. Member
Posted: 06 October 2011 01:08 AM   Total Posts: 216   [ # 13 ]

I did not go the FBX route, but I did learn a few thing about rigging for MD5 that might help.  In general, Blender does some weird things with Vertex Groups, so before you rig up your model, remove all the existing Vertex Groups if they exist.

Next, I had good results by creating a really simple rig.  Create a bone in the center of the rig, branch out and fill in the arms, legs, head.  Parent to the model using “Automatic Weights”.

I was careful to have one root bone, and make sure your animation has at least two frames.

I then exported as two animations (idle and walk) and they loaded into Flash just fine.  The model looks great.  So I think the key for me was deleting any existing rig and starting clean and keeping it simple.  I did not need to hand adjust vertices or anything tedious like that.  Once I got the general idea, I think rigging a model should take less than 20 minutes.

   

B. Jalowitz, Newbie
Posted: 06 October 2011 03:33 PM   Total Posts: 11   [ # 14 ]

Thanks for closing the loop on a opensource Blender-AW3d workflow. I Blend as well and had a lot of success/fun with Blender/Cast3d/Pv3d. I am first looking at 2.49 export then I will do 2.5+ and am seeking and testing out the most comprehensive and efficient and well supported Blender-AW3d export option (baseline req: Armature,Animation,UV). Very interesting what you found with vertex groups. Weight painting and manual vertex grouping, takes significant time, and you show that it might not always needed. 

Question: Have you done comparisons to .3ds file size.  My first 2.49 test created a very large MD5 mesh 5 times the 3ds format size.  Is additional bloated File size a known issue with Blender MD5 or does it shrink up when embedded enough to make up for it? 

 

   

Alex Bogartz, Sr. Member
Posted: 06 October 2011 03:37 PM   Total Posts: 216   [ # 15 ]

No, I didn’t do any file size tests, but my md5 mesh is around 400k.  I’m not sure if that’s good or bad.  I assume that any 3D application is going to be sporting some significant file sizes.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X