Jump to content

Instanced Mesh Hierachies


Recommended Posts

Does BabylonJS support instancing with mesh hierachies (ie. not just a single mesh when using Mesh.createInstance(), but it also instances the children/descendents that exist under that Mesh?) I want to batch render the individual transforms of the children/descdents that exists under that Mesh (ie. similar to joints, ie. the descendent meshes can be independently transformed), but without hooking it up to an animated skin joint system.

I also noticed the InstancedBones example doesn't really optimize any draw calls. 12 animated skin instances = 12 draw calls. Is this because each skin already has too many vertex-group bindings per bone inside each skeleton? Would it be optimized for simpler skeletons like a skeleton of 5 bones and such? 

Also, the instancing seems limited if it only allows being able to manage individual transforms per clone,but not differ in terms of hierachy/skeletons. Normally, most games would require each clone to be independently animated when it comes to poses, yet still allow for batching their draw calls.

Link to comment
Share on other sites


1. Not directly but it is a really easy to write function :)

2. Not sure to follow you. Look here: http://www.babylonjs.com/Demos/InstancedBones/. Open the debug layer and see the draw calls: 13. Turn off shadows. Now only 6 (1 for the ground and 1 for each submeshes (5))

3.Correct. This is something we should add in the future


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.

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.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...