Mesh.MergeMeshes crashes on more than 65336 vertices mesh with allow32BitsIndeces on - BUG
See original GitHub issueBABYLON.Mesh.MergeMeshes(…) crashes if the meshes to merge have more than 65336 even though flag allow32BitsIndices = true.
Attached is a full test suite with html, gtlf file, bin, and textures. The file includes an html to run on local server, which will load a gltf that has multiple meshes of the same material, with more than 65536 vertices.
An attempt to merge all meshes with same materials is done on lines 118 - 147 of the bug.html script, producing a failure.
Function: BABYLON.Mesh.MergeMeshes(meshesWithSameMaterial, disposeSource, allow32BitsIndices, meshSubclass, subdivideWithSubMeshes);
Result: TypeError: this.indices.push is not a function
babylon.js:1 BJS - [01:53:21]: Error running tasks-done callbacks.
m._ErrorEnabled @ babylon.js:1
e._decreaseWaitingTasksCount @ babylon.js:1
(anonymous) @ babylon.js:1
e.onDoneCallback @ babylon.js:1
(anonymous) @ babylon.js:1
(anonymous) @ babylon.js:1
f @ babylon.js:1
(anonymous) @ babylon.js:1
Promise.then (async)
(anonymous) @ babylon.js:1
f @ babylon.js:1
o @ babylon.js:1
XMLHttpRequest.send (async)
l @ babylon.js:1
n @ babylon.js:1
m.LoadFile @ babylon.js:1
g @ babylon.js:1
r @ babylon.js:1
(anonymous) @ babylon.js:1
load (async)
c._checkManifestFile @ babylon.js:1
c @ babylon.js:1
P._loadData @ babylon.js:1
P.ImportMesh @ babylon.js:1
e.runTask @ babylon.js:1
e.run @ babylon.js:1
e._runTask @ babylon.js:1
e.load @ babylon.js:1
createScene @ bug.html:163
(anonymous) @ bug.html:170
babylon.js:1 TypeError: this.indices.push is not a function
at q.merge (babylon.js:1)
at Function.p.MergeMeshes (babylon.js:1)
at e.assetsManager.onFinish (bug.html:144)
at e._decreaseWaitingTasksCount (babylon.js:1)
at babylon.js:1
at e.onDoneCallback (babylon.js:1)
at babylon.js:1
at babylon.js:1
at f (babylon.js:1)
at babylon.js:1
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
MergeMeshes creates bug in multimaterial since 4.1.0
Hi all - I've found a bug that was introduced in 4.1.0 and persists in 4.2 alpha. When merging meshes the normals of...
Read more >fluent3DMeshToFoam and mergeMeshes crash with large ...
Dear all, i am currently trying to convert ICEM generated large hexahedral meshes (170 mio cells; exported in ASCII) to openFOAM via.
Read more >[Mesh] Unity crash when creating a large mesh (180 million ...
In the top menu go to Window/DoIt -- this tries to create a Mesh . ... crash when creating a large mesh (180...
Read more >How to Merge Meshes - BabylonJS Documentation
When set, vertices inserted into this Mesh. Meshes can then be merged into a Mesh sub-class. Use your own merge function. If you...
Read more >Blender crashes when manipulating a large number of ...
It would probably be better to use a lattice modifier but if you wish to deselect vertices the following method seems to work...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Will check that
I found the bug 😉