Skip to content

Conversation

@benjitrosch
Copy link
Contributor

@benjitrosch benjitrosch commented Apr 15, 2024

I noticed that the GLTF animation loading only supported linear interpolation, so by adding support for cgltf_interpolation_type_step and cgltf_interpolation_type_cubic_spline this should cover most cases.

This was tested using robot.gltf by importing it into Blender, removing some keyframes, using constant and bezier interpolation, and then rerunning the models_loading_gltf.exe example. Step is easy to recognize, and I think the spline looks right as well, but I would love someone with discerning eyes to tell me if it looks accurate.

Here's videos of the exact same animation timeline with different interpolation applied:

  • Step interpolation example:
2024-04-15.01-40-29.mp4
  • Bezier interpolation example:
2024-04-15.01-42-00.mp4
  • Linear example (to compare with the others):
2024-04-15.01-42-36.mp4

@raysan5 raysan5 merged commit 4e37c8e into raysan5:master Apr 15, 2024
@raysan5
Copy link
Owner

raysan5 commented Apr 15, 2024

@benjitrosch Nice improvement! Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants