Topper Posted February 22, 2018 Share Posted February 22, 2018 Hi, I´m struggling with merging all meshes in my scene into one new. After having created all the stuff I need, I´m trying to do the following: var framePartsToMerge = []; for (var i = 0; i < scene.meshes.length; i++) { var currentMesh = scene.meshes[i]; framePartsToMerge.push(currentMesh); i--; } var finalFrame = BABYLON.Mesh.MergeMeshes(framePartsToMerge, true, true, false); I have the feeling, I´m pushing the wrong stuff into my array. last working PG: https://www.babylonjs-playground.com/#FY8S2X#25 broken PG: https://www.babylonjs-playground.com/#FY8S2X#28 Any help appreciated. BR, Markus Quote Link to comment Share on other sites More sharing options...
Dad72 Posted February 22, 2018 Share Posted February 22, 2018 Oula, you can not do that. You must merge meshs that share the same materials and textures. it can not work otherwise. GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Topper Posted February 22, 2018 Author Share Posted February 22, 2018 Thanks. I´m gonna change that. Sure, this is the problem? Quote Link to comment Share on other sites More sharing options...
Topper Posted February 22, 2018 Author Share Posted February 22, 2018 OK, i made arrays for meshes that share the same material and it worked right away. Thanks, Dad72 BR, Markus Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted February 22, 2018 Share Posted February 22, 2018 6 hours ago, Dad72 said: Oula French spotted! GameMonetize and Dad72 2 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted February 22, 2018 Share Posted February 22, 2018 lol. 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.