-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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] - Gltf animations #3751
Conversation
examples/3d/load_gltf_animation.rs
Outdated
|
||
// This animation driver is not made to work in the general case. It will work with only one | ||
// animation per scene, and will ignore the specified interpolation method to only do linear. | ||
fn gltf_animation_driver( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably worth pointing out here that this isn't completely implemented per the spec. It in fact only animates transforms for GLTF nodes and will not animated bones or morphs which are also apart of the spec. Bones are treated as nodes in GLTF as well. I don't see any changes to the GLTF loader to load the skin information. I think this is a great PR though and I don't think those things should hold back it! We should just make it clear what's not currently supported here. 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit of review. Not so thorough (I didn't look at the animation spec for glTF.)
668026e
to
9cf96f5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. This should allow easy conversion into variable-rate animation curves rather easily. Main things I'm a bit concerned with is the memory use of uncompressed values and the complexity of this initial example, but that can be addressed in a later PR.
Co-Authored-By: Robert Swain <[email protected]>
e8e05c4
to
4042240
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. I think its important to make it clear that the example is a "manual" implementation of an animation player and not a final bevy animation api, so I renamed it and added a doc comment explaining the situation.
bors r+ |
# Objective - Load informations for animations from GLTF - Make experimenting on animations easier # Non Objective - Implement a solutions for all animations in Bevy. This would need a discussion / RFC. The goal here is only to have the information available to try different APIs ## Solution - Load animations with a representation close to the GLTF spec - Add an example to display animations. There is an animation driver in the example, not in Bevy code, to show how it can be used. The example is cycling between examples from the official gltf sample ([AnimatedTriangle](https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/AnimatedTriangle), [BoxAnimated](https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/BoxAnimated)), and one from me with some cases not present in the official examples. https://user-images.githubusercontent.com/8672791/150696656-073403f0-d921-43b6-beaf-099c7aee16ed.mp4 Co-authored-by: Carter Anderson <[email protected]>
# Objective - Load informations for animations from GLTF - Make experimenting on animations easier # Non Objective - Implement a solutions for all animations in Bevy. This would need a discussion / RFC. The goal here is only to have the information available to try different APIs ## Solution - Load animations with a representation close to the GLTF spec - Add an example to display animations. There is an animation driver in the example, not in Bevy code, to show how it can be used. The example is cycling between examples from the official gltf sample ([AnimatedTriangle](https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/AnimatedTriangle), [BoxAnimated](https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/BoxAnimated)), and one from me with some cases not present in the official examples. https://user-images.githubusercontent.com/8672791/150696656-073403f0-d921-43b6-beaf-099c7aee16ed.mp4 Co-authored-by: Carter Anderson <[email protected]>
# Objective - Load informations for animations from GLTF - Make experimenting on animations easier # Non Objective - Implement a solutions for all animations in Bevy. This would need a discussion / RFC. The goal here is only to have the information available to try different APIs ## Solution - Load animations with a representation close to the GLTF spec - Add an example to display animations. There is an animation driver in the example, not in Bevy code, to show how it can be used. The example is cycling between examples from the official gltf sample ([AnimatedTriangle](https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/AnimatedTriangle), [BoxAnimated](https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/BoxAnimated)), and one from me with some cases not present in the official examples. https://user-images.githubusercontent.com/8672791/150696656-073403f0-d921-43b6-beaf-099c7aee16ed.mp4 Co-authored-by: Carter Anderson <[email protected]>
Objective
Non Objective
Solution
animated.mp4