Jump to content

Help with hooking models to specific places in another model, sort of


Macbeth
 Share

Recommended Posts

Hello everyone! This might be a noob question, I don't know, I'm very new to game development.

 

What I'm trying to do is hooking 1 or more models into surtain places in a skeleton (I think).

 

What I have is a base player model (skeleton) with a lot of points on it, for example head and body.

I am trying to make a head and a body model to display at those two exact points.

 

Here's a screenshot of the player model:

uvswf24.png

 

And here's the head model I want to be displayed on the head of the player model:

 

kquiDEW.png

 

Is this possible to do with Babylon JS? 

What I want to achieve is to have a character model, and I can switch parts, of the model to look different in game, just like an inventory to switch items for the character.

 

Sorry if this question is so "noobly" asked, but I'm really new at this.

 

I have not created these models myself.

 

Regards,

Daniel

Link to comment
Share on other sites

Hi MacBeth... welcome to the forum!  Good to have you with us.

 

If I understand what you are asking, YES, it is quite possible, and maybe VERY easy.

 

Your skeleton is created with many 'bone' segments, correct?  Could you parent a mesh... to one of those bones?  (in the BJS scene... AFTER the .babylon import)

 

That would seem to be an easy method to attach a separate head mesh, and other body parts.  You might see some "z-fighting" and mesh tearing whenever the parented-to-a-bone mesh... overlaps with another body mesh.  But still, you will have an interesting "change your character" system, here.

 

Keep in mind that I am not a pro... but I wanted to comment just the same. I want to see the results... because... this is cooooool! 

 

I once did a little experimenting with 'linked' mesh using our Oimo and Cannon physics engine plugins.  The two demos can be seen at...

 

http://www.html5gamedevs.com/topic/2571-the-wingnut-chronicles/page-22#entry65034  (and the next comment too)

 

You are building ragdolls that can have their body parts fall-off, eh?  hehe.  COOL!  I want to see it happen!   Pulling the heads off-of dolls... is a thing we guys are KNOWN-FOR!  :)

Link to comment
Share on other sites

The only issue is that parenting doesn't pass deformations.  If you want to do this, the only way currently is to parent multiple objects (and you can deform multiple meshes to bones as well) and apply an alpha channel to thier texture or material to make them visible and unvisible. This can also be a gradient value so that the change isn't abrupt.

Link to comment
Share on other sites

The only issue is that parenting doesn't pass deformations.  If you want to do this, the only way currently is to parent multiple objects (and you can deform multiple meshes to bones as well) and apply an alpha channel to thier texture or material to make them visible and unvisible. This can also be a gradient value so that the change isn't abrupt.

 

How do I do this?

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