Page MenuHome

GLTF export, then import back into Blender, fails (in a variety of ways based on settings)
Closed, ArchivedPublic

Description

System Information
Operating system: MacOS High Sierra 10.13.6 (17G5019)
Graphics card: Intel Iris Graphics 6100 (Macbook onboard)

Blender Versions / description of error
My game engine uses GLTFs. I contracted an artist to make a 3D model. They sent me a .gltf file.
In-game it looked correct and had all {F7727138}the textures and animations, but I wanted to double check something so I imported the .gltf back into Blender.

When I imported the GLTF made by Blender back into Blender I got a variety of errors: The file appears garbled or I get a box with what looks like a Python traceback. I saw this both with 2.8.0 and with a 2.8.1 nightly build.

Things I tried:

Exported from Blender 2.8 [by artist], imported into CUSTOM GAME ENGINE
Result: Everything looks right

Exported from Blender 2.8 [by artist], imported into v2.8.0 [my machine]
Result: Most of model missing, textures missing, animation missing, nothing present except bones and objects attached to skeletons (and these are untextured).

Exported from Blender 2.8 [my machine, default settings], imported into v2.8.0 [my machine]
Result: "'Node' attribute has no attribute 'blender_object'. See attached 2.8-2.8.png

Exported from Blender 2.8 [by artist], imported into 2.8.1 [my machine, build September 08, 23:31:34 - f3a4f12ac090]
Result: Entire model missing, only bones visible

Exported from Blender 2.8 [my machine, default settings], imported into 2.8.1 [my machine, build September 08, 23:31:34 - f3a4f12ac090]
Result: "'Node' attribute has no attribute 'blender_object'. See attached 2.8-2.9-1.png and 2.8-2.9-2.png.

Exported from Blender 2.8 [my machine, default settings, build September 08, 23:31:34 - f3a4f12ac090], imported into 2.8.1 [my machine, build September 08, 23:31:34 - f3a4f12ac090]
Result: "'NoneType' object has no attribute 'name''. See attached 2.9-2.9-1.png and 2.9-2.9-2.png.

What about the blend/gltf files?

I have a .blend file, and all three .glb files (exported by artist, exported by me 2.8, exported by me 2.8.1). However these are project IP so I would prefer not to upload them to an open server like this? Is there some way I can send the files directly to whoever is working on the bug?

Expected behavior
If I export a file from blender as .glb, then import it back into blender, it should look exactly the same. If there is a problem with a file the error should be clear and not a Python 'NoneType' error.

Details

Type
Bug

Event Timeline

Philipp Oeser (lichtwerk) triaged this task as Waiting for Developer to Reproduce priority.

@Julien DUROURE (julien): could you check on this?

Thanks, is there a nonpublic place I can send additional files?

Hello @Andi McClure (mcc111)

You can send me a link to download you blend file via email (contact<AROBASE><FIRSTNAME><NAME><DOTCOM>) or via twitter (@julienduroure) if you prefer

Thanks!

@Julien DUROURE (julien) I have emailed to that address an email containing one .blend, three .glb's, and two .JPG's. Let me know if there is any trouble with the files. Thank you!

Hello,

I received the file.
Discussion will continue on upstream repository: https://github.com/KhronosGroup/glTF-Blender-IO/issues/667

Your armature object has not default rotation / scale. It's always a bad idea in Blender
Seems applying rotation/scale before exporting solved (at least partially) the problem.

Thank you, it might be too late for this particular model but I will make that request of the artist next time I work with them.

An update: I passed your comments to the artist.
The artist followed your instructions and sent me new GLBs.
The new GLBs, I can import just fine in both Blender 2.8 and 2.8.1. The textures do not display when I import them but I think that is because I did not set the "shaders" up properly so I am not worried about it.
So the issue is fixed for me, with my GLB files.
However I think probably in your next release you should still try to fix https://github.com/KhronosGroup/glTF-Blender-IO/issues/349 because someone could easily create a blend file "without rotation/scale on the armature". The artist said the reason they did not apply rotation/scale is they started with the official Oculus assets of the Oculus Quest controller and those assets came that way. The Oculus assets probably have wide distribution by now.

Also I do not know whether the second and third issues I describe above (the stack traces) are fixed by the "armature" change because the GLBs exported by the artist I am working with never caused stack traces.

Thanks again

Julien DUROURE (julien) closed this task as Archived.Wed, Sep 11, 8:21 AM

Hello,

Closing this ticket as this is a duplicate of an issue already open in upstream repository.

During my tests (even with original .blend file), I didn't have any stacktraces