Vertex animator and collada

Software: Away3D 3.x

bakajin, Newbie
Posted: 03 January 2012 02:50 PM   Total Posts: 24

Ok now i seem truly at a loss.

in away3d 3.6 prebroomstick, i set out to try and load up shape/morph/vertex animation from a collada file.

So i tried my hand on a couple of additions/changes to Collada.as so it would load up the vertex animation.

After many problems (probably related to my lack of skill) i’ve loaded up everything in the collada file and added it to a vertexanimator.

This means i’ve read the base vertices and added them with addVertex.
I’ve made a vector array for every frame (81) and added these with addFrame.

By now i have no more errors, can trace out these Vector3D values for the frames and vertices.

However when i try to follow the scarce tutorials out there on playing back the anim, nothing happens.

when i call mylovelycolladavertexanimation.play() , no error, no vertex animation.

Anyone around that can point me in a direction which will keep me from loosing the last of my hair.

Should i maybe use .update() instead of play() in this slightly newer version? I’d gladly share my alterations to the collada.as parser to set up the vertices etc.

Oh and happy new year folks!

   

bakajin, Newbie
Posted: 03 January 2012 03:22 PM   Total Posts: 24   [ # 1 ]

ps this is the code leading to the happening of nothing really,

daeShapeAnimation = daeModel.animationLibrary.getAnimation(“unfold”).animator as VertexAnimator;
      daeShapeAnimation.target = daeModel;
      daeShapeAnimation.loop = true;
      daeShapeAnimation.interpolate = true;
      daeShapeAnimation.fps = 30;
      daeShapeAnimation.play();

still all vertex and frame data resides there

   

bakajin, Newbie
Posted: 05 January 2012 05:31 PM   Total Posts: 24   [ # 2 ]

Not all at once wink,

Maybe if i clarify some more [...]

in the collada.as i added a switch when it reads the library_controllers.
In the original version it only looked for bones / skinning there.

I told it to, when it found a controller called “morph” to make an array of names from the list of geometries found there.

Then i looked up those geometries, eg. the shapekeys, listed there in library_geometries. I built vectors with the vertices for each key.

Then later i add these keys, along with a vertexAnimator as animator to the library_animations. Oh and of course use addVertex to add the base shape vertices.

Seems to me that this should hold all data needed to do the above mentioned script and play the vertex animation? Also i can trace out these vertices and animators etc etc.

Instead no error and no animation

I hope someone shed some light, this is really starting to bug me ...

Thanks

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X