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

Exporting .iqm file from a Blender armature with non-connected bones causes mangled animations #54

Open
AndreaJens opened this issue Oct 21, 2021 · 4 comments

Comments

@AndreaJens
Copy link

Affected version of the script: Blender exporter, both version 2.74 and 2.9.3.
Tested with: Blender 2.79, Blender 2.9.3 (same outcome); various other models with disconnected bones (same outcome)

Description:
I am using the following 3D model, with an armature rig, in Blender 2.9.3 and exporting it via the iqm script:
issue1

When I play any exported animation after importing the .iqm file in Raylib, the armature is completely mangled, as if each disconnected component was referring to a different origin:
issue2

As the raylib code seems to work with models that were originally built in the .iqm format, I assume it is an issue with the exporter, especially considering how this might be linked to this comment on Issue #41.

Any idea what about what the problem could be?

Link to the model:
LazorLoyra_293.zip

@lsalzman
Copy link
Owner

No idea offhand, but are all the bones properly parented to something that is ultimately parents up the chain to the root bone?

@AndreaJens
Copy link
Author

Hi, thanks for the response. Unfortunately, I am not really an expert on how Blender saves armatures "under the hood". In the attached model, there is one (disconnected) parent bone that acts as a root, while arms and legs are parented to some of the child bones with the "keep distance offset" control.
image
I hope this piece of information might be useful!

@lsalzman
Copy link
Owner

I am not sure what is going on really, but maybe explore if the "keep distance offset" thing is the problem?

@AndreaJens
Copy link
Author

AndreaJens commented Oct 24, 2021

Okay, I will check if a connected armature works until the end of next week and report on it👍 So far, I tested the export with two other armatures with disconnected sections and I have seen similar issues. It might be that:

  • either the exporter doesn't work with "unconnected" bones like those ones - which is a shame because all my models have them for practical animation purposes;
  • or the reader of Raylib doesn't parse the input correctly (but when I asked, I was said that Raylib has an IQM-standard compliant importer);
  • or the way I build armatures somehow doesn't like to be translated into IQM files.

If I find out that this is an armature type issue and it isn't supported, I will try some other export formats instead, thanks anyway!

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

No branches or pull requests

2 participants