-
Notifications
You must be signed in to change notification settings - Fork 313
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
Export only anim extension #691
Conversation
# Conflicts: # 3ds Max/Max2Babylon/Exporter/BabylonExporter.cs # 3ds Max/Max2Babylon/Forms/ExporterForm.Designer.cs
# Conflicts: # SharedProjects/Babylon2GLTF/GLTFExporter.cs
# Conflicts: # 3ds Max/Max2Babylon/Exporter/BabylonExporter.cs
# Conflicts: # 3ds Max/Max2Babylon/Exporter/BabylonExporter.cs # SharedProjects/Babylon2GLTF/GLTFExporter.cs
# Conflicts: # 3ds Max/Max2Babylon/Exporter/BabylonExporter.cs # SharedProjects/Babylon2GLTF/GLTFExporter.cs
add node to extension no matter animation state split node RetargetingNodeExtension and RetargetingAnimationExtension
I'll leave this open to @noalak, should we take this change, or go with your proposed change for the animation only export extension? |
Hi @elpie89, you guys made a really good job for the implementation. The UI is very clean and the split between geometry and animations is much welcomed. I have a question regarding the animation target ID though. Does the user has to manually setup the animation target ID to ensure uniqueness ? @Drigax
I naturally leant towards 3rd solution as it is the easiest solution to implement. But based on elpie's great work you may want to support the 2nd solution as it could have a use for a wide range of extensions and is, I think, a good contribution to the glTF format. |
Actually, it's also possible to create a UniqueName extension for the 3rd solution. To summarize, I think that for internal (Babylon) usages the 3rd solution is the simpliest. |
yes It is up to the user to insert an ID, and it is up to him to guarantee the uniqueness of this one in the object properties, there is already the possibility to add the ID I will take some time asap to write an actual GLTF extension documentation as requested by Kronos Group. I do not see a real complete solution for the ID uniqueness We can also probably end up with some tooling automation (like in unity humanoid system) to suggest/ auto-complete targets id |
I personally prefer the 2 solutions,.. as @noalak said, this way many 3rd party solutions can take advantage of this. |
I like the idea of a generic unique identifier as opposed to one specifically for animations. Some of my thoughts on this:
We should probably discuss this unique identifier topic (in the context of the animation retargeting extension) on the khronos glTF github, I doubt we are the first to raise the issue. I can create an issue later this week. Perhaps we can combine this with the extension proposal(s)? @elpie89 |
@noalak I would advocate for # 1. At the very least, I think the smoothest implementation would be where we should just worry about exporting a point cloud or animated scene as-is and keep our contract as simple as possible. Consuming engines need to be able to take this scene and map each node to the objects that they want to animate using the included tracks, which should be possible without any additional information, right? Can we consider our node ID in the gltf as a scene-unique ID? I'm currently unsure if we need to guarantee any uniqueness in our scene names at all, as the engine would already be responsible for importings the nodes that we describe in our animation-only gltf and uniquely identify them with their own schema on import. Similarly to our Unity Mechanim example, the end user is responsible for providing the gltfNode to engineNode mapping for animation retargeting, although in our Unity example, the engine explicitly forbids name clashing... I'd advocate for exporting the nodes in scene as named, as regular glTF nodes without any additional data and imposing as few restrictions and assumptions as possible. I do think we should get a better perspective on this from the larger glTF community. At the very least, if this is desperately needed, then it should be considered not officially supported in its current implementation. Pinging @bghgary as well (but he's on vacation until next week, so I wouldn't expect an immediate reply), we have discussed animation retargeting implementation in glTF before, but this would be a crucial detail for the schema. |
From a glTF perspective, I would be hesitant on forcing names to be unique to make an extension work. Putting that aside, we have our reasons for not using node names. I'll elaborate on our pipeline:
Mirroring the unity pipeline is problematic, because:
In short, for animation retargeting, we could use names, if we force them to be unique. But, since it makes name changes near impossible, and we use names for gameplay purposes, I think it is not a good solution for our pipeline. @elpie89 ? A compromise could be making the use of the unique ID optional. If engines use the names as a fallback if the unique ID is not present, this would allow for the lightweight approach you prefer, if an engine prefers it. This means both approaches would exist at the same time. I do agree it is good to get a perspective on this from the glTF community, so we'll do that. |
# Conflicts: # 3ds Max/Max2Babylon/Forms/ExporterForm.Designer.cs # 3ds Max/Max2Babylon/Forms/ExporterForm.cs
So I raised an issue on KhronosGroup GLTF repository...we should discuss of this directly there |
Cool, I'm going to close this PR due to checking in #702, but adding a toggle to support ASOBO_unique_id in the exporter would be a good solution, provided that it is not too difficult. |
so as discussed previously in #537 this is our idea for animation only export
I will write something about the specification on Monday morning.
In the meantime...you can play around with this.