Skeleton?! SkeletonAnimationSet?! SkeletonAminator?!?

Software: Away3D 4.x

ufk, Newbie
Posted: 22 July 2012 02:15 PM   Total Posts: 3

Hello. I’m new to away3d.

I created a box with 3dstudio max 2012 with smile bone animation of 30 frames. i installed the latest awd exporter to export the project to an awd file.
using away3d 4.0 i was able to properly load the file and show it on the screen, for some reason i can’t start the animation in that file. i’m really clueless i tried to google with no much luck.

I downloaded the examples and found the Intermediate_CharacterAnimation.as file interesting enough because it loads and uses skeleton based animations.

pastebin of the flex project class at: http://pastebin.com/kZm0jJbQ
I attached the 3dsmax file and the awd file to this post.

I load assets with AssetLibrary.load and I noticed that it loaded 3 assets in the following order:
skeleton, gemoetry and mesh.

when it loads the skeleton asset i save it in a SkeletonAnimator object.
i ignore the gemoetry asset.
when it loads the mesh asset, i give it a position and a scale. add it to the scene and point the camera controller to that object.

as you can see i have the following line commented out:

this._mesh.animator=this.animator;

when i add the SkeletonAnimator object to the animator property of this mesh, it’s not visible anymore on current camera view.

maybe the animation saves different coords for the object and moved it, i really don’t know. as I said i’m really new to away3d (but not to 3d in general). and my code contains probably many mistakes (sorry for that). but i would really like to fix this code to properly show the animation for that object.

in the future what i want to do is to copy skeleton animation from one object and applying it on another object. if any can recommend me of a good online book i can purchase for that information or any other useful resources it would be great! smile

so thanks a lot for your assistance and hopefully my question is clear enough to understand.

have a nice day!

Kfir

 

 

File Attachments
files.zip  (File Size: 19KB - Downloads: 201)
   

Richard Olsson, Administrator
Posted: 23 July 2012 08:13 AM   Total Posts: 1192   [ # 1 ]

It sounds like you could benefit from having a look at this tutorial:
http://away3d.com/example/3ds_Max_workflow

If you are only getting skeleton, geometry and mesh assets from your AWD file you probably missed the sequences.txt file while you were exporting. The tutorial above will walk you through all the necessary steps including creating a sequences.txt.

Note though that the 3ds Max exporter only supports regular 3ds Max bones right now, and not the Character Studio biped rig. If you’re using that you’ll need to convert it to regular bones for your animation to work with this version of the exporter.

   

ufk, Newbie
Posted: 24 July 2012 12:07 PM   Total Posts: 3   [ # 2 ]

Hello.
thank you for your assistance. unfortunately that does not fully resolve the issue at hand.
you help me improve my script in more ways that i could count. so thank you!
i almost completely rewrote the main class file that properly loads the relevant assets.
pastebin at: http://pastebin.com/NJDd8J8p

i created the following sequences.txt file:
#———-
Lefty 0 10
#———-

now when I read the assets from the wad file i can see that it properly loaded the ‘Lefty’ Skeleton animation state.

the problem is that when i add the SkeletonAnimator to the Mesh object, the mesh is not visible on the screen anymore.

102   this.animator = new SkeletonAnimator(this.animationSet, this.skeleton);
103   this.animator.updateRootPosition=false;
104   this._mesh.animator=this.animator;

—————————————-

if I comment out line 104 the object is visible, if i add this line that it’s not visible anymore. that’s the exact issue i had on my last example. I can’t quite understand if because of that the object is moving some place.

any ideas would be greatly appreciated.

thank you!

Kfir

 

 

   

Richard Olsson, Administrator
Posted: 24 July 2012 12:10 PM   Total Posts: 1192   [ # 3 ]

Did you follow the tutorial and manage to get the mesh and animation used in it’s sample files working?

Is your AWD file configured to use three joints per vertex (which is the number that you are passing into the SkeletonAnimationSet constructor)?

   

ufk, Newbie
Posted: 24 July 2012 12:18 PM   Total Posts: 3   [ # 4 ]

thank you so much! smile
I entered the wrong number of joins per vertex. (export with 2 and wrote 3)

problem resolved and now it’s fully working. thanks a lot! smile

   

Drisicus, Newbie
Posted: 24 March 2013 06:16 PM   Total Posts: 7   [ # 5 ]

THANKS!!! I was getting mad with the 3ds_Max_workflow tutorial, the code is so long :S

But the one that you had posted is awesome wink

Thanks a lot :D

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X