Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GLTF Export - Metadata support #79

Closed
dpasukhi opened this issue Sep 25, 2024 · 1 comment · Fixed by #87
Closed

GLTF Export - Metadata support #79

dpasukhi opened this issue Sep 25, 2024 · 1 comment · Fixed by #87
Assignees
Labels
1. Data Exchange Import/Export or iterating of the CAD data 2. Enhancement New feature or request
Milestone

Comments

@dpasukhi
Copy link
Member

dpasukhi commented Sep 25, 2024

Implementing metadata support for GLTF format extends the functionality.
New metadata needs to be presented as a array of "key-value" attributes.
For the GLTF format there are a few ways to store metadata.
The easiest way to store them in the "nodes" section with "extras" section.
Some details from the forum by gkv311 n: https://dev.opencascade.org/node/87550#comment-25554

For the moment, RWGltf_CafWriter will write "extras" within "asset" section of the file (e.g. as metadata for entire file) when 'file info' string-string map is passed to Perform() method.

For writing some metadata within node elements (if this is what you are talking about), the glTF writer has to be improved. Note that XCAF document stores such metadata in form of 'named data' attributes, so that glTF writer would better fetch information from there.

The way how to store metadata within glTF file is unclear, though. "extras" sections looks like the most simplest approach, but with unclear compatibility across readers and writers. There are also cumbersome extensions like KHR_xmp and its successor KHR_xmp_json_ld, which are rather more complex to implement.

File samples can be found by the next search request: https://github.com/search?q=path%3A*.gltf+extras&type=code&ref=advsearch

Some discussion:
KhronosGroup/glTF#1387

@dpasukhi dpasukhi added 2. Enhancement New feature or request 1. Data Exchange Import/Export or iterating of the CAD data labels Sep 25, 2024
@dpasukhi dpasukhi linked a pull request Sep 30, 2024 that will close this issue
dpasukhi pushed a commit that referenced this issue Sep 30, 2024
Add supporting of metadata key-value export into extras section of each node.
dpasukhi pushed a commit that referenced this issue Sep 30, 2024
Add supporting of metadata key-value export into extras section of each node.
@dpasukhi
Copy link
Member Author

dpasukhi commented Oct 7, 2024

Integrated by #87

@dpasukhi dpasukhi closed this as completed Oct 7, 2024
@dpasukhi dpasukhi pinned this issue Oct 13, 2024
@dpasukhi dpasukhi added this to the Release 7.9 milestone Dec 2, 2024
@dpasukhi dpasukhi moved this from Todo to Done in Maintenance Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. Data Exchange Import/Export or iterating of the CAD data 2. Enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants