.dae model loading, but no bones animation with whatever I try

Software: Away3D 3.x

s00zn, Newbie
Posted: 23 November 2011 02:29 PM   Total Posts: 6

Hey people!

I’m struggling for multiple days now with a .dae model and its bones-animation. I’ve tried code from multiple books, have searched all around the internet, and even tried the puma model from the book “the essential guide to 3D in flash”, but no animation gets visible whatsoever.

I have 2 models, a male and a female, that is loaded once you press one of the buttons of those sexes. (It’s an avatarcreater for kids, which will also be used in another flash - game) It gets loaded with the following code:

public function createModel(_model:int):void
  {
   removeObject
();
   
   var 
collada:Collada = new Collada();
   
loader3D = new Loader3D();
   
   
loader3D.addEventListener(Loader3DEvent.LOAD_ERRORonLoadError);
   
loader3D.addEventListener(Loader3DEvent.LOAD_PROGRESSonLoadProgress);
   
loader3D.addEventListener(Loader3DEvent.LOAD_SUCCESSonLoadSuccess);

   if(
_model == model1)
   

    
    loader3D
.loadGeometry('../assets/Models/Female/modelGirl.DAE'collada);
    
scene.addChild(loader3D);
   
}
   
else if (_model == model2)
   

    loader3D
.loadGeometry('../assets/Models/Male/modelBoy.DAE'collada);
    
scene.addChild(loader3D);
   
}
   
  } 


the onLoadSucces shows the model, however, as mentioned before, no animation.

private function onLoadSuccess(event:Loader3DEvent):void 
  { 
   
var model:ObjectContainer3D loader3D.handle as ObjectContainer3D;
   
model.scale(70);
   
   if(!
MaleOrFemale)
   
{
//Female model with animation
    
model.yaw(180);
    
model.pitch(-90);
    
camera.lookAt(new Vector3D(model.+270model.ymodel.z));
    
    
modelAnimator model.animationLibrary.getAnimation("default").animator as BonesAnimator;
    
modelAnimator.play();
    
   
}else
   {
//Malemodel without animation
    
camera.200;
    
camera.lookAt(new Vector3D(model.+270model.+250model.z));
   
}
  } 

I’ve tried to play the animation in the onenterframe function, and I have tried to use modelAnimator.update(getTimer()/1000); with all kinds of numbers besides 1000. The debugger shows with this piece of code in the onenterframe that it is going through the frames, but nothing seems to be moving. Something like a yaw animation works though.

Soo conclusion: both models are loaded and displayed in the view (the female is a tryout for the animation), yaw animation works, but bonesanimation doesn’t. What is it that I am doing wrong? Same problem occurs if I swap the femalemodel for the puma model from the book, and I’m at the point of giving up (that’s why I’m asking for help).

   

s00zn, Newbie
Posted: 30 November 2011 12:05 PM   Total Posts: 6   [ # 1 ]

Since there’s no-one with a solution yet, I would like to ask another question, hoping that I will get another solution to get this to work.

What is another option to have an animated (bones and skin) model with a multi-sub material that works in flash? I’ve taken a look into the md5mesh and md5anim for away3d 4.0, but this doesn’t seem to support a multi-sub material object, and the exporter from max to md5 doesn’t seem to work for me..

Any thoughts on options?

 

   

s00zn, Newbie
Posted: 05 December 2011 10:46 AM   Total Posts: 6   [ # 2 ]

Sorry for the extra posts…

Sooo, I didn’t give up yet. I found an animated model with a complete bones structure, and I found out that there’s nothing wrong with the code.

However, there is something wrong with the model. Are there any restrictions in a bones structure? Or is it something with weight painting, like a max number of vertices that can be animated a specific bone?

Any ideas about this maybe? Is there a common problem with the opencollada exporter maybe?

 

   

cbeenker, Newbie
Posted: 06 December 2011 09:46 AM   Total Posts: 1   [ # 3 ]

Here is the 3DsMax file we try to export.

(see attachement)

 

File Attachments
FDancer.zip  (File Size: 329KB - Downloads: 296)
   

naruto_dong, Newbie
Posted: 24 July 2012 09:44 AM   Total Posts: 2   [ # 4 ]

I also have the problem,dae model loaded,but no animation.I also find that my animation type is skinanimation.
my away3d version is 3.6

 

   

s00zn, Newbie
Posted: 25 July 2012 09:56 AM   Total Posts: 6   [ # 5 ]

Hey there naruto_dong,

There was nothing wrong with the code I’ve posted above. The problem was that the animations of the model wasn’t clean, and that the poly count was too high for the model, since I tried to load two of those models with Away3D.

What I did was let an animator take a look at the animation, and he cleaned it in Maya. Furthermore we’ve lowered the poly-size of the model and after that it worked smile

I hope to have helped you with this information. Good luck smile

 

   

naruto_dong, Newbie
Posted: 26 July 2012 02:36 AM   Total Posts: 2   [ # 6 ]

Hey s00zn,
It worked,thank you!

 

   

s00zn, Newbie
Posted: 27 July 2012 12:00 AM   Total Posts: 6   [ # 7 ]

Glad to see that it helped you ^_^

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X