Unity glTFast package is now available

We’re excited to announce the release of the Unity glTFast (com.unity.cloud.gltfast) package, supporting the import and export of glTF™ 3D files, both at runtime and within the Editor.

Introduction

glTF, which stands for Graphics Library Transmission Format (or GL Transmission Format), is a standardized file format used to store and transfer 3D scenes and models. It’s like the JPEG of the 3D world, aiming to provide a universal and efficient way to share 3D content across different platforms and applications. glTF is gaining significant popularity as a 3D format, with its open-source nature and versatility contributing to its traction.

Getting started

Installation instructions for the package are included in the Unity glTFast package documentation.

Current state

The package in itself is not an innovation, but rather a further developed re-release of the original glTFast, an open source Unity package founded by Andreas Atteneder in 2018. Andreas joined Unity in 2020 and continues to drive glTFast’s development. While the packages are identical, here is what has changed:

What benefits do you get?

  • Official support by Unity.

  • Easy distribution via Unity Package Manager: Scoped registry is not needed anymore and it can easily be installed using the “Add package by name” and com.unity.cloud.gltfast.

  • Teamwork increases development velocity: Unity-internal collaboration removes the bottleneck of depending on one individual maintainer.

  • Proper DevOps for increased quality assurance: Making use of Unity’s internal tools and infrastructure allows us to practice state-of-the-art development processes like continuous integration, automated testing and release management.

What’s next

Alongside with Unity glTFast we’ve also released KTX for Unity, a package for loading KTX 2.0 textures, and we’re working on bringing a Unity package offering Google Draco (3D data compression) to you as well. These packages bring additional power-features to glTFast and just like glTFast those packages are re-releases of open source originals.

How do I report bugs?

Bug reports and feature requests can be submitted to the Unity glTFast GitHub repository.
We’ll start to consolidate open issues and PRs from the original repository soon.

How do I contribute to future development plans?

You can contribute to development plans by adding your request on GitHub - Unity-Technologies/com.unity.cloud.gltfast: Efficient glTF 3D import / export library for Unity. In order to get your work merged, you’ll have to accept the Contributors License Agreement.

Open Standards

Unity is committed to increasing its adoption of Open Standards to help deliver a common foundation for content creation, collaboration and interoperability.

Alongside the gLTF™ support announced today, Unity has recently released OpenUSD ( forum post ), three packages for supporting the import and export of USD scenes within the Unity Editor

We consider gLTF™ and OpenUSD as complementary technologies that help users to build ever more powerful workflows and content pipelines. With these releases, users now have the flexibility to choose the format that best suits their requirements, for example glTF™ for efficient runtime content delivery and OpenUSD for flexible, complex multi-layer content authoring.

For further details on our USD packages, please see our documentation:

Common Questions

Why the rename to “Unity glTFast”?
So that the officially supported package is distinguishable from the original.

Is there a public roadmap?
Not as of now, but we’re considering options to disclose our plans.

Is Unity glTFast still open-source?
Yes, the licensing did not change.

What’s the best practice when it comes to developing glTFast?
To make development easy and prevent regression issues, we’re using a set of tools, tests and test projects. For now those are not entirely available publically. We’re thinking about making those available to the general public along with documentation and will notify you once we have a plan.
However, those tools are not required at all, so don’t let that prevent you from development.

Can I transition from the original to Unity glTFast?
Yes, in fact that’s recommended. You’ll have to make some adjustments to your projects though, so please read the Upgrade Guide to learn what’s required.

Can I still use the original glTFast that’s distributed via OpenUPM?
Yes. Short-term, the original will receive updates from Unity glTFast and releases will be made to OpenUPM as usual. That might change in the future.

Can I still contribute to the original glTFast?
Please direct your contributions towards Unity glTFast from now on. While technically it’s still OK to make PRs on the original, responses and merging will be much more convenient and faster on Unity glTFast.

Can I still use the original glTFast via GIT?
Note: Unless you are developing the original glTFast, it’s recommended to install it from the OpenUPM scoped registry.
On the original GIT repository the main branch now also contains the Unity glTFast variant. To keep using the original version (with package identifier com.atteneder.gltfast), switch to/checkout the openupm branch.

Notices

“Battle Damaged Sci-fi Helmet” PBR by theblueturtle_, published under a Creative Commons Attribution-NonCommercial license

Khronos® is a registered trademark and glTF™ is a trademark of The Khronos Group Inc.

20 Likes

Great to hear this, expecting for quite a long time now, KHR 2.0 texture support :slight_smile:

2 Likes

Nice! I am wondering why it starts with “cloud” in the package name though – like if I’m looking at package names and I see “cloud” I would have never guessed it has to do with asset importing. Other formats, well, have “com.unity.formats” as the name (Alembic, USD, FBX), why not keep that consistent?

10 Likes

Will see if I’m right, but if I have to guess I would guess that the Cloud team made it, who makes that new cloud-based Asset Manager on the dashboard. Because we could ask for it for long years and they only develop it when they have opportunity sell yet another cloud-based service.

Awesome!

2 Likes

Is it just me or are installation instructions missing ?

edit : nevermind, found it

Why is it even a package? It should be in core unity’s supported file formats.

4 Likes

Sorry for not adding installation instructions. I’ll add them to the docs soon:

In your Unity project, go to Windows > Package Manager. On the status bar, select the Add (+) button. From the Add menu, select Add + package by name. Name and Version fields appear. In the Name field, enter com.unity.cloud.gltfast. Select Add. The Editor installs the latest available version of the package and any dependent packages.

3 Likes

This is great, already using a previous version.
But this KTX texture format also looks exciting - does this mean 1 format that can be converted quickly to any platform-specific compressed GPU format on download?

I’m trying to export multiple prefabs into separate gltf files.

Using Assets > Export glTF > glTF, I can export my selected prefab assets, but it saves it into ONE gltf with ALL the prefabs in it.

Is there a way to bulk-export multiple glTF files, one for each selected prefab?

Thanks :slight_smile:

@seth-unity I’ve been trying to get the word out to fellow devs and got positive response from them (e.g.: Jared Bienz on LinkedIn: Official - Unity glTFast package is now available | 13 comments). This really deserves a Unity Blog post.

1 Like

This is a great addition to Unity ! The import part is very excellent !

I have more problems with the export part in runtime. First problem is that we cannot export a previously imported model, we lose all the material properties.
My second concern is that it lacks skinning support for export. This is something that would be very useful for our project. I hope these 2 points can be resolved in the future.

1 Like

Exactly! To be precise, the KTX 2.0 file containing a Basis Universal super-compressed texture is transcoded into a supported GPU compressed format (e.g. ASTC, PVRTC, DXT) at run-time.
It’s not just threaded and fast (compared to decoding Jpeg/PNG), the resulting texture requires a lot less GPU memory. Really impressive tech!

3 Likes

This is really nice, thanks!

1 Like

There’s no UI option, but it’s possible to create a custom script for that. Take a look at the Export method that’s used by the menu entries. Instead of passing an array of (root) GameObjects, iterate over that array and call Export for each individual GameObject and you’re there.

Long term there’s the vision for an export dialog that offers more settings. Bulk export could be one of them.

Thanks for the feedback!

Nice, I was waiting for over three years, some feedbacks:

  1. there is no simple way to extract and make editable materials like other 3d models import settings, the only way I found was to do a copy and paste of the materials from the Project area and replace them manually (or using a script which searches the same material name)

  2. there is no option to set the default import scale like for other 3d models import settings so the only quick way is to drag into hierarchy, change the scale, create a prefab and use it

Thanks. I got the desired results by looping through the Export function :+1:

My next questions:

How can we get this to work for humanoid characters?

It seems like my exports of human characters don’t contain an armature when importing them into blender.

Also:

My textures seem to be converting from png to jpg. Is there any way to prevent this and keep them uncompressed as in the original texture?

Thanks for the help!

now that the other unitygltf package is updated, just adding here link to comparison:
https://github.com/KhronosGroup/UnityGLTF#unitygltf-and-gltfast

1 Like

Thanks for posting. Nice to see some alternatives.

Does anyone happen to know how to resolve the mesh separation when it has multiple materials? While I do prefer the Unity package, this is a significant issue, especially since the file will not contain unique names for those meshes. The Khronos package seems to handle it better by merging the meshes for you (I’ll probably have to end up doing this by hand), but I’m curious how others are overcoming it.

Is this package able to export baked lightmaps from Unity along with the lightmap UVmap that comes with it? Or is there any other way at all to export and re-use those baked maps somewhere else?