Closed kushal154 closed 7 months ago
Sometimes NodeJS (that convert2xkt runs on) runs out of memory when processing large glTF files, especially if they have geometry and textures embedded inline.
For optimal results, Try converting .glb files instead, with geometry as external binary attachments (ie. not embedded into the glTF JSON).
Also you could try just ensuring that the geometry buffers are external .bin files. But .glb is always best.
This is due to NodeJS having a maximum string limit of 1GB, where a whole glTF with embedded geometry/textures tends to overrun that when files are big enough.
@xeolabs Kindly let me know the way to do that. I used the following command:
Ifc2gltfcxconverter.exe -i “final.ifc” -o “final.gltf” -m “final.metadata.json” -s 20
It created following files:
-rw-r--r--@ 1 kushal staff 17M Apr 8 10:35 final.bin
-rw-r--r--@ 1 kushal staff 22M Apr 8 10:35 final.gltf
-rw-r--r--@ 1 kushal staff 20M Apr 8 10:35 final.json
-rw-r--r--@ 1 kushal staff 816B Apr 8 10:35 final.manifest.json
-rw-r--r--@ 1 kushal staff 19M Apr 8 10:35 final_1.bin
-rw-r--r--@ 1 kushal staff 18M Apr 8 10:35 final_1.gltf
-rw-r--r--@ 1 kushal staff 1.4M Apr 8 10:35 final_1.json
-rw-r--r--@ 1 kushal staff 19M Apr 8 10:35 final_2.bin
-rw-r--r--@ 1 kushal staff 20M Apr 8 10:35 final_2.gltf
-rw-r--r--@ 1 kushal staff 19M Apr 8 10:35 final_3.bin
-rw-r--r--@ 1 kushal staff 11M Apr 8 10:35 final_3.gltf
-rw-r--r--@ 1 kushal staff 18M Apr 8 10:35 final_4.bin
-rw-r--r--@ 1 kushal staff 21M Apr 8 10:35 final_4.gltf
-rw-r--r--@ 1 kushal staff 19M Apr 8 10:35 final_5.bin
-rw-r--r--@ 1 kushal staff 21M Apr 8 10:35 final_5.gltf
-rw-r--r--@ 1 kushal staff 12M Apr 8 10:35 final_6.bin
-rw-r--r--@ 1 kushal staff 13M Apr 8 10:35 final_6.gltf
What change would you have me make while executing Ifc2gltfcxconverter?
Try this:
Ifc2gltfcxconverter.exe -i “final.ifc” -o “final.glb” -m “final.metadata.json” -s 20
Note that I renamed "final.gltf" to "final.glb", which causes the converter to output .glb files.
In case it's useful, a reference for how to use on Linux, which is similar to how it's used on Windows:
https://xeokit.github.io/xeokit-model-conversion-tests/ifc-tests.html
@xeolabs Thanks for your prompt response. The final thing on the Linux command. I am getting the following error on the Macbook as well as the AWS instance. Would you know what is this about?
bash-5.2$ ./ifc2gltfcxconverter -i final.ifc -o final.glb -m final.metadata.json -s 20 ./ifc2gltfcxconverter: ./ifc2gltfcxconverter: cannot execute binary file
Possibly the architecture is not compatible with the binary? That would explain the Mac issue (I've never tested on Mac)
https://superuser.com/questions/435988/how-can-i-resolve-the-error-cannot-execute-binary-file
Note that I'm using Ubuntu - see if you can ruin that on AWS.
I am getting the following getting issue while converting split gltf files into xkt format using v1.1.15-beta-7 version.
Here is the content of final.manifest.json file
What could be the issue?