Closed pjcozzi closed 7 years ago
Try adding --max-old-space-size=8192
right after node
and that will allow 8 gigs of RAM and you can tell if it's a memory issue.
Running with
node --max-old-space-size=4096 bin/obj2gltf.js powerplant.obj -o a.gltf
And larger memory sizes avoid the crash; however, it returns quickly and does not generate a glTF model. Perhaps this is related to the MTL file?
For me it doesn't work even with --max-old-space-size=16384
. It fails at fs.readFile
on the obj file, so I'll try out streams instead and see how it goes.
Thanks @lilleyse! This will be useful for our Web3D tutorial.
It looks like the power plant model uses negative face indices in a lot of places, which I didn't know the OBJ format even supported. So I hope handling that will get this to work.
f -1468758//-106815 -1468757//-106606 -1468749//-106724
f -1468758//-106815 -1468749//-106724 -1468750//-106808
f -1468757//-106606 -1468756//-106605 -1468748//-106603
f -1468757//-106606 -1468748//-106603 -1468749//-106724
f -1468756//-106605 -1468755//-106604 -1468747//-106602
f -1468756//-106605 -1468747//-106602 -1468748//-106603
f -1468755//-106604 -1468754//-107067 -1468746//-106601
Fixed in #49
Converts with the --bypassPipeline
flag. Still too large to be handled by gltf-pipeline
however.
You should write up a copy of this issue for gltf-pipeline
so we fix it there too.
Model: http://graphics.cs.williams.edu/data/meshes.xml
Is it just out of memory?