UnityGLTF icon indicating copy to clipboard operation
UnityGLTF copied to clipboard

Null object ( empty Transform) not supported in GLTF

Open jeanfabre opened this issue 5 years ago • 1 comments

Hi,

I am not sure why, but it seems that the GLTF format doesn't accept/understand empty GameObjects ( or from other 3d software, any null objects, we tried with c4d as well, and the problem is the same).

Here's a screenshot of the Unity interface, I exported the Test GameObject, with inside an empty transform. The exported glb doesn't have that empty gameobject.

https://i.imgur.com/cFINLD8.png

Is it something that is per design, or not though out during development or is there some way to achieve this and I am missing something?

I think it's a critical feature if you want the GLTF standard to be widely adopted, this is a missing feature that will be problematic and that any other 3d format do support, especially for complex application that needs 3d content to be flexible and that defines more than the visuals itself, think of character rigs, where you want to have placeholders empty gameobject for hats, or guns, or watch on the wrists, anything that needs to let the code/developer find some placements for adding more visuals.

In our case, we are building a complex architecture with several gltb files, think about a meta structure of a building where you can reference each floors that are in turn defining more content like rooms and furnitures. it makes sense to have glbs for each of these models, so that it can be reused in many different places ( not just in the same building, but in different projects)

Thanks,

Jean

jeanfabre avatar Jun 11 '20 17:06 jeanfabre

Hi, Jean

As per glTF specs, nodes (an object of which the hierarchy is composed, pretty much like Unity's GameObjects) without meshes are not supported. So the workaround will be to add minimal invisible meshes to your GameObjects.

However, I strongly believe this feature is indeed critical. As far as I understand it is not a technical limitations but deliberate choice.

And there may be another workaround. One may put any data in extension property of any glTF object, but this is not an elegant solution. You will end up having, so to speak, two hierarchies. One for geometry and another for "transforms"

I think we should to reach out to glTF devs with this proposal.

florius0 avatar Apr 20 '22 13:04 florius0

Fixed in latest release

robertdorn83 avatar Feb 09 '24 08:02 robertdorn83