chicagobob123 Posted March 15, 2018 Share Posted March 15, 2018 I read this thread and looked at this example. https://www.babylonjs-playground.com/#2EGQ6C#1 I am getting what styxxx explained. The browser is blowing up. What I am doing is looks like this l1, l2 and l3 are arrays of instanced meshes. var newsidenumbers; var sidenumberarray =[]; ml1=BABYLON.Mesh.MergeMeshes(l1); ml2=BABYLON.Mesh.MergeMeshes(l2); ml3=BABYLON.Mesh.MergeMeshes(l3); newsidenumbers=BABYLON.Mesh.MergeMeshes([ml1,ml2,ml3]); newsidenumbers.makeGeometryUnique(); sidenumberarray.push(newsidenumbers); // column and numbers 1,2,3 l1 = l2 = l3 = ml1 = ml2 = ml3 = null; Later I want to do this. newsidenumbers=BABYLON.Mesh.MergeMeshes(sidenumberarray); and instance it. Basically make one and repurpose for performance. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted March 16, 2018 Share Posted March 16, 2018 Hi CB! http://www.html5gamedevs.com/search/?&q=merge instances&type=forums_topic&nodes=16,28,29,30,31 According to the 4th post (Dad72) and 6th post (Deltakosh)... instances cannot be merged. Sorry. I'm not real knowledgeable as-to WHY... but... I believe it is because instances carry no geometry data of their own. They must reference their master's geometry. Instances are lightweight because of this feature. Party on. chicagobob123 1 Quote Link to comment Share on other sites More sharing options...
chicagobob123 Posted March 16, 2018 Author Share Posted March 16, 2018 Always love an answer. While I waited I determined to do more optimizations. I cloned some base objects made them unique and then instanced that which worked very well. The performance was great and load time improvement was about 500%. Went from 40 some seconds down to ~7 seconds. So it was worth the redo. What I work on is so dry and uninteresting but it does push the boundaries of things. And here for me its Friday/Payday and Saint Pats weekend. So the Party is ON Wingnut 1 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.