As best I can tell, this is the way you are describing to access the
animationLibrary:

colladaFileParser.containerData.container.animationLibrary

Unfortunately, the "container" field inside containerData is null.
I'm assuming this is a bug of some sort since I can get it from the
Collada object, but it requires exposing a private field.  I have
updated away3dlite to trunk yesterday, so perhaps its been fixed
already.


On Jun 22, 7:45 am, tarwin <[email protected]> wrote:
> What your looking for is actually the collada.container ie:
> collada.container.animationLibrary.getAnimation("default").animation -
> I'm still a little sketchy on what the container is but it's pretty
> much what you want.
>
> You'll also find it only works with 1 skin per Collada, and you might
> end up with problems if you're parenting items to one another. But to
> get animations just working it should be ok.
>
> On Jun 22, 3:18 am, Sean Stephens <[email protected]> wrote:
>
> > I'm trying to do the following:
> > 1) export 3d with baked in animation from Max or Maya to Collada (have
> > tried FCollada, feelingsoft, and OpenCollada exporters for both)
> > 2) import collada into Away3dLite
> > 3) Render the resulting animation
>
> > I can successfully do all of these to a model with textures, but have
> > not been successful with an export that contains animation.
>
> > I've attempted to follow the Advanced_MultiMario example, however
> > there are a few differences...
> > 1) the example loads from an embedded collada file, whereas I'm
> > loading from a file resource using Loader3D.
> >   e.g.:  loader.loadGeometry(filePath, colladaLoader);
>
> > 2) the method of retrieving the animation shown in the example does
> > not work in this case, as the animation library is empty on the
> > Loader3D, and unavailable (private) on the Collada object. If I hack
> > the Collada object to make the animationLibrary accessible, then I can
> > get the animation as from there. I'm assuming this is not the
> > recommended approach.
>
> > 3) Once the animation is retrieved thru the hack, the Mario animation
> > runs, but my animations will not. The model appears (), but is frozen
> > at one point of the animation and does not animate even using the
> > timer based animation advancement and rendering.
>
> > Regarding the exports, I've noticed different types of animation data
> > between the mario example dae and my export data.  The Mario dae
> > visual scene data is all discrete vector descriptions like:
> >     <node id="neck" name="neck" sid="bone0" type="JOINT">
> >         <translate sid="translate">-0.010548 6.91145 0</translate>
> >         <rotate sid="jointOrientZ">0 0 1 -87.7094</rotate>
> >         <rotate sid="jointOrientY">0 1 0 0</rotate>
> >         <rotate sid="jointOrientX">1 0 0 0</rotate>
> >         <rotate sid="rotateZ">0 0 1 0.019332</rotate>
> >         <rotate sid="rotateY">0 1 0 6.53217</rotate>
> >         <rotate sid="rotateX">1 0 0 -8.56708</rotate>
>
> > whereas the dae I'm exporting has data like:
> >     <node id="node-Bone_Root" name="Bone_Root" sid="bone0"
> > type="JOINT">
> >         <matrix sid="transform">-0.008987 1.20314 0.000553 -3.61347
> > 0.735862 0.005935 -0.951895 6.49862 -0.951871 -0.00677 -0.735884
> > 26.9543 0 0 0 1</matrix>
>
> > Is there a problem with using the latter?
>
> > Thanks for any help or insight into these issues.
> > - Sean

Reply via email to