OBJ to 3DS Java

OBJ files contain polygonal faces, texture maps, and other information about 3D objects. Whereas, the 3DS files are used to store mesh data and material information along with other data. Sometimes, you may need to convert an OBJ file to 3DS format. For such requirements, this article covers how to convert an OBJ file to a 3DS file programmatically in Java.

OBJ to 3DS Converter – Java API Installation

Aspose.3D for Java API supports working with two or three-dimensional objects and scenes. You can easily configure the API by accessing the reference JAR file from the Downloads section or setting it up from the Aspose Repository using the following specifications in the pom.xml file of the 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.8</version>
    </dependency>
</dependencies>

Convert OBJ to 3DS File in Java

You can convert an OBJ file to 3DS format with the following steps:

  1. Load the input OBJ file from the disk or a stream.
  2. Write the output 3DS file.

Convert OBJ to 3DS File in Java

You need to follow the steps below to convert an OBJ file to 3DS format:

  1. Initialize an instance of the Scene class.
  2. Convert the OBJ file to 3DS format with the Save method.

The code sample below elaborates on how to convert an OBJ file to a 3DS file programmatically in Java:

Get Free Temporary License

You can request a free temporary license to test all the features of the API without any limitations.

Online Demo

Please try the OBJ to 3DS Converter web app developed using this API.

Conclusion

In this article, you have observed and understood how to convert an OBJ file to 3DS format programmatically in Java. However, you may take a look at the documentation section where different chapters cover the features supported by the API. In case of any concerns, please feel free to get in touch via forum.

See Also

Convert USDZ to GLB or GLTF File in C#