donmccurdy / glTF-Transform

glTF 2.0 SDK for JavaScript and TypeScript, on Web and Node.js.
https://gltf-transform.dev
MIT License
1.3k stars 145 forks source link

Weld getting stuck on large OBJ files #1292

Closed dennis-modelsend closed 4 months ago

dennis-modelsend commented 4 months ago

Describe the bug Using weld on large OBJ files but getting stuck without any error or running out of memory.

To Reproduce Preform weld on this file: https://we.tl/t-hkROOkQy3T

Expected behavior Produces smaller OBJ file

Versions:

donmccurdy commented 4 months ago

I'd recommend trying the v4 alpha release. Example:

npm install --save @gltf-transform/core@next @gltf-transform/extensions@next @gltf-transform/functions@next

That should perform better on large files, using default tolerance. It may or may not produce a smaller file, as that would depend on the input weld tolerance and the geometry. This model would benefit from simplification and compression with Draco or Meshopt, as well.

If that's still not working as expected, it may be best to share the GLB involved - my conversion from OBJ to GLB may be different than yours, as glTF Transform doesn't handle reading/writing OBJ files.

dennis-modelsend commented 4 months ago

Upgrading to v4 alpha release fixed the weld issue!