mgsx-dev/glTF


glTF – Runtime 3D Asset Delivery

Download


Step 1. Add the JitPack repository to your build file

Add it in your root build.gradle at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url 'https://jitpack.io' }
		}
	}
	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Add it in your build.sbt at the end of resolvers:

 
    resolvers += "jitpack" at "https://jitpack.io"
        
    

Add it in your project.clj at the end of repositories:

 
    :repositories [["jitpack" "https://jitpack.io"]]
        
    

Step 2. Add the dependency

	dependencies {
		implementation 'com.github.mgsx-dev:gltf:'
	}
	<dependency>
	    <groupId>com.github.mgsx-dev</groupId>
	    <artifactId>gltf</artifactId>
	    <version></version>
	</dependency>

                            
    libraryDependencies += "com.github.mgsx-dev" % "gltf" % ""
        
        

                            
    :dependencies [[com.github.mgsx-dev/gltf ""]]
        
        

Readme


<p align="center"> <img src="specification/figures/gltf.png" /> </p>

Join the Slack group

glTF™ (GL Transmission Format) is a royalty-free specification for the efficient transmission and loading of 3D scenes and models by applications. glTF minimizes both the size of 3D assets, and the runtime processing needed to unpack and use those assets. glTF defines an extensible, common publishing format for 3D content tools and services that streamlines authoring workflows and enables interoperable use of content across the industry.

Specification

Please provide spec feedback and community updates by submitting issues. For quick questions, use the #gltf channel in the Khronos Group Slack.

Quickstart

Overview

<p align="center"> <a href="specification/2.0/figures/gltfOverview-2.0.0b.png"><img src="specification/2.0/figures/gltfOverview-2.0.0b-small.png" /></a> <sup>From <a href=https://github.com/javagl/gltfOverview/>github.com/javagl/gltfOverview/</a></sup><br> <a href=https://github.com/randall2835/gltfOverviewJapanese/releases/download/v0.1/gltfOverview2.0-Japanese.png>Japanese translation</a> by <a href=https://github.com/randall2835/gltfOverviewJapanese>Takuto Takahashi</a> </p>

For developers

For artists

Preview tools

Contents

glTF Tools

Converters, Importers, and Exporters

| Tool | Input | Output | Description | |------|-------|--------|-------------| | Khronos Group Blender Importer/Exporter | status | status | Official importer/exporter, included with Blender 2.80 and higher | | 3DS Max Exporter | — | status | Export glTF files using BabylonJS plugin for 3DS Max 2015 or later | | Maya Exporter | — | status | Export glTF files using BabylonJS plugin for Maya 2018 or later | | Unity Exporter (Sketchfab fork) | — | status | Unity editor wizard that exports to glTF Format | | Unity COLLADA & glTF Exporter Unity 5 & Unity 2017 | — | status | Commercial unity asset store editor extension to export COLLADA and glTF via collada2gltf | | Sketchup export and import | — | status | Separate extensions for export and import | | PBR extension for SketchUp | SKP | status | PBR Material Editor, glTF Exporter, PBR Viewport | | obj2gltf | OBJ | status | Command-line converter | | Kupoman blendergltf | — | status | glTF exporter for Blender aimed at streaming scenes to other applications | | ksons Blender Importer | status | — | Blender importer for glTF 2.0 (alpha) | | BlackThread.io converter | Multiple | status | Online drag and drop converter powered by three.js | | Assimp | Multiple | status | General-purpose online conversion pipeline | | PiXYZ Studio | Multiple | status | Interactively prepare & optimize any CAD data | | FBX2glTF (Facebook) | FBX | status | Command-line converter | | FBX2glTF (ClayGL) | FBX, COLLADA, OBJ | status | Python tool to convert models to glTF2.0 format, model is parsed by FBX SDK. | | glTF API | FBX, COLLADA, OBJ | status | Web API to convert OBJ, FBX and COLLADA files to glTF or GLB | | Simplygon Cloud | Multiple | status | Cloud based asset optimization pipeline | | Verge3D | — | status | glTF 2.0 exporters for Blender and 3ds Max | | COLLADA2GLTF | COLLADA | status | Official command-line converter, with updates for glTF 2.0 in progress | | Cesium drag-and-drop converter | OBJ, COLLADA | status | Online drag and drop converter | | Maya2glTF | — | status | Export glTF from Autodesk Maya | | batchgltf | COLLADA | status | Batch converter with GUI | | FBX-glTF (Cyrillef) | FBX | status | Plug-in and command-line converter | | jgltf-obj | OBJ | status | Java programmatic and command-line converters | | Docker collada2gltf | COLLADA | status | Docker container for Python web service, built on COLLADA2GLTF | | collada2gltf-web-service | COLLADA | status | Node.js web service, built on COLLADA2GLTF | | cqparts | STEP | status | Python CAD for programmers (import / export doc) (GLTFExporter) | | FME Desktop | Multiple | status | FME lets you move data between 400+ formats and applications using a drag-and-drop interface while preserving data quality throughout the conversion process. | | UModel (UE Viewer)| Unreal engine | status | UModel allows you to view static and animated mesh assets from Unreal engine games, and then export them into several formats including glTF 2.0 | | OPEN CASCADE CAD Assistant| Multiple | status | Freeware multi-platform 3D Viewer and converter for 3D/CAD models with glTF 2.0 export support | | Adobe Dimension| FBX, STL, SKP, OBJ | status | Share and Publish feature lets users export to glTF to view on the web. Prerelease build has explicit export option for glTF and GLB.| | RapidCompact| Multiple | status | Optimizes and converts 3D assets for efficient online presentation. |

Optimizers

| Tool | Status | Description | |------|--------|-------------| | gltf-import-export | status | NPM package to convert between glb and gltf files | | makeglb | status | Drag and drop browser tool to convert gltf to self contained binary glb | | gltf-toolkit | status | Collection of tools and libraries to modify and optimize glTF assets for Windows Mixed Reality home | | glTF Pipeline | status | Official Node.js command-line tool for optimizing glTF assets | | gltf2glb | status | Python tool to convert glTF to Binary glTF | | binary-gltf-utils | status | Node.js tool to convert glTF to Binary glTF |

Validators

| Tool | Status | Description | |------|--------|-------------| | glTF Validator | status | Official command-line and drag-and-drop tool to validate glTF assets against the specification | | glTF VSCode Extension | status | 3D previews, built-in official glTF Validator, conversion to/from GLB |

Viewers and Debugging

| Tool | Status | Description | |------|--------|-------------| | BabylonJS Sandbox | status | Drag-and-drop online viewer for model preview and debugging, using BabylonJS | | three.js glTF Viewer | status | Drag-and-drop viewer (web and desktop) for model preview and debugging, using three.js | | three.js Editor | status | Editor with drag-and-drop support | | Clay Viewer | status | Drag-and-drop glTF2.0 viewer with high quality rendering and PBR material editing. | | glTF Animation Visualizer | status | Frame-by-frame debugging for glTF animations. | | VirtualGIS Viewer | status | Cesium-based glTF viewer. | | GLTFQuickLook | status | macOS QuickLook plugin for glTF files | | glTF Viewer | status | Android and iOS apps for glTF 2.0 viewing and link sharing: supports embedded glTF 2.0 files and links | | DirectX glTF Viewer | status | DirectX11, C++ desktop app for loading and rendering glTF files | | glTFShowcase | status | Android and iOS app for viewing glTF 2.0 asset from local files (gltf/glb/zip): supports environment lighting change. | | Hilo3d glTF Viewer | status | Drag-and-drop glTF2.0 viewer for model preview, using Hilo3d | | MeshViewer | status | OBJ / glTF2 mesh viewer for Windows and macOS|

Applications

| Application | Status | Description | |-------------|--------|-------------| | Blender 2.80 | status | Khronos glTF importer/exporter ships with Blender 2.80 and higher | | Paint 3D by Microsoft | status | 3D creation tool | | Remix 3D by Microsoft | status | Share and print 3D creations | | Facebook | status | Use .glb files to create 3D Posts | | Sketchfab | status | Platform to publish, share & discover 3D online and in VR | | Wordpress (plugin) | status | Inline glTF renderer for WordPress | | Modo by Foundry | status | 3D modeling, texturing & rendering tools | | Substance Painter by Allegorithmic | status | 3D painting software with glTF 2.0 export | | Marmoset Toolbag | status | 3D real-time rendering, animation, and baking suite | | Aspose.3D | status | File Format APIs for creating, editing, and converting over 100 file formats | | 3D Slash | status | Web-based and app-based 3D modeling imitating a stonecutter | | Archilogic | status | Web-based 3D platform for architecture and interiors | | Plex.Earth | status | Connects AutoCAD with Google Earth and the Real World. | | VECTARY | status | Online 3D content creation tool | | Visual Studio Code | status | Preview, validate, inspect, and debug glTF files |

Loaders and Engines

WebGL Engines

To compare WebGL-based glTF loaders, see gltf-test.

| Engine | Status | Scope | Related | |--------|--------|-------|-------------| | three.js (loader) | status | All | <model-viewer/> component, drag-and-drop viewer | | BabylonJS (loader) | status | All | Viewer component| | Cesium (loader) | status | All | Drag-and-drop viewer, tutorial | | OSG.JS (loader) | status | All | | | Grimoire.js (loader) | status | Geometry and materials, partial animation | | | Hilo3d (loader) | status | All | Doc | | A-Frame (loader) | status | All | Doc | | xeogl (loader) | status | Geometry and materials | Tutorial | | ClayGL (loader) | status | All | Examples | | Verge3D (loader) | status | All | | | ReactVR | status | All | | | CZPG (loader) | status | All | Examples | | PEX (loader) | status | Geometry and materials| | | GLBoost (loader) | status | ? | Examples | | xml3d.js (loader) | status | Geometry and materials | | | X3DOM (loader) | status | Geometry and materials | | | RedGL | status | All | Examples |

WebGL Sample Code

| Sample | Status | Description | |--------|--------|-------------| | Sample glTF loader with WebGL PBR shader | status | Engine-agnostic reference implementation for PBR shading with WebGL in glTF 2.0 (source code) |

Game and Rendering Engines

| Tool | Status | Description | |------|--------|-------------| | UnityGLTF | status | Unity3D library for exporting, loading, parsing, and rendering glTF assets | | Unreal (forum / notes) | status | Unreal adds glTF import capability | | Godot Game Engine | status | Godot 3.0 fully supports glTF import | | jMonkeyEngine | status | jME 3.2 supports glTF 2.0 | | Ogre_glTF | status | glTF 2.0 loader plugin for Ogre v2-1 | | G3D Innovation Engine | status | glTF 2.0 import | | LÖVR | status | A framework for creating VR with Lua |

Embeddable Viewers

| Tool | Author | Type | Description | |------------------------------------------------------------------------------|-----------|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Babylon.js Viewer | BabylonJS | self-hosted | HTML web component for viewing self-hosted glTF models. | | <model-viewer> | Google | self-hosted | HTML web component for viewing self-hosted glTF models. | | Poly | Google | service | glTF models hosted on Poly may be embedded in an iframe on any site. | | Sketchfab | Sketchfab | service | glTF models hosted on Sketchfab may be embedded in an iframe on any site, using the embed models feature. |

Languages

JavaScript / Node.js

| Tool | Status | Description | |------|--------|-------------| | gltf-viewer | status | Web component to display glTF models on a website | | minimal-gltf-loader | status | A minimal, engine-agnostic JavaScript glTF Loader, with a raw WebGL 2 renderer example | | THREE.GLTFLoader | status | Loads glTF assets into a three.js scene. | | THREE.GLTFExporter | status | Exports three.js scenes to a glTF asset | | gltf-walker | status | Convenience library for processing glTF | | RedCube.js | status | glTF viewer without dependencies | | gltf-bounding-box | status | Computes the global bounding box of a gltf model |

C++

| Tool | Status | Description | |------|--------|-------------| | Tiny glTF loader | status | Header only C++ glTF parsing library, with Alembic→glTF and CyHair->glTF converters | | yocto-gltf | status | Single file, header only, C++ glTF loading/writing automatically generated from the spec | | glTF2-loader | status | C++14 glTF (2.0 only) parsing library, by Lugdunum3D | | gltfpp | status | glTF 2.0 loader for C++14 | | fx-gltf | status | A C++14/C++17 header-only library for simple, efficient, and robust serialization/deserialization of glTF 2.0 | | TGen | status | Simple C++ Tangent Generator | | Microsoft.glTF.CPP | status | A C++ library for serializing and deserializing gltf/glb files. | status | | | Qt 3D | status | Qt 3D provides functionality for near-realtime simulation systems | | Laugh Engine | status | Vulkan PBR and IBL renderer | | Lugdunum3D | status | A modern cross-platform 3D rendering engine built with Vulkan and modern C++14 | | UX3D Engine | status | Cross-platform multi-threaded Vulkan 3D Engine with glTF 2.0 import and export | | Cinder | status | Work-in-progress glTF importer | | nvpro-pipeline | status | Research rendering pipeline by NVIDIA for minimizing CPU cost | | AssetKit | ? | 3D asset importer/exporter/util library | | libgltf | status | glTF 2.0 parser for C++11 | | libgltf_ue4 | status | A third-party library for UE4.10+ to load glTF files | | glTF for UE4 | status | A plugin for UE4.10+ to import glTF files |

Objective-C

| Tool | Status | Description | |------|--------|-------------| | GLTFKit | status | An Objective-C glTF 2.0 loader and Metal-based renderer |

C#

| Tool | Status | Description | |------|--------|-------------| | C# glTF loader | status | C# reference loader for glTF | | Aspose.3D for .NET | status| Import, export, and convert glTF | | MixedRealityToolkit-Unity | status | A collection of scripts and components intended to accelerate development of applications targeting Microsoft HoloLens and Windows Mixed Reality headsets. |

C

| Tool | Status | Description | |------|--------|-------------| | AssetKit | status | 3D asset importer, exporter library. | | cgltf | status | Single-header C glTF loader. |

Go

| Tool | Status | Description | |------|--------|-------------| | gltf | status | go library for marshaling and unmarshaling glTF |

Rust

| Tool | Status | Description | |------|--------|-------------| | Loader | status | A crate for loading glTF 2.0 | | Viewer | status | glTF 2.0 Viewer written in Rust |

Haxe

| Tool | Status | Description | |------|--------|-------------| | haxe-gltf | status | A Haxe library for reading glTF |

Java

Ada

| Tool | Status | Description | |------|--------|-------------| | Orka | status | The OpenGL 4.5 Rendering Kernel in Ada |

TypeScript

| Tool | Status | Description | |------|--------|-------------| | gltf-typescript-generator | status | CLI to generate a TypeScript interface for glTF |

Swift

| Tool | Status | Description | |------|--------|-------------| | GLTFSceneKit | status | glTF loader for SceneKit |

Utilities

  • gltf-utilities - JavaScript utility library to help load glTF
  • wetzel - Generate Markdown documentation from JSON Schema
  • gltf-enum - Simple site to help work with all the different enums in glTF spec

Resources

  • glTF-Generator-Registry - An open registry of tools that create glTF assets, along with structured metadata such as links to documentation and bug trackers.

Formats Built on glTF

  • 3D Tiles - An open standard for streaming and rendering massive heterogenous 3D content.

Stack Overflow

Presentations and Articles

Intros

Tutorials

All Presentations and Articles


We believe the true usefulness of glTF goes beyond the spec itself; it is an ecosystem of tools, documentation, and extensions contributed by the community. You are encouraged to get involved!