We use our years of experience helping developers expedite their work with 3D files to explain how to use GLB files, it’s relation to glTF, and which programs to use to open, view, and convert them.
In this article:
What is a GLB file?
The Khronos Group developed the GLB and glTF formats in 2015. They saw a need for formats that developers could open and edit in many graphics and 3D apps. Version 2.0 of the specification (released in 2017), added Physically Based Rendering (PBR), which allows shadows and light to appear more realistic and coding updates for speed and improvements in animation.
GLB, like glTF, is a royalty-free way to encode 3D data. A GLB file will generally be smaller (approximately 33 percent) than a glTF file and its supporting files. It’s also easier to upload a single file to a server rather than two or three, so GLB has an advantage there too. Many developers find it easier to edit the objects and senses in the glTF format and then convert it to GLB to deliver the file.
What is the file structure for a GLB file?
Khronos posted the specifications for glTF versions 1.0 and 2.0 on GitHub. The GLB specs are in the glTF documents. GLB files contain a header that identifies the file as GLB, the specification version, and the file length; a JSON chunk with the data included in a glTF file; and binary buffer, which contains the data included in the supporting files.
glTF uses URIs (Universal Resource Identifier), which may also be called data URLs. This bit of code allows a developer to encode objects (from text to an embedded 3D object) in a web page. In glTF files, URIs pull data from the supporting files. Since the supporting file data used by glTF files are stored in the GLB files, URIs are not required. Therefore, GLB files are faster to load and process than glTF, making them useful for mobile- and web-based 3D modeling applications.
How to view GLB files
GLB uses the same viewers as glTF files, including downloadable desktop viewers, mobile apps, and drag-and-drop viewers. See our guide on glTF for more details.
How to open GLB files
You can use Microsoft Paint 3D, Microsoft Remix 3D, and Trimble 3D Warehouse to open a GLB file. Additionally, any program that opens a glTF files can also open GLB files. See the glTF article for more information.
How to convert GLB files
You can use glTF optimizers to convert files between glTF and GLB. There are many applications and web tools available, some convert files both ways, others do that plus convert files from 1.0 to 2.0, some convert 1.0 glTF to 1.0 GLB, and others will do conversions during file loading.
Once you have a glTF file, you can then convert it to a GLB file. Otherwise, you can use programs like BlackThread.io to convert other formats to GLB. Those formats include 3MF, AMF, FBX. OBJ and MTL, glTF, Collada, PCD, PLY, JSON, and STL.
To check for other conversion options, try the File-Extensions.org Converter page. You can enter GLB and different file types to see which applications or websites can do the job.
How to convert a GLB file to STL
There’s currently no way to convert a GLB file to STL. However, you can convert an STL to a GLB.
How to convert a GLB file to OBJ
There’s currently no way to convert a GLB file to OBJ. However, you can convert an OBJ file to a GLB. Learn more about what you can do with OBJ files.
What are popular uses for GLB files?
GLB files are useful in scenarios that require animation and motion, or when there is a desire for interactivity. Those situations include:
- Video game developers can save their work as GLB files.
- Interactive websites and ads use the GLB format to display objects that users can interact with (like a couch that they can rotate and view from any angle).
- AR and VR developers can also save their work in the format.
Other file formats that use the GLB extension
In addition to the binary version of glTF, there are a few files that share the GLB extension. These are:
- Glulx Blorb Game File: Bundle game resources, including graphics, level data, music, and more. The format was originally created for text-based games, but it was adapted for graphical games.
- STK Globe File: Used by the application STK (Systems Tool Kit), the file stores information on a simulated globe. The format is used in space and defense system simulations, intelligence analysis, satellite operations, and aircraft design.
- Glanda Button: Glanda is a program that creates Flash-based objects. One of the items it can create is a button, also called SwfEasy.button.
- Global Module in BASIC: BASIC is a coding language created in the 1960s. Chunks of code are called modules; you can reuse global modules. GLO is sometimes used instead of GLB.
Frequently asked questions about the GLB file format
Most resources for GLB are the same for glTF. See the glTF article for more information. Have more questions about working with the GBL file format? Here are some of the most commonly asked questions about working with the format.
How do I reduce a GLB file size?
Textures may cause the file to be large. Ensuring that the original textures are in the JPG or PNG format (which are more compact than other image file types) can reduce the size of the final file.
Your 3D graphics app’s setting may help. For example, here are instructions for exporting GLB files in Blender. If you’re using Cheetah3D, open preferences, click Files, then click .glb.
How do I compress a GLB file?
Draco is an open-source tool created by Google that compresses GLB and other 3D files. You can find the Draco code (in C++) on GitHub, as well as instructions for installation and usage.
You can also use the compress function built into the Windows and Mac OSs, though it may not be as effective. In Windows File Explorer, right-click the file, then click Compressed (zipped) folder. In the Mac Finder window, right-click the file, then click Compress (file name).
You may also be able to change the settings in your graphics app to save the file in a compressed format automatically. For example, in Blender, turn on file compression in settings. Click User Preferences, then check the box next to Compress File.
How do I upload a GLB file to Facebook?
Sadly, Facebook no longer supports 3D posts (other than 3D pictures), so this functionality is no longer available.
3D modeling services and 3D Cloud by Marxent
3D Cloud™ by Marxent is the leader in 3D catalog creation for configurable products. Major furniture and home improvement brands rely on 3D Cloud for 3D content. Our 3D modeling services team delivers 3D products with realism, speed, and consistency.
With 3D Cloud, reusability is key
3D Cloud uses a proven 3D content pipeline to order, manage, and deliver 3D content at scale. Having a 3D content pipeline builds operational efficiency, allowing for 3D asset reuse. Our cloud-first secure platform architecture is designed to be built once and run anywhere. Exporting 3D models for WebAR, 3D product configurators, and 3D room planners is easy. It’s also easy to download individual models in a range of 3D file types, including USDZ, glTF, and OBJ files. 3D Cloud™ by Marxent is the only 3D platform designed for enterprise retailers. Request a demo today.
Learn more about our 3D modeling services for product visualization.