Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active June 9, 2023 11:48
Show Gist options
  • Save aspose-com-gists/8d8f72923b2bc66521e0fd705e4a0e21 to your computer and use it in GitHub Desktop.
Save aspose-com-gists/8d8f72923b2bc66521e0fd705e4a0e21 to your computer and use it in GitHub Desktop.
GLB to OBJ | OBJ Converter GLB | GLB File to OBJ
// This code example demonstrates how to convert GLB to OBJ in C#.
using Aspose.ThreeD;
// Create an instance of the Scene class
Scene scene = new Scene();
// Load the input GLB file
scene.Open("C:\\Files\\Sample.glb");
// Initialize save options
var objSaveOptions = new ObjSaveOptions();
objSaveOptions.EnableMaterials = true;
// Save OBJ file
scene.Save("C:\\Files\\3d\\Sample_out.obj", objSaveOptions);
// This code example demonstrates how to convert GLB to OBJ in Java.
import com.aspose.threed.ObjSaveOptions;
import com.aspose.threed.Scene;
// Create an instance of the Scene class
Scene scene = new Scene();
// Load the input GLB file
scene.open("C:\\Files\\Sample.glb");
// Initialize save options
ObjSaveOptions objSaveOptions = new ObjSaveOptions();
// Save OBJ file.
scene.save("C:\\Files\\Sample_out.obj", objSaveOptions);
# This code example demonstrates how to convert GLB to OBJ.
from aspose.threed import Scene
# Load a GLB file with Scene class.
scene = Scene.from_file("C:\\Files\\Sample.glb");
# Initialize an save options
objSaveOptions = ObjSaveOptions()
# Convert GLB to OBJ
scene.save("C:\\Files\\sample_out.obj", objSaveOptions);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment