Open slapin opened 6 years ago
I cannot keep it updated with Rigify, too much work for me now as I don't remember a thing about Rigify. Have you tried to poke around the code?
Well, I did not dig heavily, but it looks like structure of rig changed a bit.
The problem is I fail to understand how derigify code works. Also I want to have some custom bone filtering, which is why I'm interested too. Could you please explain how this code works? I think it could be generalized for some better bone processing. As currently it is not possible to produce something working for Urho3D out of rigify rig, which is sad as it is very nice for animation.
I think there should be some way to export all deform bones and bones having mesh parented (probably setting these as skinned), but need to properly build parent-child relationship table. I think this can be done in this way:
I think doing it this way allows exporting any complicated rigs, also allowing some helper bones (like for IK) still be exported.
I think the indication o broken Derigify is also this message I overlooked before:
These groups are not used for bone deforms: ORG-DEF-f_middle.03.L, ORG-DEF-temple.L, ORG-DEF-butt.L, ORG-DEF-lid.B.L.003, ORG-DEF-lip.B.R.001, ORG-DEF-thumb.01.R, ORG-DEF-lid.T.L.001, ORG-DEF-nose, ORG-DEF-nose.R, ORG-DEF-f_index.02.L, ORG-DEF-palm.04.L, ORG-DEF-shin.L.001, ORG-DEF-brow.B.R.003, ORG-DEF-palm.02.R, ORG-DEF-f_ring.03.L, ORG-DEF-spine.006, ORG-DEF-butt.L.001, ORG-DEF-ear.L.003, ORG-DEF-lip.T.L, ORG-DEF-jaw.R, ORG-DEF-toe.R
``
So it creates groups which do not correspond to any bones for some reason and this is why deformation
in engine is broken (no such groups exist in original mesh). But I wonder why this happens...
New Rigify uses Pitchipoy rig which contains face. Also other configurations are available (like 2-headed 3-armed creature)... For me, the problem is that there are 4 bones which are special associated with face - teeth.T, teeth.B, MCH-eye.L. MCH-eye.R. These bones control teeth and eyes and there is no DEF bones for them, they themself are deform or parented to. So additional step is needed which would include deform bones which are not DEF (or these bones should be handled in special way).
Jost thought that some generic bone filter would be nice... so I could name bone to be always included in export regardless of deform status. That would allow mount slots and hints. Also I think some silly LOD system could be implemented by bone name (i.e have several rig variants without having to model several skeletons by hand). That would allow batch magic to resolve huge set of problems...