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

[rmodels] LoadModelAnimationsGLTF() computes poses interpolating between the anim duration and fixed 60 fps (GLTF_ANIMDELAY) #4426

Open
raysan5 opened this issue Oct 24, 2024 · 2 comments
Labels
enhancement This is an improvement of some feature

Comments

@raysan5
Copy link
Owner

raysan5 commented Oct 24, 2024

It does not consider scenarios where animation is created at 24 fps or game does not run at 60 fps.

Model can already contain a fixed number of poses (keyframes) with a defined frame delay between each one (and also a expected interpolation between keyframes). That information is not considered at the moment.

@raysan5 raysan5 added the enhancement This is an improvement of some feature label Oct 26, 2024
@raysan5
Copy link
Owner Author

raysan5 commented Nov 3, 2024

Related to this feature, a future improvement could be using float values for frame request to get interpolated poses between key-frame poses:

void UpdateModelAnimation(Model model, ModelAnimation anim, float frame);

frame could be a value between 0.0f and 1.0f to get interpolation.

@Kirandeep-Singh-Khehra
Copy link
Contributor

Kirandeep-Singh-Khehra commented Dec 4, 2024

Hi @raysan5,
I've implemented a simple function to blend between two animations and an example using GPU skinning. Kirandeep-Singh-Khehra@8808a39

It helped me for smooth transitioning/interpolation between two animations(For ex: smoothly moves from walking to running) and blending(For ex: blending between move forward animation and move rightwards animation by a given factor to have all intermediate movement animation). I was planning to raise a PR for it. But you might be trying to add void UpdateModelAnimation(Model model, ModelAnimation anim, float frame); with frame as float instead of int.

Could you please share if usingfloat for frame is finalized or not. I would like to contribute on animation part.

Edit: Raised a PR here #4578

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is an improvement of some feature
Projects
None yet
Development

No branches or pull requests

3 participants
@raysan5 @Kirandeep-Singh-Khehra and others