aWeirdo Posted April 24, 2017 Share Posted April 24, 2017 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 Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted April 24, 2017 Share Posted April 24, 2017 I do not know what your problem is, but your assumption that you need to call a BeginAnimation for each mesh I am pretty sure is wrong. Maybe stop doing that. Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted April 24, 2017 Author Share Posted April 24, 2017 @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 Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted April 24, 2017 Share Posted April 24, 2017 Why do you have such a work flow? Clearly one skeleton is easier once it hits the BJS side. Blink twice if someone is twisting your arm to do it that way. Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted April 24, 2017 Author Share Posted April 24, 2017 haha yeah that's my point, 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. Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted April 24, 2017 Author Share Posted April 24, 2017 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; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.