Home > programming, web > Collada vs MD2, PaperVision3D vs Away3D

Collada vs MD2, PaperVision3D vs Away3D

These past weeks I’ve been dealing a lot with animated 3D models in Flash, and learning a big deal about the (im)possibilities of the different file formats and render engines.
I will try to bring some of this newly gained knowledge across, because I found it quite hard to find out what I needed to know just by Googling for it. Hopefully this way I can spare some of you the same frustration I had.

First off, the premise: I needed to create an interactive, animated 3D character in Flash, responding to mouse over events on its various limbs.

Basically, there are two main options in terms of file format: MD2 and Collada. MD2 is smaller, and it basically contains a timeline animation of the model, whereas the Collada format is bigger in size, but can contain an animated IK rig with bones attached to skins and all. This can be useful if you want to interactively control movement of the rig, although that was unnecessary in this case.
The rollover behavior of the limbs wás important however, and MD2 models being one single mesh, this option soon got scratched. Collada it was.

Now, when creating Collada files to load into Flash, you need a quite specific setup. Apparently, the best export plugin to use for this is ColladaMaya or ColladaMax. Turns out however that the most recent version of that plugin is no longer available for free, and furthermore it has turned out that the supplier doesn’t sell it anymore! So unable to find this ‘NextGen’ version of the plugin, we referred to an older version, but that one only works with 3DS MAX 9 and lower. Not 10, which our 3D animator uses. So lots of headaches there, but finally we managed to get our hands on the NextGen version of the plugin (here).

So, exports working, one down. Now for the correct Flash 3D engine.
At that time, I was using Away3D as I gathered that its performance is better than that of PaperVision3D. Initially I was using Away3DLite, but then I wanted to use AS3Mod to dynamically bend 3D planes, and that doesn’t support Away3DLite, just regular Away3D. So alright, I switched.
Then, just when we got all that exporting stuff to work, I discover that Away3D has a REALLY hard time correctly parsing our animated 3D models. What’s up with that? Imagine my annoyance when, after a day of toiling to get this to work, I desperately implement PaperVision3D as a last resort, and it works out of the box with our Collada files! Animation and all. Thank god for that!

Next day. More 3D modeling, texture wrapping, animating, that kind of stuff. Happy that we can finally get on with actually producing stuff.
A few hours into the day I get the latest Collada exports with textures and animation, so that I can start implementing it.
Cue a nearing depression when the animation is not working at all! At this point I’m pulling out my hair, because production is interrupted yet again by the failure of our tools to do the job we expect them to do correctly! No offense Away3D, PaperVision3D and ColladaMax teams, you have done awesome work, but when I can’t simply get a textured 3D character to animate in Flash while observing all the rules we know of and can find online, I tend to lose my nerve a bit. I’m sure you understand.

As it turns out, our model and animation works fine in PaperVision3D when we remove the texture and uv mapping on it. But obviously we need textures.
So right now, I’m sick of all this screwing around with plugin version such and 3ds max version so, render engine this and file format that.
I’ve opted to go for the most solid implementation I know, and that is the MD2 file format in combination with Away3D. Screw mouse overs on limbs, I’ll just fake it with a transparent 2D overlay on top of the 3D scene. I’m done, I have to get some work finished.


I have received a tip to check out the AWD project on http://code.google.com/p/awd/
At first glance this looks very promising, although I haven’t played with it a lot yet. I have exported to this format once, and that export ignored any animation, so I’m not sure if it can do that at all or not. But if you’re stuck, by all means try it! :)

Categories: programming, web Tags:
  1. July 8th, 2011 at 12:02 | #1

    Goed stukje… en wat zullen jullie blij zijn met Molehill straks ;)

  2. Jeff Terrace
    July 8th, 2011 at 17:50 | #2

    You don’t want to use those max and maya plugins. The most recent, fully featured plugins are from OpenCOLLADA:

  3. admin
    July 9th, 2011 at 17:01 | #3

    Thanks Jeff.
    During this whole ordeal I have gotten similar results when using OpenCollada and ColladaMax NextGen though. What is your experience with this?

  4. ge5
    July 19th, 2011 at 18:40 | #4

    this is fascinating–i have been trying to move from PV3D (no longer in development) which i have used to do EXACTLY as you say above (though making collada export from blender)-the process worked quite well/loading a uv texture too…this week i am trying away 3D and want to pull out my hair! when i try to animate the “bones” through code things go haywire…any suggestions or examples?

  5. admin
    July 20th, 2011 at 09:23 | #5

    Yes, the problems I’ve had in getting animated collada files to work in Away3D were extremely frustrating. I have seen working examples though, including code-animated bones (http://sleepydesign.blogspot.com/2008/07/away3d-collada-animation.html, although that post was made in 2008).

    What might help is to try and animate not the bones, but the skins attached to them.
    Also, according to Jeff (see comment above) the most recent version of OpenCOLLADA should work, so you can try and see if that solves anything.
    And then there’s the option of using the AWD file format (see http://code.google.com/p/awd/). I’ve given that one quick try using preFab (http://www.closier.nl/prefab/), but that does not seem to export animations. I’m not sure if that’s to do with preFab or with the file format though.

    As I mentioned, my frustration drove me back to the MD2 file format, which contains pretty much a timeline you can play back, and which works beautifully with the current release of Away3D.
    I do realize that it does not give you bones to play with, but something you could feasibly try using this approach is to use multiple meshes. You can then animate those meshes together in your 3D scene and export them to separate MD2 files. You should be able to simply add each mesh to your view in Away3D to combine it all.

    I would be very interested to know what turns out to work best for you, and what you find does not work. Please let me know how it works out.

  1. No trackbacks yet.