Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Deform bones and Deform bones only #28

Open
bartteunis opened this issue Dec 23, 2021 · 5 comments
Open

Deform bones and Deform bones only #28

bartteunis opened this issue Dec 23, 2021 · 5 comments
Assignees

Comments

@bartteunis
Copy link
Member

Blender bones have a property deform that determines if the bone deforms any vertices/geometry.
The SMF exporter currently doesn't do anything with that info though it should be straightforward and a fairly simple addition to set the weights to zero for those bones that have deform set to False.

Idea taken from the Collada exporter's Deform Bones Only as described under Armature Options.
Exporting only deform bones may be another interesting thing to add.

@bartteunis
Copy link
Member Author

See also the FBX exporter under Armatures. It seems to have the same export option.

@bartteunis
Copy link
Member Author

The glTF exporter has an export option called Export Deformation Bones Only under Animation. It doesn't seem to be documented (yet).

@bartteunis
Copy link
Member Author

To look into for this issue:

  • How does an export of only use_deform bones map to a valid SMF rig? (node numbering/indices, etc.)
  • Rigify: deform bones are on a single layer, but some of them have non-deform parent bones. How to handle this? How to get valid bone/node chains out of these setups?

@bartteunis bartteunis added this to the Transform hierarchies milestone Jan 1, 2023
@bartteunis
Copy link
Member Author

bartteunis commented Jan 3, 2023

@bartteunis
Copy link
Member Author

bartteunis commented Jan 8, 2023

After some first testing it turns out that the hierarchy for a more complex setup could either be:

  • "filtered", i.e. maintain the bone hierarchy where there are any links to deform bones (i.e. bones that have use_deform set to True). For e.g. the default Rigify setup this already reduces the number of bones from 222 to 56 (with 35 use_deform bones)
    This'd mean that parts of the bone hierarchy are still exported with it.
    The FBX exporter does this ("Only write deforming bones (and non-deforming ones when they have deforming children).")
  • "baked", i.e. "bake" the transforms of the upper parts of the bone hierarchy into the deform bones. Would give a minimum of bones to be exported as only those tagged with use_deform will be exported (35 for a default Rigify rig)
    This will require inserting and extensive use of SMF's detached nodes.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant