In this guide, we will go over how to export a .glb from Blender.
The biggest thing to keep in mind is our material configuration, it is recommended you stay with the Principled BSDF material and only use maps that are in the core PBR format.
Please note any geometry issues present in blender will be exported, pay special attention to edge hardness.
Please Download This Link Below:
Quick Export settings
When exporting from Blender we recommend using the native glTF exporter.
Here are the recommended settings:
Format
- glTF Binary
Include
- Limit to: Selected Objects
Transform
- +Y Up
Geometry
- UVs
- Normals
- Materials
Note: files must remain under 2GB as this is the file size limit of GLBs.
Topology
Going through the optimization process your geometry will most likely be changed to reduce its size for performance, but it is still a good idea to follow proper geometry workflow whenever possible. For faces of geometry use either triangles (tris) or quadrangles (quads), as this will give better results when run through the optimizer. Also check your geometry to make sure all normals are facing the correct way, that smoothing groups are assigned appropriately and that you are not getting any visual errors that would hinder your model.
UVs
It is best practice to create UVs for your assets even if you plan on using a pre-made material due to many materials having texture maps to enhance the material effect. UVs should be located on the base channel as we currently support 1 UV channel.
Textures
Please ensure all textures are .PNGs
It is recommended your textures be a power of 2 (256×256, 1024×1024…etc).
Albedo/Diffuse
Metallic
Roughness
Ambient Occlusion
Normal
Materials
Texture Transforms
Blender supports materials with multiple texture transforms, AR for the web allows for one, please ensure that all textures within a material use the same texture transforms.
To add transforms to your textures you must add a “Mapping Coordinates” node and connect the UV pin to a “Mapping” node and set the type to “Texture”. These nodes can be found by hitting tab while in the material graph window and typing “Mapping” for the mapping node and “Texture Coordinates” for the texture coordinate node.
Normal map
It is recommended you add a normal map node to your normal map, this allows for minor depth edits to the normal map, as well as allowing you to set the space type. It is recommended to use Tangent space normals as these are easier to edit and are easier to compress.
Ambient Occlusion
In order to export ambient occlusion correctly, you will need to download the template file located at the top of the Resource page. This file contains a node called “glTF Settings”. Add this node to your material and connect your AO map to this node, on export your AO map will be exported with your asset.
Note: This will not display in the Blender Viewport.
Packed Textures
In order to separate a packed texture, you must create a “Separate RGB” node. This will allow you to plug in the RGB values individually into material channels.
If you are using transparency we recommend changing the blend mode to Alpha blend.
Supported image formats:
Transparent
png(with alpha “baked” into the diffuse), .tga(32bit)(alpha channel), .tiff(alpha channel)
Opaque Image Formats:
.png, .jpg,TIff, tga
For our Metallic and Roughness, we support texture data as well as inputting values into the material.
Model Location
After the material is set up, we need to check one final thing.
The location of our asset in relation to the scene origin (X: 0, Y: 0, Z: 0). It is recommended that you export your model at the scene origin and clear any transforms on your mesh components. This will ensure your asset imports into other programs at the center of the scene.
If your model isn’t at origin:
If you are using the standard blender hotkeys press shift+S and select Cursor to World Origin.
If you are using the industry Compatible hot key bindings press tab and type “cursor to world origin”.
This will place our 3d Cursor at the world origin now we can go into Object>Set Origin>Origin to 3D Cursor.
Now that the geometry origin is at the world origin we can go in Object>set origin> Geometry to Origin.
Now that our asset is at the world origin we should make sure we have zeroed out our mesh transform data to do this go to Object>Apply>All Transforms to Deltas.
Export
Select the assets you want to export.
From there we can go File>Export>GLB.
We recommend using the following settings:
Format
- glTF Binary
Include
- Limit to: Selected Objects
Transform
- +Y Up
Geometry
- UVs
- Normals
- Materials
Select “Export glTF 2.0”.
Note: files must remain under 2GB as this is the file size limit of GLBs.