glTF Scripted Importer and materials & textures
Hi, we (Unity importers team) noticed that the glTF scripted importer generates external materials and textures. We deprecated this workflow in Unity 2017.3 as it can result in non-deterministic importers, which results in problems with the cache server as well as Collab and other VCSes.
The correct workflow now is to embed materials in the import prefab by adding them to the import context, and to provide a button in the importer to explicitly extract textures. Alternatively, textures can also be added directly to the import context. The downside of adding them to the context directly is that the user has no control over exactly how textures are imported (format? size? etc.), so we went with the former approach ("Extract Textures" button) in for our own ModelImporter.
We'd like to join the effort and make these changes ourselves via a pull request, but thought it would be a good idea to post here before we started in case there are use cases or constraints we're unaware of.
cheers, -Mark
Mark, I'd love to see this soon. (also, does this mean that Unity is looking to support glTF in the editor?)
Hey Mark,
Thanks for reaching out. This would be a great change :) Feel free to send out a PR.
-Blake
Great, will do!
does this mean that Unity is looking to support glTF in the editor?
Yes, we are! I'd like to turn glTF into a package. Our infrastructure isn't quite ready for external packages yet, but I'm hoping we can make this happen in early 2019.
Awesome, so then should I stop working on that Unity JSON utility serialization refactor I'm half way through? 😅
@StephenHodgson I'm curious how you are planning on implementing this refactor. We specifically chose Newtonsoft.JSON for the library in order to be able to have the serialization/deserialization not be Unity specific, and for performance reasons.
You should open a separate issue.
You mean this issue?
I'd really like to see a performance test with the results side by side.
Besides this repository has Unity in the name implying it's the consumer of anything associated with it, wouldn't it make sense to do the serialization specifically for Unity?
@mjmvisser, did you ever take a crack at this?
We wrote the original importer and contributed it here, and are looking at making similar changes to manually extract textures as well. Would love to sync up if there's been any efforts here.
I'd also like to know the status as well.
I've finished up my native json utility implementation and was looking at the asset importing as well. But I don't wanna have to do work if Unity is going to natively support importing gltf objects.
@mjmvisser any updates on this?
Please update to the latest version and open a new issue if the problem persists. Thanks!