How to swap meshes bound to bones?

Software: Away3D 3.x

boowoo, Newbie
Posted: 19 July 2012 07:07 PM   Total Posts: 5

Hello dear Away3D community!

I am loading a bone-animated model in Collada format. It’s a game avatar and game avatars in our project have changeable clothing, weapons, heads etc. All meshes are available and adjusted to the skeleton. The question is: what is the easiest way to swap a head mesh with another head mesh on the existing ObjectContainer3D loaded from Collada?

Thanks!

   

Richard Olsson, Administrator
Posted: 20 July 2012 10:59 AM   Total Posts: 1192   [ # 1 ]

Just remove them from the scene, and make sure that the animator acts on the new mesh. There is no explicit binding between a skeleton and a mesh in Away3D. All meshes (or rather, their geometries) that have ever been bound to a skeleton in an editor or whatever contains the necessary information to be deformed by a skeleton (of the right configuration.) So as long as you have the animator set up for the second mesh, removing the first and adding the second should just work.

   

boowoo, Newbie
Posted: 22 July 2012 10:39 AM   Total Posts: 5   [ # 2 ]

Thanks, can you give me a very short piece of code showing how it’s done. I see to fail finding how to bind vertices / mesh to bones. The only thing I found out is a rootBone property but modifying has no effect.

I’m using Away3D 3.6 latest GIT.

   

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

Sorry, I missed the fact that you are using 3.6. Was too caught up in answering questions about 4.0 I forgot to look at your version tag.

I would recommend that you just create a huge COLLADA file with all your meshes bound to the same skeleton, and then hide/show those that you don’t want to update. Although to be honest I personally wasn’t involved in the skeletal animation system before 4.0, so I might be overlooking something (like the most optimal way to do this performance-wise.)

Let us know how it goes and maybe someone else can help if continue to have problems getting it to work!

   

dano87, Newbie
Posted: 26 July 2012 11:15 AM   Total Posts: 1   [ # 4 ]

Thanks for that, I was looking to do the same thing.

Cadisch Precision Meshes Ltd

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X