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

Include joint data in animation-only export #63

Open
blubs opened this issue Oct 18, 2023 · 1 comment
Open

Include joint data in animation-only export #63

blubs opened this issue Oct 18, 2023 · 1 comment

Comments

@blubs
Copy link

blubs commented Oct 18, 2023

I'm trying to accomplish the following setup:

  1. Have a handful of rigged mesh-only IQM models
  2. Have a handful of animation-only IQM models
  3. Be able to mix-and-match IQM meshes and IQM animations

As is, this works great if and only if the skeletons are identical between the mesh-only IQM models and the animation-only IQM models. In this case, the model and animation bone lists match exactly, and I can use the bone index to reference each bone's animation info.

However, I'd like to support the case where the skeletons don't match exactly. (Useful in the case where I want to use a base FPS arms rig for any number of weapons where each weapon can have any number of custom bones depending on weapon complexity). When the skeletons don't match exactly, I can no longer use bone indices to pull animation data for a bone, I'd instead need to match up each bone to its animation data by bone name.

Unfortunately, it seems like bone names (included in the "joint info" section of the IQM file) are only included in the IQM file when a mesh is defined. See here:

if self.meshes:

I'd like to remove this check so that joint data (bone names and rest orientations) are always included in the IQM file.

Is anybody aware of any issues with removing this check? Or is it just an optimization to not write redundant data?

@lsalzman
Copy link
Owner

If you want to make a checkbox in the exporter that can optionally enable this (I would want to avoid the joint information being exported by default), them I would be okay with such a patch.

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