Jump to content

Batch meshes with same material


MrPage
 Share

Recommended Posts

Hello. Recently I've decided to move my project from Unity to Babylon, but I met several problems, one of which - mesh batching. Unity have feature called "dynamic batching", which can greatly reduce draw calls. It's automatically merge all meshes with the same material into one, and draw it in single DC (with some nuances). Does Babylon have some similar abilities?

Thanks, and sorry for my English :)

Link to comment
Share on other sites

@MrPage hi and welcome to the forum. Babylon.js has several methods to achieve what you want and more.

Merge Meshes  meshes must have same material https://www.babylonjs-playground.com/#J5ACF1

Instances meshes must have same material https://www.babylonjs-playground.com/#J5ACF1#1

Cloned meshes can have different materials but share geometry https://www.babylonjs-playground.com/#J5ACF1#2

Solid Particle System  a single mesh formed from one base mesh repeated many times  with shared material (but different colors) https://www.babylonjs-playground.com/#WCDZS#7 and now a single mesh formed from two different meshes repeated many times with shared material (but different colors) https://www.babylonjs-playground.com/#WCDZS#2

 

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