IssueRaiser

Define a way to provide unique identifiers for glTF data (nodes/etc)

Continuing from the discussion here: https://github.com/KhronosGroup/glTF/issues/1051#issuecomment-1744560817 The glTF standard does not currently endorse any particular way to define unique identifiers. There are no UIDs, nothing beyond names is provided to identify glTF objects. This can make it tricky for applications to deterministically keep track of objects in glTF files. The problem is not isolated to game engines, it also affects glTFX (formerly glXF) files. The problem: * You import a glTF scene into a game engine with node "MyNode". * In-engine, you alter this node, such as by adding children, changing the materials, etc. * In your modeling application, you rename to "OtherNode", or reparent to "Parent/MyNode", and re-export a glTF file. * When the game engine imports this again, it will look for "MyNode" but not find it, so it will not be able to tell where to put the added children or custom materials, so they will be discarded, and they will have to be applied again. Some options for solutions: (EDIT: Removed number 2) 1. Recommend using node names as unique identifiers, and do not add a UID property. This is in line with what [glTFX](https://github.com/KhronosGroup/glTF-External-Reference) already does, it can reference nodes in a glTF scene by unique name. * Minor note: Godot already enforces unique node names, but in addition Godot also needs the path to match to be considered the same node, it doesn't follow a node's name around the tree. * Impl

Posted by aaronfranke on Oct 16, 2023, 6:20 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.2,000 issues0 comments

github (Software)

Define a way to provide unique identifiers for glTF data (nodes/etc)

aaronfrankeOct 16, 2023, 6:20 PM

Continuing from the discussion here: https://github.com/KhronosGroup/glTF/issues/1051#issuecomment-1744560817 The glTF standard does not currently endorse any particular way to define unique identifiers. There are no UIDs, nothing beyond names is provided to identify glTF objects. This can make it tricky for applications to deterministically keep track of objects in glTF files. The problem is not isolated to game engines, it also affects glTFX (formerly glXF) files. The problem: * You import a glTF scene into a game engine with node "MyNode". * In-engine, you alter this node, such as by adding children, changing the materials, etc. * In your modeling application, you rename to "OtherNode", or reparent to "Parent/MyNode", and re-export a glTF file. * When the game engine imports this again, it will look for "MyNode" but not find it, so it will not be able to tell where to put the added children or custom materials, so they will be discarded, and they will have to be applied again. Some options for solutions: (EDIT: Removed number 2) 1. Recommend using node names as unique identifiers, and do not add a UID property. This is in line with what [glTFX](https://github.com/KhronosGroup/glTF-External-Reference) already does, it can reference nodes in a glTF scene by unique name. * Minor note: Godot already enforces unique node names, but in addition Godot also needs the path to match to be considered the same node, it doesn't follow a node's name around the tree. * Impl

Comments (0)

No comments yet. Start the discussion.

Comment on this issue