If you've got animation in there you're up against a whole other
problem. One thing I've been looking (actively working on) at is
loading one Collada animation and substituting Vertex data (just a
quick replace in the XML) for the model I want, then using a hack of
Katopz' MD2Buidler creating AnimatedMeshs out of it. The two slowest
parts here are the parsing of the Collada and then the creation of the
AnimatedMesh, but I think (and this is where I'm still unsure)
creating some kind of pre-parsed Collada format might help a lot here.

The idea is to build a serialized version of the Collada object
(Away3D object) that I can build into a Collada super quick, rather
than building it directly from the XML which is super slow (mostly
because XML reading is slow). If you have the serialized Collada
object in memory already hopefully you could just replace parts of it
(vertex data) and have it done super quick.

It currently takes over 3 seconds to process a Collada and then create
an AnimatedMesh (1500 verts, lots of bones and 5 seconds of animation)
but I'm guessing this could be cut down quite considerably if you have
the cached Collada (maybe 1 second which could then be hidden with
some kind of transition).

Thoughts anyone? How would YOU hold Collada info to create one
quickly, but also minimize file size? How about just creating a Class
wihich has a bunch of lines like:

// not working code, just a quick idea !!
c = new Collada();
m = collada.addMesh(Vector(123,43,.34,-34,34,-343));
m.addBones(Vector(123,43,.34,-34,34,-343));

Reply via email to