Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active December 22, 2021 20:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-com-gists/959a1d627af6c8f8b9fd80cd9306b407 to your computer and use it in GitHub Desktop.
Save aspose-com-gists/959a1d627af6c8f8b9fd80cd9306b407 to your computer and use it in GitHub Desktop.
Convert 3D Object OBJ File to FBX or glTF GLB File Programmatically in Java
//// Load the OBJ in an object of Scene class
Scene document = new Scene("template.obj");
// Create an instance of FbxSaveOptions
FbxSaveOptions options = new FbxSaveOptions(FileFormat.FBX7500ASCII);
// Convert 3D Object OBJ File to FBX
document.save("output.fbx", options);
// Load the OBJ in an object of Scene class
Scene document = new Scene("template.obj");
// Create an instance of GltfSaveOptions
GltfSaveOptions options = new GltfSaveOptions(FileFormat.GLTF2);
// Convert 3D Object OBJ File to glTF file
document.save("output.gltf", options);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment