« Return to Thread: [GreatWhite] DAE and MD2 now implement basic animation

Re: [GreatWhite] DAE and MD2 now implement basic animation

by Milan Orszagh :: Rate this Message:

Reply to Author | View in Thread

Here is my file.
insel2.dae

-mo


I'm having the same problem. Anyone can help?

Animation channel with target SID='translate' does not target a matrix! (type=translate)
Animation channel with target SID='rotateY' does not target a matrix! (type=rotate)
animations COMPLETE (#channels: 0 #frames: 0, startTime: 0 endTime: 0)

Did the animations in Maya and exported to DAE.

-mo

theorianx wrote:
I have tried dae exports from blender and maya and seem to have problems here:

[trace] Animation channel with target SID='translate' does not target a matrix! (type=translate)
[trace] Animation channel with target SID='scale' does not target a matrix! (type=scale)
[trace] Could not find a transform with SID=visibility
[trace] Animation channel with target SID='rotateY' does not target a matrix! (type=rotate)


I have tried changing the collada file and even modifying your code in the DAE parser but I am still unable to get the animations to come through. at one point I got the parts that were supposed to animate to disappear =) but that's it.

What program are you using to make the bone based DAE files?

Tim Knip-2 wrote:
Hi all,

Just added simple animation for DAE and MD2.
Both now implement the IAnimatable interface, which has 2 methods:
1] IAnimatable.play( clip : String = null )  : void; => Starts the
animation (@param clip is mostly used by MD2: md2.play( "run" ),
md2.play( "wave" ), etc.
2] IAnimatable.stop() : void;  => stops the animation

Changes:
1] DAE and MD2 have a new @param 'autoPlay' in their constructors. If
true the animation will start automatically.
2] When file is completely parsed FileLoadEvent.LOAD_COMPLETE is
dispatched (was Event.COMPLETE)
     => NOTE: animation-data still needs to get parsed at this point,
see below...
3] When all animation-data is parsed from the file then
FileLoadEvent.ANIMATIONS_COMPLETE is dispatched.

Usage:
var dae : DAE = new DAE( false );  // lets show when 'autoPlay' is false...
dae.addEventListener( FileLoadEvent.LOAD_COMPLETE, onLoadComplete );
dae.addEventListener( FileLoadEvent.ANIMATIONS_COMPLETE, onAnimationsComplete );
dae.load( "myfile.dae" );
scene.addChild( dae );

private function onAnimationsComplete( event:FileLoadEvent ) : void
{
    if ( event.target is DAE )
    {
        var dae : DAE = event.target as DAE;
        dae.play();
    }
    else if ( event.target is MD2 )
    {
         var md2 : MD2 is event.target as MD2;

         md2.play();
         // or :
         // md2.play( "wave" );  // 'wave' is one of the clips defined
in the md2.
    }
}

private function onLoadComplete( event:FileLoadEvent ) : void
{
   // not used
}

Have fun!
Tim

_______________________________________________
Papervision3D mailing list
Papervision3D@osflash.org
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

 « Return to Thread: [GreatWhite] DAE and MD2 now implement basic animation