-
Notifications
You must be signed in to change notification settings - Fork 18
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
Model Animation bug #47
Comments
Hi, @nuclearshadow. Thank you for the feedback and sorry for the delayed response. I fail to see how this bug could be on the python side of the code, but a little bit of investigation won't hurt. I imagine as a possibility that the gltf loader had some bugfix that is present in the zig binding binaries but not in the python ones. The python binding is basically glue code and type casting back and forth, so no transformation is done to the values between c and python. To see if this is the problem, you can do the same comparisson as above by running the "model_loading_gltf" example provided by raylib-py (and hopefully by the raylib zig binding). Also, it is good to check whether the zig binding uses in fact a more recent dll/so/dylib than the ones shipped with raylib-py. To run the python examples provided with raylib-py, you can either put the *.py file in the same directory of its corresponding *.c example and run from there, or you can pass the directory path of the C example as argument in the prompt. In these ways, the resources can be loaded correctly. In case the same bug is occurring with the raylib gltf animation example, the next step is probably to update the raylib-py package binaries and hope that this will fix the bug. |
I think this issue on the original raylib repo is relevant, which was closed not too long ago, as I see almost the same thing happening in the thread as what happened to me, where bones would be positioned at the origin instead of where they should be. It was something to do with bone hierarchy. Also the fact that the zig bindings I use are on the 5.1-dev version of raylib, so the fix is probably there also. As such I think eventually updating raylib binaries should fix the issue. |
Loading 3D skeletal animation or updating model with said animation doesn't seem to work properly. I have tried almost identical pieces of code for both python and the Zig binding for raylib. It works correctly for the zig version.
Here's the comparison:
Python
Screenshot
Code
Zig
Screenshot
Code
It shows as expected on the zig version but breaks in the python version.
Another thing is that python version seems to load 1 less frame of animation compared to zig version
Here are the log messages for animations loading:
Python
Zig
And from my testing with 2 different animations, this only occurred when I used an animation with duplicate or hold keyframes in animation (in blender, don't how gltf stores animation. The animation in the screenshot only has 1 keyframe for the pose at the very beginning and another duplicate keyframe in blender) but not for an animation where every keyframe is unique (again, in blender) for the animation I downloaded from mixamo. I don't know how helpful this bit of information is.
I think the combination of 1 less frame and duplicate keyframes appears to cause this.
The text was updated successfully, but these errors were encountered: