Aspose 3D Java SDK Clarifications

Continuing from this forum post.

I am exploring using Aspose’s 3D SDK for Java to convert various 3D model types to GLB.

I have found that many of the model types supported as inputs in your Aspose.3D documentation are unable to be successfully exported to GLB. Can you provide clarifications and/or more information on these instances, including:

  • Autodesk Maya Binary (MB)
  • Autodesk DXF
  • Siemens (JT) versions 8.0.0, 8.1.0, 9.0.0, 10.3.0
  • VRML (WRL)
  • Discreet 3D Studio (3DS)
  • Point Cloud (XYZ)

Here’s a code snippet for converting models covered by Aspose.3D to GLB:

  import com.aspose.threed.FileFormat;
  import com.aspose.threed.GltfSaveOptions;
  import com.aspose.threed.Scene;
  
  public class ThreeDToGlbRepro {
  
      public static void main(String[] args) throws Throwable {
          new com.aspose.threed.License().setLicense(args[1]);
  
          String input  = args[0];
          String output = args[0] + ".glb";
  
          GltfSaveOptions gltf = new GltfSaveOptions(FileFormat.GLTF2_BINARY);
          gltf.setExportTextures(true);
          gltf.setEmbedAssets(true);
          gltf.setDracoCompression(true);
  
          try {
              System.out.println("detected as: " + FileFormat.detect(input));
              Scene scene = new Scene();
              scene.open(input);
              scene.save(output, gltf);
              System.out.println("saved GLB: " + output);
          } catch (Throwable t) {
              System.out.println("throwable class  : " + t.getClass().getName());
              System.out.println("throwable message: " + t.getMessage());
              Throwable cause = t.getCause();
              while (cause != null) {
                  System.out.println("  cause: " + cause.getClass().getName() + " -> " + cause.getMessage());
                  cause = cause.getCause();
              }
              t.printStackTrace(System.out);
              throw t;
          }
      }
  }

You can run it by passing in a model and an Apose license as arguments.

I have attached sample model files below:
Aspose 3D Samples.zip (3.0 MB)

We have created a ticket THREEDJAVA-389 in our issue tracking system to investigate this issue. Our team will look into the problem with exporting multiple 3D formats (MB, DXF, JT, WRL, 3DS, XYZ) to GLB format and we’ll ping you back once we have an update.

Thank you for providing the code snippet and sample files - this will help our investigation.

@a.z

Here are the results of our investigation using Aspose.3D for Java version 26.8 (to be released soon):

.3DS files

  • DDD 3DS.3ds
  • DDD 3DS2.3ds
  • DDD 3DS3.3ds
  • DDD 3DS4.3ds

All .3ds files can be correctly exported to glB.

DXF

  • DDD DXF.dxf – ticket created (THREEDNET‑1778).

JT

  • DDD JT V8_0.jt – contains an unsupported XT block; XT support is on our roadmap. Other parts can be decoded (ticket THREEDNET‑1780).
  • DDD JT V8_1.jt – still under investigation (ticket THREEDNET‑1781).
  • DDD JT V10_3.jt – malformed version 8.0 file mislabeled as 10.3; file content is damaged.

WRL

  • DDD WRL V2.wrl – VRML V2 is not yet supported; ticket opened (THREEDNET‑1782).
  • DDD WRL V1.wrl – contains unsupported elements (ticket THREEDNET‑1777).

MB

  • DDD MB.mb – can be converted, but the transformation is incorrect (ticket THREEDNET‑1779).

XYZ

  • DDD XYZ.xyz – point cloud converts correctly.

Version 26.8 will be released next week. If any tasks are resolved, the corresponding fixes will be included with the new version.

Thanks!