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] GLB Animation plays incorrectly. #4327

Closed
4 tasks done
IoIxD opened this issue Sep 16, 2024 · 7 comments
Closed
4 tasks done

[rmodels] GLB Animation plays incorrectly. #4327

IoIxD opened this issue Sep 16, 2024 · 7 comments
Labels
hacktoberfest Hacktoberfest recommended issues help needed - please! I need help with this issue

Comments

@IoIxD
Copy link
Contributor

IoIxD commented Sep 16, 2024

  • I tested it on latest raylib version from master branch
  • I checked there is no similar issue already reported
  • I checked the documentation on the wiki
  • My code has no errors or misuse of raylib

Issue description

The animation from my GLB file plays with incorrect proportions, shown below. I made an MRE that almost exactly copy/pastes code from the example, and can reproduce the issue.
I asked about this in the Discord and somebody said that because I made this in Blender, I need to remove all modifiers. But that can't be right (or it is something that needs to be solved) because an armature modifier is required to make animations in Blender. Removing it before export removes animations.

Environment

OS: Fedora Linux 40 (Xfce) x86_64
Host: 20BX001AUS ThinkPad T450s
Kernel: 6.10.9-200.fc40.x86_64
CPU: Intel i5-5300U (4) @ 2.900GHz
GPU: Intel HD Graphics 5500
Memory: 11833MiB

Issue Screenshot

2024-09-13.19-51-45.mp4

Code Example

I have a minimal example of the code (+ the model and .blend file itself) here: https://gist.github.com/IoIxD/ee521a47fd1f2a9bb42ac1c78ef3da6a

@raysan5
Copy link
Owner

raysan5 commented Sep 17, 2024

@IoIxD Note glTF file format is quite complex with many configuration options and not all the options are supported by raylib. Feel free to review the code and send a PR with a fix.

@IoIxD
Copy link
Contributor Author

IoIxD commented Sep 17, 2024

What other formats does Raylib support thay support animation

@raysan5
Copy link
Owner

raysan5 commented Sep 17, 2024

@IoIxD m3d and iqm.

@IoIxD
Copy link
Contributor Author

IoIxD commented Sep 17, 2024

Yeah I say leave this open for anybody else - wants to take a crack at this but I'm just gonna use one of the formats you suggested.

Shame too, I liked glb for its integrated textures.

@raysan5
Copy link
Owner

raysan5 commented Sep 19, 2024

@IoIxD Ok, I'll leave it open for 3 months, if nobody is ready to work on it in that time this issue will be closed.

@raysan5 raysan5 added the help needed - please! I need help with this issue label Sep 19, 2024
@raysan5 raysan5 added the hacktoberfest Hacktoberfest recommended issues label Oct 4, 2024
@HarryDC
Copy link
Contributor

HarryDC commented Oct 4, 2024

Just some triage, could reproduce the issue with the model from the gist, i could not reproduce the issue with another model i had. Also oddly i can't seem to be able to reexport the paul model from blender with animations attached, but i don't know enough but animations in blender to know what the issue could be

@raysan5
Copy link
Owner

raysan5 commented Oct 12, 2024

@HarryDC Definitely it can be an issue with the model and how the animations are exported. I'm afraid I'm closing this issue as raylib can not support all possible glTF configurations, it's out of scope.

@raysan5 raysan5 closed this as completed Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Hacktoberfest recommended issues help needed - please! I need help with this issue
3 participants