GLB is the binary representation of 3D models and stores information about 3D models such as node hierarchy, cameras, materials, animations, and meshes. GLB is a container format and was introduced for the representation of glTF assets in a binary blob to avoid the issues caused by glTF. Furthermore, the GLB file is globally acceptable by AGI Systems Tool Kit (STK), a program used to simulate aerospace missions, defense systems, and telecommunication systems.
On the other hand, an FBX file is a 3D model in the Autodesk Filmbox format. It contains a model for sharing across a variety of digital modeling and content creation programs, including the Autodesk suite of applications. FBX files are popular in game development and animations and are available in both binary and ASCII file formats. One salient feature of FBX files is that many non-Autodesk modeling & animation applications can easily open them.
Furthermore, the FBX format allows creators to share 3D models with each other as it efficiently stores models as binary data. Owing to these features, in this article, we are going to discuss the steps and details of converting GLB to FBX using Aspose.3D Cloud API.
3D Files Processing API
Aspose.3D Cloud is a collection of REST APIs helping you to create, modify & convert 3D objects, models & entities (Box, Cylinder, Sphere, Torus, Plane). Implement these capabilities in desktop, web, mobile, or hybrid applications. You may triangulate meshes in the whole file or a certain part of the 3D scene (specified by OAP) and save it to other supported document formats. You may also perform other operations such as transformation, translation, scaling, and rotation of 3D objects. No software download or installation is required and perform all the file processing in the Cloud without any 3rd party dependency.
Convert GLB to FBX using cURL
Aspose.3D Cloud API is developed according to REST architecture, so it can easily be accessed using the cURL commands. Please note that in order to ensure the data privacy and protection of documents stored in cloud storage, only authorized users can access the API. Nevertheless, the subscription is FREE and can be completed by visiting Aspose.Cloud dashboard. If you have GitHub or Google account, simply Sign Up. Otherwise, click on the create a new account button and provide the required information. Now login to the dashboard using credentials and expand the Applications section. Scroll down towards the Client Credentials section to see Client ID and Client Secret details.
The next step is to generate a JSON Web Token (JWT) based on your ClientID and ClientSecret details retrieved from Aspose.Cloud dashboard. Please execute the following command in the terminal to generate the JWT token.
curl -v "https://api.aspose.cloud/connect/token" \ -X POST \ -d "grant_type=client_credentials&client_id=718e4235-8866-4ebe-bff4-f5a14a4b6466&client_secret=388e864b819d8b067a8b1cb625a2ea8e" \ -H "Content-Type: application/x-www-form-urlencoded" \ -H "Accept: application/json"
Now in order to convert the GLB file to FBX format, please access the PostConvertByFormat API that takes the following request parameters
- name – The name of the source file
- newformat – The format of the resultant file
- newfilename – The name of the resultant file
- folder (optional) – The folder in which source file is located. In case no information is provided, then API tries to locate the file on default location on storage
- IsOverwrite (optional) – Overwrite the source file. (Default value : false)
- storage (optional) – storage name
curl -X POST "https://api.aspose.cloud/v3.0/3d/saveas/newformat?name=uploads_files_2382092_untitled.glb&newformat=fbx7200ascii&newfilename=Myresultant.fbx&IsOverwrite=false" \ -H "accept: application/json" \ -H "authorization: Bearer <JWT Token>"
Get list of Supported File Formats
In every new release, we strive to add new features as well as support new 3D formats. Furthermore, in order to get information regarding the latest supported file formats, please try using the following cURL command. Send a GET request and in response, the list of all supported formats will be returned.
curl -X GET "https://api.aspose.cloud/v3.0/3d/fileformats" \ -H "accept: application/json" \ -H "authorization: Bearer <JWT Token>"
[ "amf", "ase", "collada", "discreet3ds", "draco", "dxf", "fbx7200ascii", "fbx7200binary", "fbx7300ascii", "fbx7300binary", "fbx7400ascii", "fbx7400binary", "fbx7500ascii", "fbx7500binary", "fbx7600ascii", "fbx7600binary", "fbx7700ascii", "fbx7700binary", "gltf", "gltf2", "gltf2_binary", "gltf_binary", "microsoft3mf", "pdf", "ply", "rvmbinary", "rvmtext", "siemensjt8", "siemensjt9", "stlascii", "universal3d", "wavefrontobj", "xbinary", "xtext", "zip" ]
In this article, we have discussed some very simple steps on how to convert the GLB file to FBX format using the cURL command. Other than specified formats, you may consider processing other 3D file-formats including AMF, 3DS, RVM, DRC, and much more. The complete list can be found over supported document formats.
In case you encounter any issues while using the API or you have any further queries, please feel free to contact us via the free product support forum.