Transitioning to glTF 2.0
It’s been just over a year since the glTF™ 1.0 specification shipped, and this open standard format for real-time delivery of 3D assets has already been widely adopted by the industry. Now Khronos is finalizing glTF 2.0. Here we discuss the path that has lead us to glTF 2.0, what the new specification contains, and how your company can get involved to provide your feedback and take full advantage of this major glTF upgrade.
The Path to glTF 2.0
The primary goal of the glTF 1.0 specification was to enable 3D assets to be shipped to, and efficiently loaded by, WebGL 1.0 applications. And indeed, the specification has been widely adopted and successfully used by all the major WebGL applications and engines – so that goal has been successfully met.
In mid-2016, Khronos started a project to create a Validator for glTF 1.0 as a tool to enable tools and engines to check that a glTF file is well-formed. But then something interesting happened! The Validator, along with feedback from many users in the industry, highlighted several areas where the glTF specification could be improved, including tightening up corner cases and tuning the format for improved application performance.
At that point, and with the encouragement of the glTF community, the glTF working group took a fairly major set of decisions. Firstly, that we should move as quickly as possible to a glTF 2.0 specification that made breaking changes to glTF 1.0. Although not having complete backwards compatibility between glTF 1.0 and 2.0 will cause some upgrade work for tools and engines importing and exporting glTF, the overwhelming feedback from the industry was that we should capture the advantages of the streamlined specification as soon as possible. Better a small amount of pain now, rather than a lot of pain later – because the gain was worth it.
Hand-in-hand with the decision to define a glTF 2.0 as soon as possible, the glTF working group also decided to divert the development of the Validator to handle glTF 2.0 – to encourage the transition of the ecosystem to the new version of the specification ASAP.
The end result is that the glTF 2.0 specification is significantly easier to process than glTF 1.0 in several key areas, including the animation system. So upgrading to glTF 2.0 is relatively straightforward, and will actually save work as well as deliver better performance into the future.
So what is in glTF 2.0?
But glTF 2.0 is much more than a streamlining of glTF 1.0. The major functionality requests arriving from the developer community using glTF 1.0 were to: a) upgrade the quality of materials; while b) removing any dependency on the underlying rendering API. In glTF 1.0, a material is defined with a GLSL shader – which causes an issue when wanting to import a glTF model into a Direct3D, Vulkan or Metal application. Fortunately, there is a technology that can solve both these problems in one stroke – Physically Based Rendering (PBR). A PBR material is defined by simply sending parameters into a well-defined rendering model.
glTF 2.0 defines a simple to implement, but powerful, PBR model that provides high-quality materials - and yet is scalable to suit the capabilities of different classes of platform and device.
Note that GLSL shader materials are still supported as a glTF 2.0 extension.
The glTF 2.0 PBR model enables some pretty spectacular materials and scenes – for example this glTF 2.0 model has been imported and is running in the Laugh Engine:
Industry Already Moving to glTF 2.0
At Game Developers Conference in February 2017, the glTF 2.0 specification is nearing completion. And even though the specification is not quite finalized, many companies and developers are already beginning to switch to glTF 2.0 to reap the performance, portability and quality benefits. As we go to press, the BabylonJS, three.js, Cesium, xeogl and instant3Dhub engines and Sketchfab are all upgrading to support to glTF 2.0.
So – how can I get involved with glTF 2.0?
We are glad you asked! First, take a look at the work ongoing to finalize the glTF 2.0 specification. This is a developer release to get one last round of community feedback before finalizing the specification for ratification. Now is your chance to ensure the specification meets your needs by commenting on GitHub in the next few weeks!
If you have glTF 1.0 content, the gltf-pipeline tool will include a convertor from glTF 1.0 to glTF 2.0 models. You can use this in your workflow to support both glTF 1.0 and 2.0 models, or migrate your users completely to glTF 2.0. You can also use our glTF 2.0 sample models to build and test out PBR rendering capabilities in your engine.
If you have experience in building 3D tools or exporters, Khronos has just issued a Request for Quotations on a funded project to build on, and expand, the Blender glTF exporter so that it fully supports glTF 2.0. The resultant exporter code is to be contributed, royalty-free to the Blender open source project. Details on the project and how to bid are here.
Last but not least, please tell us what you are building with glTF by sending us a pull request on GitHub to add your project to our ecosystem tracker — and let us help promote your work. All the effort and care that gets poured into creating a standard such as glTF truly becomes worthwhile when you see the amazing things that you – the community – use it for.
Khronos® and Vulkan® are registered trademarks, and ANARI™, WebGL™, glTF™, NNEF™, OpenVX™, SPIR™, SPIR-V™, SYCL™ and 3D Commerce™ are trademarks of The Khronos Group Inc. OpenXR™ is a trademark owned by The Khronos Group Inc. and is registered as a trademark in China, the European Union, Japan and the United Kingdom. OpenCL™ is a trademark of Apple Inc. and OpenGL® is a registered trademark and the OpenGL ES™ and OpenGL SC™ logos are trademarks of Hewlett Packard Enterprise used under license by Khronos. All other product names, trademarks, and/or company names are used solely for identification and belong to their respective owners.