OBJ to FBX STL Java

OBJ files contain three-dimensional objects which can be exported to different 3D formats. This article covers how to convert an OBJ file to FBX or STL file programmatically in Java:

OBJ to FBX or STL Converter – Java API Installation

Aspose.3D for Java API supports working with different 3D files like OBJ, FBX, STL, and several other file formats. You can configure the API by downloading the JAR file from the Downloads section, or using the following Maven configurations:

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>21.11</version>
    </dependency>
</dependencies>

Convert OBJ to FBX File Programmatically in Java

You can convert an OBJ file to an FBX file with the following steps:

  1. Load the input OBJ file with the Scene class.
  2. Initialize FBXSaveOptions object with FileFormat instance.
  3. Convert OBJ to FBX file.

The following code sample shows how to convert an OBJ file to an FBX file programmatically in Java:

Convert OBJ to STL File Programmatically in Java

You can convert the OBJ file to an STL file with the steps below:

  1. Load the input OBJ file using the Scene class.
  2. Instantiate a STLSaveOptions class instance.
  3. Convert the OBJ file to STL.

The code snippet below shows how to convert an OBJ file to STL programmatically in Java:

Get Free API License

You can evaluate the API in full capacity by requesting a free temporary license.

Conclusion

In this article, you have explored how to convert an OBJ file to an FBX or STL file programmatically in Java. Furthermore, you may explore other features of the API by going through the API documentation. Please feel free to contact us at the forum in case of any concerns.

See Also