Quantcast
Channel: Babylon.js
Viewing all articles
Browse latest Browse all 388

Instances vs. merging and merging instances

$
0
0

Hi,

 

I have some ground tiles that I use. Currently I'm only using one "real" object and a lot of instances of it. But I'm wondering if it's more efficient to actually create a (bigger) merged mesh? Usually I'd assume the instances to be the better solution since it's a mesh with just a few vertices that will be referenced to. But while testing I noticed a higher fps after I merges some of the instances which seems to be possible. 
But merging instances strips the material. So how can I merge instances and keep it or reassign it afterwards? Does it even make sense or should I stick to the current solution?  :rolleyes: 

Also some interesting thing: merging only works with the code posted here https://github.com/BabylonJS/Babylon.js/wiki/How-to-merge-meshes
Using BABYLON.Mesh.MergeMeshes skyrockets the memory consumption until the whole browser tab crashes. This is a bug and shouldn't happen. Even if you're not supposed to merge instances using gigabytes of memory and freezing the tab - of course without error message in the console - seems like a rather wrong reaction ;)


Viewing all articles
Browse latest Browse all 388

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>