A Step-by-Step Guide to Exporting glTF Files From Blender

Exporting your 3D scene or model to a glTF file is easy. Here’s how to prep your assets for exporting.

A Step-by-Step Guide to Exporting glTF Files From Blender

Noticed a new IconScout feature?

That’s right, IconScout now supports glTF files. If you’re not familiar with this file format, no worries. We’ll go through what glTF files are and why they are exciting – both for users looking to download 3D illustrations, and for IconScout contributors. Then we’ll show how you can export your 3D assets as a glTF file, so that you can upload it to IconScout.

What is a glTF file?

A glTF (GL Transmission Format) is a file format for 3D scenes and models. It’s a text-based file that uses either the .gltf (JSON/ASCII) or .glb (binary file format) file extensions.

Why use glTF files?

What makes glTF files awesome? Well, they’re generally more lightweight than other 3D file types such as OBJ, so they load and perform more efficiently. It’s also an open standard format, which means that it’s compatible across many platforms – such as the web, mobile, as well as augmented reality (AR) and virtual reality (VR) apps. Thanks to this performance and widespread compatibility, its creators have called it the “JPEG of 3D”.

On IconScout, we’ve worked on bringing glTF support for our 3D illustrations. As users, this is exciting because you’ll now have more customization options for these assets. With our glTF viewer, you’ll be able to instantly update 3D illustrations with your custom color palettes, or experiment with preset palettes. You can also view these files in 360°, which means that you’ll be able to export them as images from any angle!

And as IconScout contributors, this means that the 3D assets you create will be able to reach a lot more users – and a lot more downloads. Any user would be able to customize your assets to make them fit their brand or design aesthetic, without extra work on your end.

Of course, this means that you’ll have to prepare your 3D assets as glTF files, which brings us to our next section.

How to export glTF files from Blender

So how do you export your existing 3D assets as glTF files? Here’s how with Blender.

1. Blender setup

If you don’t already have Blender installed, download the latest version of Blender.

By default, Blender 2.8 and higher supports glTF imports and exports. But just in case, let’s make sure it’s enabled in Blender.

  • Run the Blender application.
  • Go to Edit > Preferences > Add-ons
  • Search for ‘glTF’
  • Enable Import-Export glTF 2.0 format
Enable Import-Export glTF 2.0 format
Enable Import-Export glTF 2.0 format

2. Import your 3D assets

Now that you have Blender set up, you can open the 3D assets you want to export as a glTF file. There are three ways to do this:

  • Method 1 - Click or drag your BLEND file into Blender.
  • Method 2 - Go to File > Open > Browse and select the BLEND file > Open
  • Method 3 - If you importing different file formats, like OBJ or FBX, go to File > Import > Select a 3D format > Browse and select the file > Import

3. Get your 3D assets ready for export

Not everything in your scene may be supported by the glTF format, so we’ll need to make them glTF-friendly.

a) Convert curves or other non-mesh objects to mesh

The glTF format doesn’t support curves and other non-mesh objects – like metaballs, surfaces, or text objects – so we need to convert them into meshes before exporting. Here’s how to do so:

  • Select the curve, metaball, surface or text object.
  • Right click > Convert To > Mesh.

b) Hide unwanted elements

Hide any elements you don’t want appearing in your glTF file. For example, check your Outliner and hide any operational meshes such as Booleans – these meshes shouldn’t be visible in the export.

Hide any operational meshes such as Booleans
Hide any operational meshes such as Booleans

c) Check your Levels Viewport

If you’ve used a Subdivision modifier on your asset, you may need to adjust your Levels Viewport. This helps keeps your glTF file size small.

  • Open the Modifier Properties panel.
  • Look for the Subdivision modifier.
  • Adjust the Levels Viewport – we recommend keeping it around 1 to 3. A larger size will increase the glTF file size.

c) Use supported materials

The glTF format supports a metal/rough PBR (physically based rendering) workflow. Make sure that your asset or model uses supported materials. By default, Blender uses the Principled BSDF shader, which creates materials that are supported when exporting to glTF.

If you’re using a different shader, we’d suggest switching over to Principled BSDF. Go to the Material Properties panel, look at the Surface property and select Principled BSDF.

Select Principled BSDF
Select Principled BSDF

4. Export to glTF

We’re almost done. But before we export our glTF file, it’s helpful to be aware of the different file format variations. In Blender, you can export your scene or model as three types of glTF formats:

  • glTF Binary (.glb)
    • A single .glb file that contains all the mesh data, image textures, and other information.
  • glTF Separate (.gltf + .bin + textures)
    • A JSON text-based file that describes the overall structure
    • A .bin file that contains mesh and vector data
    • Optionally, .png or .jpg files that contain image textures
  • glTF Embedded (.gltf)
    • A JSON text-based file, containing all the mesh and image data encoded (using Base64).

glTF Binary (.glb)glTF Separate (.gltf + .bin + textures)glTF Embedded (.gltf)A single .glb file that contains all the mesh data, image textures, and other information.A JSON text-based file that describes the overall structure A .bin file that contains mesh and vector data Optionally, .png or .jpg files that contain image texturesA JSON text-based file, containing all the mesh and image data encoded (using Base64).

In this tutorial, we’ll use the glTF Binary (.glb) format, as it’s a single file that makes it easy to share across platforms. And in contrast to the glTF Embedded (.gltf) format, it’s generally smaller and more efficient.

To export your scene or model, just select the meshes you want to export. You don’t have to select any lighting elements if you are uploading your glTF file to IconScout, as IconScout’s glTF viewer will use its own lighting to illuminate the assets.  

Click and drag to select the meshes
Click and drag to select the meshes
  • Go to File > Export > ​​glTF 2.0 (.glb/.gltf).
  • Under Format, choose glTF Binary (.glb).
Under Format, choose glTF Binary (.glb)
Under Format, choose glTF Binary (.glb)
  • Under Include, tick Selected Objects.
Under Include, tick Selected Objects
Under Include, tick Selected Objects
  • Under Transform, tick +Y Up.
Under Transform, tick +Y Up.
Under Transform, tick +Y Up
  • Under Geometry, tick Apply Modifiers if you have used modifiers (like subdivision, bevel, mirror, etc.) on this asset. Tick Normals.
Tick Apply Modifiers and Normals
Tick Apply Modifiers and Normals
  • Under Materials, select Export.
  • Under Images, select Automatic.
Select Export and Automatic
Select Export and Automatic
  • Untick all the settings under Animation, as there is no animation data in this file.
  • Click Export glTF 2.0.

Using your glTF on IconScout

Finally, your glTF file is ready to preview and edit on IconScout. Open the glTF viewer to preview your file. Add custom palettes or experiment with preset palettes. You can also easily export PNG images from the viewer – you can use these images as thumbnails when you upload 3D assets.

We hope this tutorial has helped! To learn more about exporting your 3D files as glTF, you can also follow along with this video tutorial. And stay tuned for more glTF tutorials, as we’ll explore advanced techniques and customizations, as well as how to work with various file types.

Share on
Twitter Facebook Pinterest

Related Blogs

Access the world's largest Design Ecosystem: Assets, Integrations, and Motion.

Sales banner