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

Extension KHR_animation_pointer #592

Closed
ghost opened this issue Mar 29, 2023 · 9 comments · May be fixed by Unity-Technologies/com.unity.cloud.gltfast#7
Closed

Extension KHR_animation_pointer #592

ghost opened this issue Mar 29, 2023 · 9 comments · May be fixed by Unity-Technologies/com.unity.cloud.gltfast#7
Labels
enhancement New feature or request

Comments

@ghost
Copy link

ghost commented Mar 29, 2023

Add support for the upcoming extension KHR_animation_pointer.

@ghost ghost added the enhancement New feature or request label Mar 29, 2023
@mikeskydev
Copy link

mikeskydev commented Apr 5, 2023

Just to note, I have begun working on an import implementation of this and have successfully animated the material base color property with KHR_animation_pointer. Thanks @hybridherbst for the great test asset!

2023-04-05_15-27-31.mp4

@hybridherbst
Copy link
Contributor

Excellent! There's a few more sample assets, and you can always make your own by simply exporting with our UnityGltf fork at https://github.com/prefrontalcortex/unitygltf/tree/dev :)

Excited to see this come to glTFast!

@ptc-rgrasset
Copy link

@mikeskydev this is really fantastic, definitely really interested about this work !

Having at least base color + transparency support will definitely cover the core baseline of most of standard DCC (or CAD) tools. I I would love to see a PR when you are further along the line.

When you say import, I suppose you also mean runtime loading and not just editor import ?

@mikeskydev
Copy link

Thanks! I hope to bring a draft PR this week to see if I'm going along the right lines. I'll use this issue to document my progress before the PR:

So far I've implemented baseColorFactor which as you said covers a lot of cases. I've also started implementing KHR_texture_transform as required by my client, but as some initial logic in glTFast sets up texture transforms in C#, I may need to move the logic to the shaders instead otherwise the transforms are wrong.

Due to the way Unity's animation system works, I've also got a basic reverse material lookup just to get up to speed, but I want to improve that before a PR.

I've also observed that animating material color only works on Legacy animations, I'm not familiar enough with Mechanim to know if I'm doing something wrong or it (still) isn't supported there.

@mikeskydev
Copy link

2023-04-13_12-19-11.mp4

This should be all the animatable material properties that glTFast currently supports!

I'm going to do a bit more tidying up, then will submit a draft PR for some feedback.

@hybridherbst
Copy link
Contributor

Nice! It does seem like the core animation capabilities have been lost from your video, e.g. blend shape weights, transforms.

@mikeskydev
Copy link

Yep, I was focusing on material pointers first but will attach the node pointers to the old routes in due course!

@mikeskydev
Copy link

mikeskydev commented Apr 20, 2023

Fairly happy with this now, would love some feedback! Unity-Technologies#7

@atteneder
Copy link
Owner

Thanks a lot!
Looking at it in Unity-Technologies#7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
4 participants