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

Manual export of vertex weights without exporting skeleton data #58

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

z-adams
Copy link

@z-adams z-adams commented Aug 23, 2022

Unless I'm misunderstanding something about the exporter, the only way you can export vertex weights is by also exporting the skeleton. This makes it difficult to create modular assets such as clothing, backpacks, or other soft worn articles, since it would require a lot more legwork on the application's part to de-duplicate the rig and associate the items with whatever pose buffer is used to store the wearer's rig state.

This modification to the export script adds an additional checkbox "Vertex weights" which allows for explicit control over whether or not vertex weights are exported. When exporting a rig this should always be checked, but it can also be checked when exporting a rigged object that will later be slaved to the skeleton in the final application, without exporting the actual rig data. This is similar to exporting one IQM file containing multiple meshes which reference the same rig, but much more modular as it allows the resulting assets to exist in separate files without duplicate data. The exported vertex bone IDs will be the same as usual, only that the bones they reference don't exist within that same file. When the mesh is loaded by the application it will be up to the application to make sure that the object is associated with the correct armature object/pose buffer, rather than creating a new one.

This is just a suggestion, I'm not sure if this change is consistent with the IQM file spec or purpose of the format. If this seems like a reasonable idea, before it gets merged it might make sense to add a warning or error to ensure "Vertex weights" is checked when exporting the rig, since exporting a rigged object without vertex weights doesn't make much sense.

A new checkbox in the export settings allows explicit control over
whether vertex weights are exported, independent of whether skeletons
are being exported. This makes it possible to export multiple meshes
that are all influenced by the same skeleton without duplicating the
skeleton data into each of the files (for example, exporting articles of
clothing from a rigged model as standalone files without including the
rig in each one).
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.

1 participant