jellix Posted April 25, 2017 Share Posted April 25, 2017 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? Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted April 25, 2017 Share Posted April 25, 2017 SPS http://doc.babylonjs.com/overviews/solid_particle_system Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted April 25, 2017 Share Posted April 25, 2017 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. jsdream 1 Quote Link to comment Share on other sites More sharing options...
jellix Posted April 25, 2017 Author Share Posted April 25, 2017 Great answers! Thanks a lot! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.