How to use bones instead of biped?

Software: Away3D 4.x

Ankur, Jr. Member
Posted: 30 January 2013 07:40 PM   Total Posts: 43

In http://www.adobe.com/devnet/flashplayer/articles/away3d-autodesk3dsmax.html, the skeletal system was created using biped. the model was animated using external .bip files. But I have no idea how I am going to do it in my case.

I have made a character model using 3ds max. I applied a skin modifier to link it with the bones I made.

To create the bones I am using this tutorial.

How should I go about animating my character and then using those animations in away3d.

Sry I am a new at 3ds max and away3d
thanks

   

Ankur, Jr. Member
Posted: 31 January 2013 05:59 PM   Total Posts: 43   [ # 1 ]

Figured it out!
There is really no change in workflow. The same process that is used to make animated awd with biped works with bones.

I was being stupid.
Excuse my newbieness gentlemen..

   

marabak, Newbie
Posted: 01 February 2013 10:21 PM   Total Posts: 3   [ # 2 ]

Hello Ankur
I’m glad you have found the solution. Its not the same for me… I dont know why but i m not able to launch a skeleton animation made ni max.
When i load a tutorial model it works fine but it breaks with my custom model.
Could you please help me with this? Maybe i could send you my Max file to check if your awd export works better…
smile

   

Ankur, Jr. Member
Posted: 02 February 2013 09:12 AM   Total Posts: 43   [ # 3 ]
marabak - 01 February 2013 10:21 PM

Hello Ankur
I’m glad you have found the solution. Its not the same for me… I dont know why but i m not able to launch a skeleton animation made ni max.
When i load a tutorial model it works fine but it breaks with my custom model.
Could you please help me with this? Maybe i could send you my Max file to check if your awd export works better…
smile

Did your model animate in the html preview generated by the 3ds max awd exporter?

I am also having some trouble. The automtically generated preview animated the model well, I am having difficulty animating it using my code. I managed to load the mesh successfully, but do not yet know exactly how to animate.

But anyway, sure do send me the file.
My email is .(JavaScript must be enabled to view this email address)
I will see what I can do.

May be we can partner through these problems. If u have skype, add me. My skype name is: ankur_sharma309

   

Ankur, Jr. Member
Posted: 02 February 2013 06:18 PM   Total Posts: 43   [ # 4 ]

Solved the problem.

Here is the relevant code that I used.

AssetLibrary.enableParser(AWD2Parser);
   
AssetLibrary.addEventListener(AssetEvent.ASSET_COMPLETEonAssetComplete);
   
AssetLibrary.addEventListener(LoaderEvent.RESOURCE_COMPLETEonModelLoadComplete);
   
AssetLibrary.addEventListener(LoaderEvent.LOAD_ERRORonModelLoadError);
   
AssetLibrary.load(new URLRequest('assets/myModel2.awd'));

private function 
onAssetComplete(e:AssetEvent):void
  {
   _textField
.appendText("\n"e.asset.assetType ": " e.asset.name);
  
}
  
  
private function onModelLoadError(ev:LoaderEvent) : void
  {
   _loader
.removeEventListener(LoaderEvent.RESOURCE_COMPLETEonModelLoadComplete);
   
_loader.removeEventListener(LoaderEvent.LOAD_ERRORonModelLoadError);
   
_loader null;
   
_textField.appendText("\n" "Load Error");
  
}
  
  
private function onModelLoadComplete(ev:LoaderEvent) : void
  {
   _textField
.appendText("\n" "Load Complete");
   
   
assetsLoaded++;
   if(
assetsRequired==assetsLoaded)
   
{
    setUpScene
();
   
}
  }
  
  
private function setUpScene():void
  {
   _textField
.appendText("\n" "Setting Up Scene");
   
   
_skeleton Skeleton(AssetLibrary.getAsset("pelvis_bone"));
   
_breatheState SkeletonClipNode(AssetLibrary.getAsset("toes"));
   
_walkState SkeletonClipNode(AssetLibrary.getAsset("bend"));
   
_mesh2 Mesh(AssetLibrary.getAsset("male"));
   
   
_textField.appendText("\n" "Assets Found");
   
   
_mesh2.scale(2);
   
_mesh2.castsShadows true;
   
_mesh2.material.lightPicker _lightPicker;
   
_mesh2.100;
   
_container.addChild(_mesh2);
   
   
_animationSet = new SkeletonAnimationSet(2);
   
_animationSet.addAnimation(_breatheState);
   
_animationSet.addAnimation(_walkState);
   
   
_animator = new SkeletonAnimator(_animationSet_skeleton);
   
_animator.updatePosition false;
   
_mesh2.animator _animator;
   
   
_crossFadeTransition = new CrossfadeTransition(0.5);
   
   if(
_animationSet.hasAnimation("toes")&&_animationSet.hasAnimation("bend"))
   
{
    _textField
.appendText("\n" "AnimationSets Filled");
    
_hoverController.lookAtObject _mesh2;
    
_animator.playbackSpeed=1;
    
_animator.play("bend"_crossFadeTransition);
   
}
   
else
   
{
    _textField
.appendText("\n" "AnimationSets Not Filled");
   
}
   
   _view
.scene.addChild(_container);
   
  
   
   
‹‹ JigLib + away3d

X

Away3D Forum

Member Login

Username

Password

Remember_me



X