Hello,
I am trying to convert the .glb to .obj using ASPOSE.3D but the conversion is failing for some .glb models and getting following exception
com.aspose.threed.ImportException: Cannot open this file E:\gltf\coffeemat.glb
at com.aspose.threed.jK.a(SourceFile:86)
at com.aspose.threed.Scene.open(SourceFile:538)
at com.aspose.threed.Scene.open(SourceFile:550)
at com.aspose.test.AsposeTest.main(AsposeTest.java:21)
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 4775299 out of bounds for length 4775296
And for some models (LittlestTokyo.glb) the conversion is successful but the generated .obj model (LittlestTokyoOBJ.obj) was not as same as .glb model.
Please find the shared .glb and converted .obj model
(https://drive.google.com/drive/folders/1lXEt2Yq1F0b6J1egq2ZRbtZsjM4wyZzJ?usp=sharing
) and conversion code is as follows :
Scene scene = new Scene();
try {
// converting 3D format to obj
scene.open(dir+ “LittlestTokyo.glb”);
scene.save(dir+ “LittlestTokyo.obj”, FileFormat.WAVEFRONTOBJ);
System.out.println(“Conversion is successful”);
} catch (IOException e) {
e.printStackTrace();
}
It would be really great if you could help me with this.
Thank you.