Allow drivers/constraints on bone rest pose
I am using bones to emulate facial muscles and I would like the
head
tail of each bone to automatically stay attached to an associated vertex, so that when I apply my topology for different characters the bone placement automatically updates with the relevant remolded vertex position.
Currently, a bone's tail and head position (as visible in Edit Mode) do not allow adding a Driver, and Bone Constraints are only available in Pose Mode. It would be helpful to my use case if unique Bone Constraints or Driver compatibility were exposed for bones in their rest pose / Edit Mode positions.
For reference, this first was a question I posed on StackExchange .
5 Comments
Hello; I didn't catch exactly the feature you're suggesting. Also, because I'm not sure how that would interact with all Rigging features.
What I think could be interesting for dicussion (which maybe relates to the topic), would be perhaps some sort of 'intermediate' State, between the Rest Position (Binding Posed State) and the Pose Position (Final Pose State); both Options present at the Skeleton Panel.
One problem is that on Edit Mode for the Armature Object, it works for most features as if we were already on the real Rest Position, even though we're on actual Pose Position; there's no in-between State (this perhaps is what you're asking for); however, for the Mesh Object with Armature Modifier, it can still have On Cage and Edit Options Enabled on Edit Mode, though not the Armature Object itself (because there's no intermediate State for it).
Conceptually, it would make sense to me that such intermediate State for the Armature Object could exist and help in certain Rigging cases; but technically, I'm not sure how that would work in Blender and for which goals exactly.
But, anyways, did you know a Bone can have a Copy Location Bone Constraint, Targeting a single Vertex's Vertex Group, and then that Shape Key Morphed Vertex can drag the Bone itself? It is a bit tedious to develop, and may not be applicable in many cases; but it is nonetheless possible. Of course, avoid make such Bone a Deform Bone of the same Mesh region that is being Morphed, as that would be redundant and potential cause critical type of Dependency Cycle/Loop. Yet, the possibility that this technique offers, is that it becomes possible to Deform other Meshes or Mesh regions, or Transform other Bones, dependent on the Vertices motions caused by their Shape Keys Morphs. Though, it's most certain I guess the Bones on Edit Mode wouldn't Transform, even if the Shape Key would still Morph the Mesh on Edit Mode; the Bones probably won't follow anyways because, naturally, the Bone Constraints are Disabled on Armature's Edit Mode.
Hi pxy-gnomes - Thank you greatly for your thorough comment, I will do my best to return an equally thorough reply:
Firstly I want to clarify that I misspoke - In my original post I had said "Head" but in fact meant "Tail". I have edited my post accordingly, and hopefully that will help clarify my suggestion.
At its core, the functionality I am interested in is the ability to have a bone's Tail be attached to a mesh's vertex/an object/etc in Edit Mode (but not constrained to that point in Pose Mode), so it dynamically updates its Rest Pose based on Edit Mode changes to the vertex/object it depends on (but that this attachment does not constrain non-rest poses).
The use-case I have would be for creating one basemesh with pre-rigged bones representing muscles in the face, to be applied to diversely stylized characters for real-time rendering in a game engine. This would involve editing the geometry of that basemesh to apply it to each stylized character wherein the pre-rigged "muscle" bones automatically adjust their Edit Mode Tail position / baseline Rest Pose to accomodate the drastically varying geometry across characters (but maintaining identical topology to the original basemesh). Then, an animation applied to one character should be just as easily applied to another drastically different character as their "muscle" bones are identical with respect to their topology. Otherwise, the current behaviour of Blender would be to manually adjust the "muscle" bones each time after conforming the basemesh to each new stylized character, which feels like something that could be automated.
I know that description has a lot going on within it, but perhaps I can say it one other way for clarity: I want to procedurally control the Edit Mode position / Rest Pose of individual bones, so that adjusting topological geometry within my object automatically changes the Rest Pose orientation of relevant bones (without adding additional constraints to non-rest poses).
Two features that feel obvious in my mind would be: (A) To allow for applying unique Bone Constraints in Edit Mode (which do not influence Bone Constraints in Pose Mode), so that users can procedurally define the Rest Pose of individual bones; and (B) To allow Drivers to be set up on the Edit Mode position data for bones (ie. click on a bone in Edit Mode and you can view/alter its Head XYZ, Tail XYZ, and Roll... It would be nice if we could right-click on these fields and select "Add Driver", as we can with so many other fields).
Regarding your suggestion, it appears that Copy Location moves the Head of the bone, but as mentioned at the start of this reply I actually intend to move the Tail with geometry... That's my bad for mixing the two up in my original post, so thank you for the suggestion.
Currently, a workaround I am exploring is to make a Linked Duplicate of my basemesh that does not have an Armature associated with it so it does not deform; then Hook an Empty to a vertex of that non-deforming Linked Duplicate, constraining the Empty to Damped Track its -Y axis to the relevant "muscle" Bone; and to add a Limit Rotation Bone Constraint to the Bone with Owner space set to Custom Space, and the Custom Space Object set to that Hooked Empty. This is incredibly convoluted, but it does ultimately get me to a point where moving that specific vertex of my basemesh subsequently moves the Empty, and then because the Bone's rotation is limited with respect to the Empty's coordinate system, it can use the Empty's positioning as its Pose Mode identity, and then have its rotation limited to the path of the muscle accordingly. Again, this is incredibly convoluted, and I would look forward to a more straightforward way of Hooking a Bone's Tail to a vertex in Edit Mode, without it constraining Pose Mode.
Sorry, I've just lost a big post I was writing... It might take more time rewrite the main ideas I had, but I'll try to resume at least some points.
First, thanks for the explanation; now I understand the proposition (I'd just suggest you to include a screenshot of the Muscle Rig 'stretching' case, as it would be clearer for that particular problematic, because of the spacial Orientation meaning; Muscle Rigs can be made in different ways, that's why it would be handy).
I've made a test with Stretch To Bone Constraint. Target single Vertex's Vertex Group; Target/Owner on World Space; the Muscle Bone (on Pose Mode) will Stretch its Tail only, to the Vertex Group wherever it goes. Make sure the Muscle Bone is Parented properly (e.g., Parented Offset to an Arm Bone), so it follows proper Orientation of the Limb. Can use Shape Key to dynamically change the Mesh, and hence the Vertex Positiong, which controls the Position of Tail of the Muscle Bone, but only on Pose Mode of course. Then, you need to use the Armature > Apply Selected as Rest Position (with Selected Bones) or, more dangerously, for all Bones: Apply Pose as Rest Position. Theoretically, if you had all Model shape types as Shape Keys in your main Mesh Object, you could 'switch' (thanks to the Shape Keys and the "Apply [...] as Rest Position" Operation(s), from Pose Mode, the Armature Rest Position anytime. I know there are some possible issues in this approach, but technically I believe they can be avoided. The most difficult parts, I think, are two: 1) How to get Shape Keys into the main Mesh Object; 2) How to "Apply [...] as Rest Position" Operation(s) 'at will' for, back and forth Repositioning of the Armature Bones' Rest Position, without disrupting the Rigged Model (because those changes are 'permanent', and there can only be 1 Rest Position (for both Armature & Mesh by the way) at the same time.
Now, for the whole discussion about a new feature, involving both Mesh & Armature Rest Positions variations on a same Rigged Model, I'll have to rewrite later. I had an idea such as 'Rest Positions Library' (separately for Mesh & Armature), that could contain even a Mix Factor (that perhaps would work, at least analogous, as the current Pose Library in that regard: meaning multiple Mixing combinations possible, not just 0.000-1.000 between always the same A and B elements, but between A and B, A and C, B and C, etc.). The Rest Positions could Mix Factor, could be Driven, but only on Pose Mode; yet, it would be still be manually changed on Edit Mode. So, that would solve your case. Personally, I could use this feature as a Corrective method for Organic Rigging, so to Mix between different radically different Mesh Rest Positions, so that the Skinning Algorithms (which currently depend on the 1 unique Mesh Rest Position) will have to Mix their final output dynamically, in order to find Deforms, thus plausibly solving horrid Artifacts --because the calculations would have to Mix between at least 2 Rest Positions (or Binding Pose States) of the Mesh, instead of having just 1 reference for it (and then things go wrong spontaneously on higher Deform Bones Rotations).
Hope this gives some insights. Thanks for the conversation!
Apologies on the delay! I was expecting to receive an email notification of a reply, but alas I only saw it when manually signing in...
Great suggestion to show images due to the varied nature of muscle rigs! My project is undergoing some major refactoring, so it might be a while before I have some useful images to share - but to any future readers: know that I intend to update this thread with such images when I do eventually have them!
And thank you for your idea regarding Stretch To and Apply as Rest Pose. I've been experimenting with similar workflows, and they all can "get there", but there's always a very disjointed workflow that feels like I'm fighting against Blender's intentions.
I think another factor here is that I come from the parametric CAD 3D modelling world, so my brain very much thinks in terms of parametrically defining and constraining the at-rest state of a system, and then mechanically animating that system using the parametrically defined rest pose as the starting state.
Cheers :)
No worries; it's not chat. And sorry, got a delay too.
Glad you found a working solution --or even more than one actually. But the request ideas are still relevant. In principle, I'll wait for your updates; if I get better ideas about what was discussed, maybe I can make a split request, and referring to this topic then.
Cheers!