Jump to content

Same skeleton for children ?


aWeirdo
 Share

Recommended Posts

Hi all,

I've been wondering,
a mesh like "the dude" seems to be using a single skeleton(so you only have to call beginAnimation Once),
but he is made up of several meshes,

When i export meshes to babylon,
the "main" mesh is exported with the entire skeleton(all bones),
and children meshes are each exported with their own version of the skeleton (containing only the bones that mesh use),

So i have to call beginAnimation for each mesh/child mesh. 

If i point the child meshes skeletons to the main mesh's skeleton (mesh.skeleton = mainMesh.skeleton),
which also contains the bones the child mesh uses, and then beginAnimation, the child mesh is either spagetti, or just not animated properly,


So my question, How is it achieved to use the same skeleton?


using 3DS Max 2016, exporter 0.8.0, (also tried an older exporter, same result)


Cheers :)

Link to comment
Share on other sites

@JCPalmer 
Each child mesh is being exported with it's own skeleton,
only containing the bones which that mesh uses,
if i don't call beginAnimation on it,
and only do it on the parent/main mesh, the child is just static :) 

I forgot to mention that i'm using 3ds max, updated :) 

Link to comment
Share on other sites

haha yeah that's my point, :D 

It's doing it by default, i'm trying to figure out how to export it to use the same skeleton,
in 3ds max, there's only one skeleton, but when exporting, it is being split so child meshes are getting their own skeleton with the bones it uses and their animations.

Link to comment
Share on other sites

I'm guessing it has something to do with how the exporter works, it's creating a new skeleton per "skin" modifier, but such a modifier is required on each mesh to allow manipulation via bones, even if it's using the same bones as a parent
So the exporter seems to believe it's a seperate mesh and needs it's own skeleton
 

private void ExportSkin(IIGameSkin skin, BabylonScene babylonScene)
        {
            var babylonSkeleton = new BabylonSkeleton { id = skins.IndexOf(skin) };
            babylonSkeleton.name = "skeleton #" + babylonSkeleton.id;

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...