Jump to content

About creating dynamic avatars


dsman
 Share

Recommended Posts

You can dispose of meshes, materials, and textures at anytime. And I often use the RunAfterRender() function to apply different attributes to the scene. However, there are may ways to do this... so RunAfterRender() may not work for your scene. However, if you have a command of JavaScript, then this should be simple... as the babylon.js framework has all the functions in place. If you need more assistance, then post a playground scene.

DB

Link to comment
Share on other sites

@dsman you may be able to bake the cloth animation using a DCC application (e.g. Blender) and bring it into Babylon using glTF if you have a consistent character animation, similar to the Fabric Motion demo you mentioned.  But if you want the cloth to react dynamically to character movement, it may be trickier to implement in a stable way.  You may be able to start with the cloth animation that @trevordev referred to, but getting the animation you want could be a considerable investment.

Link to comment
Share on other sites

@dsman I'm with @kcoley on this one that unless you need procedural deformation of cloth for simulation using something like Canon.js, baking out the animation from your DCC is the best alternative. Having the clothes skinned to the same skeleton as your character and exporting them as separate mesh objects to be loaded independently of the character mesh is the way most tech pipelines will take. It also depends on the complexity of what you are speaking of. If you are thinking of multiple clothing/accessory options for each character, you will quickly get into trouble trying to do cloth simulation at runtime because you are speaking about many meshes per character all doing collision on the character per frame. If you were to bake out the animations into each piece of clothing, the clothing mesh as well as the character mesh could share the same animations, so they would be in sync. Ideally, you would retarget the skin weights of the mesh to the skeleton of the character as well so that you are handling multiple skeletons as well. This way all of the physics calculations are baked into the animations rather than needing to have them on each character.

Anything that does not need to deform, like armor/shield/bracer for example, could just be instantiated and parented to the correct bone. This means you would want extra bones in your skeleton rig for attachments but is the easiest way to accomplish this as the mesh doesn't need any animation or skinning, but just follows along with its parent joint. Hopefully, this makes sense, but please shoot back any questions you have.

 

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