-
Notifications
You must be signed in to change notification settings - Fork 21
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
Implement extension KHR_animation_pointer #7
base: main
Are you sure you want to change the base?
Implement extension KHR_animation_pointer #7
Conversation
|
And merged! @atteneder if this is still something glTFast is interested in, should I look at refactoring the pointers system to be more generic and not specific to animation, now that Khronos plans to use them for the Object Model? https://github.com/KhronosGroup/glTF/blob/main/specification/2.0/ObjectModel.adoc |
Animation pointer has now been ratified 🎉 |
Thanks a lot for this PR and getting the work started. I agree, we need a non-animation-specific Object Model implementation. That's become even clearer after seeing KHR_interactivity getting to the public review stage using it as well. This involves quite some string operations (which is natural, given pointers are string). I'd like to carefully review minimizing memory garbage created before merging. The package still supports 2020 LTS. You've used range indexes instead of Substring. Unfortunately those don't work in 2020 LTS, so we either have to postpone it to the next release (that drops 2020 LTS) or change it to use Substrings. I noticed that the new AnimationData is used, even on non-animation-pointer glTFs. Again, I need to confirm that there are no (performance) downsides whatsoever. I've started to implement some of that feedback. I'll give an update next week. |
Thanks, appreciate the review.
Absolutely. is KHR_interactivity something you'd be looking to implement in the main package too?
Good point, it's not something I'm an expert at, hopefully it's not terrible.
Happy to leave that up to you! My target projects were 2021 so I didn't notice this.
Yep totally understand, my thought was there ideally shouldn't be two places that animation creation happens, so I chose to pipe "legacy" animation into a new general system. |
No immediate plan, but I'm keeping an eye on it.
Nah, I'm pretty nit-picky to be honest.
On it.
You might be right after all. I need to learn more about the tradeoffs first. |
Further observations/questionsIf animation channel targets are used multiple times (e.g. a camera, light or material is used on multiple nodes):
API challengeThe PR requires to add an This is obviously none of your fault, but we have to address this and find a solution before moving on. |
Implements KHR_animation_pointer, Closes atteneder#592.
2023-04-20_16-39-04.mp4
Main pointers:
Camera animations have been implemented with a helper GameObject due to the required recalculations needed from the raw animation values.
Extensions
In my original PR, I had implemented
KHR_texture_transform
, however I will submit this as an additional PR when suitable as it necessitates moving some code from material initialisation in C#, to the shaders. I have done this for the shadergraph shaders, but not the built in one. To save changing all shadergraphs, I packed the previous vec2rotation
property with both the new scalarrotation
and the boolflipY
that's required for KTX textures.I will also implement
KHR_lights_punctual
as a separate PR.This PR is sponsored by Envoke.