Jump to content

Should I merge meshes or should I use instances?


jellix
 Share

Recommended Posts

Hi,

I build up an object that is made of many identical items.

Currently I'm merging all the meshes so that I have only a few drawing calls.

Instead I could use instances. The advantage would be that the construction can be changed dynamically (add or remove some of the instances) and so the merged mesh doesn't have to be disposed and to be rebuild on every change.

So in view of the performance: Is the rendering faster by merging meshes or by using instances?

Link to comment
Share on other sites

instances reduce draw calls only.  Merging both reduces draw calls and render loop Javascript "accounting" overhead.  Instance are more flexible.  You can freezematrix them as well as freeze the materials (though there is a new materials pipeline in works), then if you are disciplined enough to unfreeze - move - refreeze, you will remove a big chunk of the Javascript overhead of instances.  This assumes that you are not trying to do crazy as shit numbers of instances.  SPS is really your final possible solution for that.

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