1
$\begingroup$

I want to have separate detachable models for each head on this body as if it were a hat so that I can swap between them and not have to need a completely new model and texture for each character (so they can be modular). So i have each head on a separate layer detached Head on separate layer and I've generated weights for the body and the head for the same armature but there is a distinct gap between the armature and the head gap that also opens when the head is tilted. tilted head

I could try making the neck larger so it overlaps into the body but that wouldn't look as if the head is actually attached to the body and there'll probably be clipping issues when moving the head anyways.

If there's a way to have two separate objects act as if they are attached in the same mesh without actually having them be the same object that would be great. Otherwise I'll probably just have to have multiple body models that are more or less the same for each head which would be redundant.

$\endgroup$
  • $\begingroup$ You'll probably have small gaps anyway due to calculation rounding even if weights at the junction are exactly the same. Though you should weight when the vertices are still merged in order to have the same weights. $\endgroup$ – lemon Oct 13 at 5:17
  • $\begingroup$ I've been thinking about a similar problem and how to radically expand modularity in my models; I had no success with maintaining multiple objects, unfortunately, mostly because Blender doesn't seem to have great tools for constraining arbitrary subsets of vertices in a mutli-object but precise way. Maybe it would be reasonable to join the objects, but use a mask modifier to control which head appears (or doesn't appear, more to the point)? $\endgroup$ – NeverConvex Nov 19 at 3:36
1
$\begingroup$

Per my comment above, I've been trying to think about how best to achieve the same thing: introducing radical modularity into my models. I tried a few ways of precisely linking subsets of vertices across multiple objects with Hooks, Constraints, Vertex Parenting, etc, and found them all to be insufficiently flexible, and generally just very clearly not designed to achieve the intended goal. I even invested considerable time taking a mesh with one shape (a MakeHuman human head) and tediously building a ShapeKey that could deform it into an entirely different shape (a lion head -- the one you see below in this answer); that actually works quite well in some ways (you won't get unexpected splits when fitting an Armature to it!), but it also is severely limited in other ways that I found unacceptable (building an incredibly complex ShapeKey that would take hours to re-build forces you to avoid adding new Loop Cuts and similar edits that can alter the topological assumptions the ShapeKey has made, for example).

I hadn't come up with a good solution yet, but reading your question got me thinking: why not drop the requirement that the two objects be separate, and use a Mask to control which head is visible? With this approach, in principle you should have full control using standard Armatures / Mesh Deforms as you'd normally like, and there should be no risk of meshes splitting in unexpected ways.

Here's a very crude first shot at this, which I think basically serves as a strong proof-of-concept that this can work...

First, I'll use this stylized female character I've been working on, and I'm going to set her up to switch between a lion(-lady?) & human-lady head:

enter image description here

Second, I have to join the two objects, of course. Here is what they look like in Rendered View (note that things will be rather ugly throughout this, as I'm not cleaning anything up, including making no attempt to make Materials consistent), where you can clearly see that she's got two heads:

enter image description here

Third, I'll add a Pitchipoy rig (from which I'll use a single bone as an example), make sure the two heads are both joined to the same edge loop, and start selecting the vertices I need to make four vertex groups (Lion Head, Lady Head, Lion, and Lady, where Lion is the Inverse-Select of Lady Head, and similarly Lady is the Inverse-Select of Lion Head):

enter image description here

Fourth, just to illustrate how this should work, I'll assign all the vertices in both Lion Head and Lady Head to spine.004 from the Pitchipoy model, to verify that there's no unexpected breaking of the meshes etc. Here, we see we can turn the Lion Head & Lady Heads simultaneously using the relevant bone in pose mode:

enter image description here

Fifth, I'll just check that it turns in the opposite direction, too. Nothing unexpected here:

enter image description here

Sixth and seventh, we'll now check that we can do similar rotations, but with our Mask modifier choosing whether to show Lion or Lady:

enter image description here

enter image description here

Lastly, here's just an illustration of what the Lion vertex group looks like, visually (and Lady is analogous, of course):

enter image description here

In short, I think this provides a workable flow for using standard tools (Armatures/Mesh Deform, notably) to deform a single mesh that has multiple heads (or other limbs).

However, a few caveats/issues I haven't explored or that need more attention:

  1. I may have been moving a bit too quickly (maybe I had one of the two heads hidden at the time of weighting), so I'll go back and doublecheck this and update my answer, but in my crude test automatic weight assignment for the Armature seemed to get quite confused and only to apply weights to one of the two heads at a time. If this is the case, it should be possible to work around it by fitting each model separately before combining the models and their vertex group weights, I think, but that would certainly be an unwelcome complication (EDIT: On further tests I am unable to replicate this problematic behavior; standard Armature parenting/automatic weighting seems to work just fine on the multi-headed mesh. I don't want to delete this bullet point just yet, though, as -- being unable to replicate it -- I do not yet understand why my original Armature-parenting failed.)
  2. In this test case, I was able to use Mask to select an entire character at once by just inverting the part of the model (whichever head) I did not want. This logic doesn't extend to the case where multiple limbs can be combined in modular fashion, though, or even just where there are more than two heads. I think a combination of Vertex Weight Edit/Vertex Weight Mix modifiers and more modular vertex groups (one on each torso, one on each head, etc) could overcome this (and, failing that, it could certainly be overcome with a custom Python script)
  3. Stuffing everything into a single object like this overcomes the issues you asked about, but severely limits the options Blender provides for organizing your model. You won't be able to move the Lion Head and Lady Head (or Lion / Lady, of course) into separate collections, since they're part of the same object, and if you pursue this far enough, the single model could become so complex that you (or your CPU/GPU, more to the point!) would never want to display all its vertices at once. You'll mostly be limited to Vertex Groups for documenting/organizing what would normally be treated as separate Objects/Collections, and limited to using tools like Mask to avoid displaying too much of the overall mesh data at once

A modular workflow like this stuffed all into one model can make for an enormously complicated single model, so I'm sure there's more to be discovered about when/where it has limitations, but from what I can tell this is a reasonably flexible starting point for achieving the desired effect without troublesome splitting of the modular sub-components of the overall object/character.

$\endgroup$
0
$\begingroup$

I have never done this personally so I cannot guarantee its effectiveness, but you might get something useful by:

  1. set up your models so that there's no gap before any parenting.
  2. create empties at all or most of the vertex locations that the heads and neck intersect.
  3. Parent these empties to the armature so that they move along with the head and neck
  4. set up a vertex hook on both child meshes to move the ripped vertices back into the correct positions, which should be where the empties now are. Fiddling with proportional falloffs and possibly also specific vertex groups for the hooks and such may be necessary here.
$\endgroup$
  • $\begingroup$ I tried applying a hook to a vertex group containing the single vertex to the empty object in the position I want the vertex to be pinned to and the vertex flies off into the distance instead of being pinned to the empty's position but i guess that could be manually adjusted. I then tried moving the armature around to see if the vertex will stay in place while the empty isn't moving and it doesn't work anyways. $\endgroup$ – DED May 2 at 1:56
  • $\begingroup$ I want to try removing the vertex from every single vertex group so that the empty is the only thing that determines the location of the vertex but i can only remove groups from selected vertices, there's no way to check what groups a vertex is in from what i can tell. Removing and placing every neck vertex after having the mesh weighted to the armature to ensure that they weren't included into a group before applying the hook modifier would be really tedious. $\endgroup$ – DED May 2 at 1:57
  • $\begingroup$ Alternatively if there was a way to select what vertices to apply the automatic weights to that would also work. I can segregate the vertecies i want to not have any groups applied to and merge it with the mesh after applying the weights so it is actually feasible if this works. (i.e. blender.stackexchange.com/questions/76951/… ) $\endgroup$ – DED May 2 at 2:28
  • $\begingroup$ Ok, removed the vertex from all vertex groups except the one that is relevant to the hook and... nothing, nada, the position of the empty didn't constrain it from moving around when the supporting mesh behind it moves. ¯|_(ツ)_/¯ $\endgroup$ – DED May 2 at 2:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.