-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[Merged by Bors] - expose extras from gltf nodes #2154
Conversation
Lazy questions:
|
Depending on this, we could always put this behind a feature flag (disabled by default) to avoid the extra allocations. 🤷 |
I don't know, I didn't saw yet in a model I used but it seems a nice place to put some metadata that I put in code until now
Yup, just checked with FlightHelmet, no extras added |
Just checked out a complicated gltf from my game High Hat and extras weren't defined. |
It looks like blender doesn't include extras by default. I think validating that other popular 3d packages dont include extras unless the user defines them is probably the "complete" solution here, but I understand that this hard to verify. Can we just "randomly" sample a few free gltf assets from some "model sharing" website and see if they include the field? |
I didn't find files with those in my random sample of files on my drive that I collected here and there (kenney's assets and a few other free downloads), and it seems only babylon.js supports this out of the box (but that's easy as json support is native in js...) On the other hand I don't think it add much code or complexity, but it does add an extra component with a string that the user will have to deserialize... not the nicest UX Also it's part of the spec: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#extras I think Maya can support extras if user defines custom attributes https://doc.babylonjs.com/extensions/Exporters/Maya_to_glTF#custom-attributes |
I would like to see this feature in bevy. I often find situations/projects where I want to be able to specify some metadata in a 3D package (Blender) and have it exported with the scene/model. GLTF extras is a solution to this problem. Some points:
|
I can confirm this could be very helpful. Currently working around the limitation with a trait that just pushes components on nodes with specific names. my skin hook impl |
Co-authored-by: Nathan Ward <[email protected]>
We've been steadily increasing the number of "per entity string allocations" when instancing GLTF scenes. I think we should prioritize "proper string cows" in the very near future to keep this behavior in check. |
bors r+ |
fixes #2153 expose the `extras` field value as a string
fixes bevyengine#2153 expose the `extras` field value as a string
fixes bevyengine#2153 expose the `extras` field value as a string
fixes #2153
expose the
extras
field value as a string