Hi, I've been doing something similar. I just load a bunch of non-complete XML files with replaceable tags in them. <!--ANIMATION HERE--> for example. I then load the animation once and replace the tag in my different Colladas with the animation. This is what has to be done if you've got multiple Skins in your animation (or sometimes just different items as children to your bones). The big problem is that parsing Collada files is stupidly slow - so you're going to be waiting for things to parse as much as you wait for things to load sometimes.
If you've got animations that don't have too many verts I'd suggest you go with Katopz MDZ solution - it's quite genius and will run your animations super fast too. If you've got a model with 2000 verts and a lot of animation then your going to have to go down the Collada path (you might want to look at caching the resulting animations too). Good luck! Tarwin On Jun 25, 2:51 pm, katopz <[email protected]> wrote: > Hey Sean > > that's possible, but not easy task, it can be done under certain case > 1. all mesh must have same amount of vertices > 2. must bind with same bone name > 3. ....sry i forgot ;p > > and if you want to do it at runtime, you need to mod Collada class while > parsing each container, instead of parsing each mesh/bone from XML, must > replace with load each XML part and hook back to that (seem like async > process instead of sync) > > i bet you try to custom character right? > after you hit the wall with separated Collada you can try my approach > herehttp://sleepydesign.blogspot.com/2010/03/away3dlite-md2-and-mdz-build... > > see mesh separated? and time to match them up or even redefined animation > datahttp://away3d.googlecode.com/svn/branches/lite_builder/ > > you can see new MDJ format there, i'm not blog about it yet in case it's not > complete spec just yet > > mdz = pack and go all in one zip > mdj = custom each part save as JSON and each part load from server > > so, what you have to do is > 1. DAE : make prototype as DAE animation > 2. DAE -> MDZ :r ead it and convert to MDZ //you can finish here if you want > after this is for MDJ > 3. MDZ -> MD2 : extract that MDZ to some folder by winzip,winrar > 4. DAE -> MDJ : save model structure as MDJ //see ExMDJBuilder.as > > MDJ is JSON readable format, it's time to mix it as you wish :) > > warning : no docs and work in my machine ;p > > hth > > On 24 June 2010 23:06, Sean Stephens <[email protected]> wrote: > > > > > > > What I've got: > > 1) multiple collada files (with mesh and bones data) that define > > pieces of a whole model exported from 3ds Max > > 2) a single animation exported from the same 3ds Max complete animated > > model (can be reduced to just the <library_animations> and > > <library_animation_clips> sections if needed) > > > What I'm attempting to do: > > I need to be able to load up the separate mesh/bones pieces and > > animate them with a single animation definition. > > > As it is now - or at least what I've been able to accomplish so far, > > the animation needs to be in the same collada file as the mesh its > > animating, even though its got animation data to run the entire model. > > > I see a few options, but I'm not clear on what Away3dLite will > > support. Ideally, I'd like to be able to load each collada file into a > > common "modelspace" with each section of mesh being additive in the > > overall model. The animation could either be attached to one mesh > > pieces collada file, or could be loaded up on its own. As it is the > > Collada class will have to load the animated portion last so the > > animationLibrary is available after the load, from which the animation > > can be run. > > > Any thoughts on how to accomplish this, or other ways of approaching > > the end goal? > > -- > Regards > ----------------------------------------------------------- > Todsaporn Banjerdkit, katopz,http://sleepydesign.com > Away3DLite and JigLibFlash Developer Team
