Unity support for the glTF format by default (to replace Collada and FBX)

glTF or glb in his binary version is in his version 2.0 a new open source file format that allow you to export your game asset with his lods and animations like the FBX, but it has also the advantage of being open sourced so it can be easily implemented, it supports the Disney’s Principled PBR and it be packed with your textures and materials and will automatically append and plug your textures, so you will get the exact same result across all applications.

Here are the 3 versions that exist:
glb: the most interesting, this is the binary version, it is lightweight and directly readable by the GPU, it includes your PBR node materials, textures, LODs, animations
glTF embedded: includes everything but it is a text file
glTF + separated textures: the maps are exported separately but they are still appended automatically to your material(s)

Godot 3.0 uses it by default and explain why it should be the industry standard and the issues with FBX: Why we should all support glTF 2.0 as THE standard asset exchange format for game engines

The Khonos Group gives also informations about this file format: glTF Overview - The Khronos Group Inc

This file format is available on GitHub for Unity users: GitHub - KhronosGroup/UnityGLTF: Runtime glTF 2.0 Loader for Unity3D
But for Unity users it’s a bit complicated for an average user to compile it and can be unstable.

Since the bad news about the collaboration between the closed Autodesk FBX and Unity, Autodesk will be able to impose their own specifications, closed technologies in the game art workflow and even delay the compatibly with alternative file formats. This will still be undocumented and the sources closed for other 3D modeling software in order to make it discouraging to develop and continues to break (it’s the goal of Autodesk to sell more Maya LT). Also the license isn’t compatible with some Open Source projects.

We need an open format for game art, easy to integrate in a modeling, painting and game engine this has been asked for many years. Collada wasn’t built for that but now the Khronos Group has made a new format open and dedicated for PBR games.

14 Likes

Unity 2017.2 is already in release candidate phase and 2017.3 in beta. I would not expect support for such file format until 2018.x, if it’s popular enough by then.

1 Like

Why do people keep pointing towards this engine as if we need to pay attention to the decisions it made? Last I checked it was a no name game engine developed by a no name organization and used by no one of any real note.

6 Likes

We started to speak about Godot since the reveal of the version 3 in mid-august 2017.

I have noticed that Unity helped to develop the glTF format, so I have part of my answer: yes it will be added to Unity. I hope in the release following the 2017.2.

1 Like

Won’t happen. Unity 2017.3 is already in beta with no mention of it.

https://blogs.unity3d.com/2017/09/30/unity-2017-3-beta-is-out/
https://unity3d.com/unity/beta/unity2017.3.0b1
https://unity3d.com/unity/beta/unity2017.3.0b2
https://unity3d.com/unity/beta/unity2017.3.0b3

If it isn’t in the roadmap don’t expect it any time soon.

I like the idea of glTF, but it’s still early days. Many 3d modeling packages don’t even support it yet. It would be premature to replace FBX, without solid asset pipeline support. However, it would be great if more software did support it, so I do agree Unity should add this eventually (but certainly not as a replacement for FBX).

4 Likes

You mean , why they think it should be the industry standard.

While it is true that FBX is a bad format, last time I looked at gltf I was very unimpressed.
To put it bluntly, it was heavily tied to OpenGL, to the point where it used OpenGL enums and allowed embedding of glsl shaders.

This is not a good way to go about it.

Also, in this iteration:
https://github.com/KhronosGroup/glTF-Blender-Exporter/blob/master/docs/user.md
They introduced metallic shader support (good), but failed to provide support for blender’s principled BSDF (bad).

By the way, nothing stops you from adding custom importer for gltf or hiring someone to do that.

1 Like

If they want gltf to be a hit, I think they should give it a simpler name. I read it as gitf because of the mixed case, and it doesn’t roll off the tongue - FBX by comparison is a lot sexier I think and part of its marketing appeal. I’m guilty myself of using complicated names for my work (Nimian Legends : BrightRidge is a mouthful) so it’s just an observation.

4 Likes

While I think there exist already too many formats, I agree that I don’t want FBX to stay the defacto standard. A good truly open format would be much better.

Principled BSDF is still rather new, like available for less than 2 months in a stable release I think.

Make file formats great again!

1 Like

saw unity listed in this image, “publicly stated support” ?
https://twitter.com/sehurlburt/status/913975857844068355

also,
GitHub - KhronosGroup/UnityGLTF: Runtime glTF 2.0 Loader for Unity3D (runtime)
GitHub - alvani/Unity-glTF-Exporter: Unity editor wizard that exports to glTF Format (editor exporter)

so with the package manager and scripted importer, probably quite easy to do as a plugin soon…?

1 Like

It’s the next standard (and Blender will drop supporting FBX)

  • Better in size
  • Readable ( JSON based )
  • Support binary external files (GPU data is possible)
  • PBR ready…
  • Supported by Microsoft, Unity, Google, Adobe, NVidia etc …

You can have some easy to read info here :

2 Likes

OTOY are doing work with Unity relating to glTF in terms of streaming for their Light Field tech Link. When that happens I imagine glTF may be added to Unity, but that is speculation and it’s not exactly a direct correlation between the planned feature use and what is being discussed in the OP. This currently looks to be in dev as an ORBX to FBX conversion currently (Features - OctaneRender for Unity), but theoretically I would guess glTF could handle this.

We did add support for glTF 1.0 I/O in the latest ORBX spec (and also FBX to get bones/skinning). We’ll be looking at glTF 2.0 support, but glTF is not cinematic (can’t do sub-div) like Alembic or FBX, so it cannot be a full replacement for those formats in ORBX scene system.

3 Likes

Couldn’t import/export just be added as a plug-in? Seems like the easiest way to get it out, even if not included in the official Unity binaries. Then it could be loaded in the store.

I see 3 asset store assets (say that three times fast) that mention gltf, but they are all for pay.

== John ==

You can create meshes in scripts and save them as project assets. So import could be added as a plugin that opens an gltf file reads it and creates a mesh out of it. Export too.

The more difficult part would be properly integrating gltf so it works the way like current fbx importer does. This may be more difficult, but might be possible using the AssetPostProcessors/etc.

I’m using the glTF Unity3D Loader. I want to load some 3D Objects with glTF format in real time. With the glTF files they included in the examples, it works great. But when I try to load my 3D Object I’m getting this error:

Does anyone know how can I approach this?

Error:

Exception: Invalid array at: buffers
GLTF.Extensions.JsonReaderExtensions.ReadList[Buffer] (Newtonsoft.Json.JsonReader reader, System.Func`1 deserializerFunc) (at C:/Users/johnmce/Documents/GitHub/UnityGLTF/GLTFSerialization/GLTFSerialization/Extensions/GLTFJsonExtensions.cs:50)
GLTF.Schema.GLTFRoot.Deserialize (System.IO.TextReader textReader) (at C:/Users/johnmce/Documents/GitHub/UnityGLTF/GLTFSerialization/GLTFSerialization/Schema/GLTFRoot.cs:151)
GLTF.GLTFParser.ParseString (System.String gltfContent) (at C:/Users/johnmce/Documents/GitHub/UnityGLTF/GLTFSerialization/GLTFSerialization/GLTFParser.cs:123)
GLTF.GLTFParser.ParseJson (System.Byte[] gltfBinary) (at C:/Users/johnmce/Documents/GitHub/UnityGLTF/GLTFSerialization/GLTFSerialization/GLTFParser.cs:40)
UnityGLTF.GLTFSceneImporter+<Load>c__Iterator0.MoveNext () (at Assets/UnityGLTF/Scripts/GLTFSceneImporter.cs:124)
UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)

Any more news on this?

1 Like

We are also monitoring this, as the FBX situation is really terrible.

Exporting from 3D Studio Max, we can occasionally have two different results when importing it into either Blender or Unity.

Autodesk have abused their dominant market position for too long…

7 Likes

Why are you importing into blender from Max?
I’ve seen several posts from artists having issues with blend shape normals coming from Maya which sucks for those devs.
But since 2013 fbx has been consistently stable coming from Max.
I just want it updated to include joint angle deformers (joint angle constrained blends).

@OTOY can you go into a small amount of detail on what you mean by “can’t do sub-div” please?