USDZ to GLB Java

USDZ files are ZIP files without any compression or encryption. Under certain use cases, you may need to convert a USDZ file to the GLB or GLTF file format. Accordingly, this article explains how to convert USDZ to GLB or GLTF format programmatically in Java.

USDZ to GLB or GLTF Converter – Java API Installation

Aspose.3D for Java supports working with several two or three-dimensional objects and scenes. You can quickly configure the API by downloading the latest version of its JAR files from the Downloads page or with the following configurations to enable it from Aspose Repository in the pom.xml file of your project.

Repository:

 <repositories>
    <repository>
        <id>AsposeJavaAPI</id>
        <name>Aspose Java API</name>
        <url>http://repository.aspose.com/repo/</url>
    </repository>
</repositories>

Dependency:

 <dependencies>
    <dependency>
        <groupId>com.aspose</groupId>
        <artifactId>aspose-3d</artifactId>
        <version>22.7</version>
    </dependency>
</dependencies>

Convert USDZ to GLB File in Java

You can convert a USDZ file to GLB format with the following steps:

  1. Load the input USDZ file with an object of the Scene class.
  2. Convert USDZ to GLB binary file format.

The code sample below elaborates on how to convert a USDZ file to GLB format programmatically in Java:

Convert USDZ to GLTF File in Java

You can convert a USDZ file to GLTF format with the following steps:

  1. Create an instance of the Scene class.
  2. Convert USDZ to GLTF format.

The following code snippet explains how to convert a USDZ file to GLTF format programmatically in Java:

Get Free Temporary License

You may request a free temporary license to evaluate the API without any limitations.

Online Demo

Please try the USDZ to GLB Converter web app developed using this API.

Conclusion

In this article, you have learned how to convert a USDZ file to GLTF or GLB file format programmatically in Java. The Save method can parse the file extension from the file name and will render the file in the respective format. For example the ASCII or Binary format file as per your requirements. Furthermore, you may visit the documentation space to take a look at other features supported by the API. In case you need to get in touch with us, please feel free to contact us at forum.

See Also

Convert USDZ to HTML in Java