hunts Posted March 30, 2017 Share Posted March 30, 2017 Hyy guys, is it possible to migrate a skeletal animation from one model into an entire new model, i made a PG of what i've been trying: I want to export dude skeletal animation into megabotA http://www.babylonjs-playground.com/#11BH6Z#279 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted March 30, 2017 Share Posted March 30, 2017 Hi Hunts. Unfortunately, I don't think that can be easily done. Actually, you would need to "re-skin" Dude with Megabot's mesh, as opposed to boning Megabot.) (Skeletonizing?) All mesh are made from vertexData values. The main "kinds" of values/data... are positions, indices, normals, uvs, and colors. But notice two other types... matricesIndices and matricesWeights. I think these arrays store the amount of "influence" felt upon THAT vertex... by a bone matrix. (Bones are actually matrix transformations and not mesh.) I hear... that "skinning" an armature/skeleton... is a tedious task (usually done in 3D modelers). Anyway, here's another playground, where I am doing demented experiments and learning. Notice that "Dude" has 6 mesh - likely mesh 0 is a "dummy" and I re-positioned mesh 1-5 in various places. Then I rotated a few of them, just for fun. Notice the console. Megabot is one mesh. NOTICE (in console) that I "dump" Dude mesh #1 and Megabot mesh #0 vertexData objects... to console. Notice that megabot DOES have matricesIndices: Array[18228], matricesWeights: Array[18228], matricesIndicesExtra: Array[18228], matricesWeightsExtra: Array[18228]. So does Dude mesh #1. I'm not sure HOW or WHY megabot has vertex-weight data. Perhaps someone else can answer that. Notice that the length of all 4, is twice the size of uvs, for both Dude Mesh #1 and Megabot mesh #0. Weird. Not sure why. It's all about "skinning". Lots to read about it... on the web. I don't know much about it, but I thought I should introduce you to the way BJS deals with it (as best I know). It's called vertex weighting. Again, I don't think there is any miracle "skeleton swap"... because the skin on Dude... won't match the skin on Megabot... vertex-wise. Sorry for this bad news. Perhaps others will have other/better ideas. Be well, party on. hunts 1 Quote Link to comment Share on other sites More sharing options...
hunts Posted March 30, 2017 Author Share Posted March 30, 2017 @Wingnut i thought as much, thankss 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.