Jump to content

borrow skeletal animation


hunts
 Share

Recommended Posts

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.)  :o 

(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.

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...