Learning three.js: Working on splitting and merging geometries

Hi, I’m learning three.js and 3d modeling and working on a character editor. I’m loading trough gltf-loader some models and working with them. I have a character splited, right now body without arm. I’m able to merge the buffer geometries and work with them as one, but I see this:

How can I have a clean merge? Do I need to use some extra library and apply a Boolean modifier?
Thanks for guidance

this one GitHub - gkjohnson/three-mesh-bvh: A BVH implementation to speed up raycasting and enable spatial queries against three.js meshes.

Depends on your goals for a merge. If you want all the original vertices and triangles to be preserved exactly, even if it leaves interior triangles or duplicate vertices, then BufferGeometryUtils.mergeBufferGeometries will do that. If you want a clean topology on the result, so there are no interior triangles, three-bvh-csg (I think that’s what @drcmda meant to link to?) would be a better choice but is slower.

1 Like

ah yes, wrong link :sweat_smile:

thanks @drcmda and @donmccurdy really helpful. I’ve applied this suggestions and was able to render the wanted result. Thanks

1 Like