How to assign different meshes to a skeleton with animation

Hi all,

I am evaluating Unity to see if it is suitable for our games.

We have built several skinned models with separated head, body, arms and legs sharing the same skeleton, and we have a single skeleton and a number of animations associate with it.

How can I set different head, body, arms and legs skinned models to the skeleton, and then apply those animations?

Thanks in advanced.

Hi,

Anyone can help? Or is there any post already answering this?

Hi, i’m not to sure about different meshes, but i know there is a “ragdoll” wizard if that’s any help.

The simplest solution is to create those different skinned meshes with the same skeleton, and have them all attached to your character, but only have the ones enabled that you want to see.

A bit more advanced is to remove those parts that you don’t see.

Even more advanced is to combine at runtime the meshes you need into a single mesh (so you get fewer draw calls).

Rune

Just model a skeleton with X different meshes(head, torso, legs, etc) attached to it. Create every other character using that same skeleton.

Now after you import that model(with the skeleton and X meshes) you will end up with X skinned mesh renderers. You can attach any mesh to those renderers and it should work if they were created on the same skeleton. (Use SkinnedMeshRenderer.sharedMesh in a script to change the mesh).

But as Rune suggested, combining those meshes on the fly if probably the best solution performance wise. It should not prove too difficult apart from merging the UVs and the textures(something I haven’t tried yet, but I assume it’s not easy)

Hi, Thx a lot.

And I have try it on the editor, I can change different mesh within the skinned mesh renderer, but when I assign an animation to the original model, it work fine, but when I change the mesh and the animation seems cannot apply on the new mesh.

Am I miss something? or is it a bug? or is it cannot be done with animation?

I am also interested on the subject…
And I’d really like to know about combine multiple SkinnedMeshes at RunTime onto just one Mesh !

If You guys have any Script Example …I’d really appreciate !!!

Thanks in advance !!
Best Wishes !!!