For far too long I’ve been annoyed by the lack of glTF 2.0 support in Unity, so I decided to make a plugin on my own.
A few months of loose development later I’ve checked most of the things I wanted off the list.
GLTFUtility supports meshes with submeshes, up to 8 uv channels, vertex colors, normals, tangents, embedded textures, materials, rigs and animations. And it’s easy to set up. Just drop it anywhere in your project and you’re ready to go.
Currently only edit-time import is supported, but export and runtime capabilities are on the roadmap as well.
The key differences lie in their complexity and features. While UnityGLTF boasts more features, it seems like an extremely messy project, and having to compile a DLL for it to work makes it inaccessible to most of the people who actually need it.
GLTFUtility is built with simplicity as the main focus, uses no external libraries, and is easy to navigate for potential contributors. It’s plug and play.
How would one go about actually configuring a model in Unity using the GLTFUtility?|
What I mean is, setting up all the animation clips like I would with a .blend or .fbx, setting up colliders, changing the rig to humanoid etc. Also extracting the embedded materials out of the file into the project so I can change to a custom shader etc.
All I get is a model I can drag into the scene with no configuration options.
When will you support BlendShapes/vertex animation?
The UnityGLTF seems like a HUGE mess, with a lot of stuff that is completely useless for an average user that just wants to import a model into Unity and set it up, with a ton of weird server stuff that I have absolutely no use for.
Sorry for the lack of reply.
What you mentioned is on the roadmap, but this plugin is developed entirely out of personal interest, so there is no saying when certain features arrive.
Thanks, I’ll try it. So how do you use this in the Editor? I don’t see any new menu’s and the documentation is sparce.
The gltfObject.Load takes 2 arguments, not 1. Should this work?
Hmm, did you make a change? I just downloaded this a couple days ago, and GitHub says that last commit was 12 days ago. Unless I’m mistaken, I do have the latest version.
Hey could you try testing with the 2 attached GLTF files? Both of these are from Sketchfab (both are creative commons license, but I don’t have the authors handy to give proper credit)
Both of these I can open using the “Sketchfab for Unity” asset and they work fine. Both fail with errors when I use UniGLTF-1.28. I was curious to see if they worked with your asset.
I need runtime GLTF loading, and I can’t use “Sketchfab for Unity” because it seems coded so that when you load a GLTF file, it imports the file and creates a prefab. I’m pretty certain a prefab can only be created in the Editor, and not in a standalone application. But it’s also really slow because if the GLTF has 100 pieces within it (meshes or whatever) then Unity takes its sweet time doing the import for all of these.
So “Sketchfab for Unity” seems to lack a simple method that lets you load a GLTF and return a Unity Game Object. That’s what I need.
I’m not sure if UnityGLTF has this (the Khronos asset), but getting it working is a nightmare. As others have mentioned, it’s a mess! I spent a whole day messing with it.
Regarding UniGLTF-1.28, when it works, it works quite well, and I’m pleased with how quickly it can create a GameObject. The only problem is that, as I pointed out above, I see errors with some of the files I have tried. I wanted to try out your asset to see if it works better than UniGLTF
Also, can you explain how to use your asset in the Editor? I was expecting a new menu that could be used to import files, but I don’t see anything. thanks!
I made a few changes regarding runtime loading, yes. Loading only takes a single parameter now. If yours takes two parameters, you got the wrong version.
I can’t test your files till next week
In the editor, the asset should do what it does automatically. Put the gltf/glb files in your assets folder and it will be imported as if it were an fbx or obj. This works for all of the official example files. If it doesn’t work for yours, then I got some work to do
Great work on this so far! Is runtime import from a remote URL prioritized on your roadmap?
Our team is evaluating the various gltf runtime importers that are available right now that support animation. Our plan is to use the Sketchfab API to download models and then use GLTFUtility to import the gltf models.
Our team is working on a mobile AR app, and this is one of our most important features to implement. So if you’re already working on it, we would rather work with GLTFUtiltiy since it’s open-source and written well instead of the alternatives.
Remote import is definitely on the roadmap, but right now i’m working on switching the serialization out with Json.NET which will enable exports.
HOWEVER, if the sketchfab API allows .glb files, you could maybe feed that binary data directly into GLTFUtility without too much modification. Would this be an option for you?
Sketchfab only supports downloading models in the standard .gltf format in a .zip archive. It would be pretty awesome if there was also a .glb file for simple downloading and use at runtime, but that’s not something they plan on supporting.
.glb support is also important though! We could instead download the .gltf on our web server and convert it to .glb format there, and then download the .glb formatted file during mobile runtime. That would basically do the same thing.
So yeah, downloading and using a .glb would also be a good way to go. Is this something you’ll need to add to GLTFUtility or is it already possible?
As a side question, does GLTFUtility support animations for the .glb format?
It is not already possible, although it could probably be done with slight modifications. Loading .glb with raw data input will probably come before remote .gltf does.
And yeah, animations are supported for both formats already.