Is it possible to add more Rigify bone chains to the metarig?

Issue #1846 resolved
Mickey Ho created an issue

There is an option to first create a metarig from the Daz rig before generating a Rigify rig. I tried to add a Spline Tentacle bone chain, which is new in Blender 4, to the metarig to rig the penis, but I couldn’t turn it into a Rigify rig using the “Rigify Metarig” option in the Daz Importer addon. I could generate a Rigify rig from the bones tab, but then I won’t have the face bones from the Daz rig in the final rig. I am just wondering if it’s possible to add more Rigify bone chains to the metarig?

Comments (12)

  1. Thomas Larsson repo owner

    Adding extra bones is possible; I tested with a character with futalicious and it was rigified ok with the convert to Rigify button. Although for some reason the futa bones were assigned to the Face bone collection. Create Metarig failed in Blender 4 with a lot of warnings about bone collections and edit mode. Will look into that.

    Adding entire bone chains is not something that I have tried, so it probably doesn’t work. I will have a look.

  2. Thomas Larsson repo owner

    Unfortunately, this isn’t possible, at least not without a major rewrite of the Rigify code. The reason is this: the Convert to Rigify tool is split into two parts:

    1. Create Metarig: This adds a metarig and changes its proportions to match the daz rig.
    2. Rigify Metarig: This rigifies the metarig and does some postprocessing.

    The problem is that extra bones that are not part of rigify, like the daz face and geograft bones, are added in the second step, as part of the postprocessing. Thus the extra bones are added directly from the original daz rig to the final rigify rig, and are never part of the metarig.

    I don’t use Rigify myself. The possibility to modify the intermediate metarig was requested by user Engetudouiti, and apparently it was enough for his purposes.

  3. Alessandro Padovani

    commit 774d9f5, blender 4.0.1

    I am not a rigify expert or use rigify myself, but seems to work fine here. What I did is to add a tentacle to the G8 left arm then rigify. Of course I had to assign automatic weights since the tentacle bones are not part of the original daz rig.

    steps:

    1. import G8
    2. create metarig
    3. modify the metarig as wished, in my case I added a tentacle instead of the left arm
    4. rigify metarig
    5. add automatic weights to the new bones in the DEF layer

  4. Thomas Larsson repo owner

    No, that is not what Mickey meant. The problem is that bones that were added to the original daz rig don’t appear in the metarig, and hence cannot be manipulated before rigification. Example:

    1. Import G8M with dicktator and merge rigs.
    2. Create metarig. It has no dicktator bones.
    3. Rigify metarig. Now the dicktator bones appear.

  5. Mickey Ho reporter

    @Thomas Larsson Actually what Alessandro did is pretty close to what I need. I just need to add Rigify bones for the penis while keeping everything else the same. However, I cannot reproduce the problem every time. I followed the exact same steps as Alessandro, and I got an error. There was no error message, only an empty error popup. But it was apparent that the generated rig was messed up, particularly on the face bones such as the gaze bones. And then I tried a G8M character, having added only a Rigify Spline Tentacle bone chain to it. This time I didn’t get any errors. So, I don’t know what’s going on.

  6. Alessandro Padovani

    I also deleted the left arm in the daz rig, since it had to be replaced by the tentacle in the metarig. I suppose this can be done with geografts too. No errors here.

  7. Jasper29

    @ Mickey Ho Sounds like you’re talking about feature sets which add controller bones and specail functionality when final rig is generated. Those work perfectly fine as Alessandro demonstrated, and I use them all the time and edit my metarigs. Because you mentioned adding rigify bones for the penis and saying that you tried to use a tentacle rig for it, I will assume you want a spline rig for the penis (correct me if I’m wrong). If that is the case, I have a potential easier solution for you, which is something I personally use when dealing with the penis. Mustard’s Tools GitHub - Mustard2/MustardTools: A set of tools for animators/riggers allows you to generate a spline rig for a bone chain in an already existing armature. There are many options too. It doesn’t matter if you’re using Dicktator, XY, NG8, or a custom made bone chain. Here is an example with Dicktator and G8M after Rigify generation:

    All you have to do is:

    Step1: Import character with diffeo (merge rigs if needed)

    Step2: Load morphs if needed and merge geografts (transfer shapekeys too)

    Step3: Create metarig (edit it with feature sets if needed)

    Step4: Generate Rigify rig

    Step5: Using Mustard’s Tools, Select desired bone chain (penis) in Pose Mode. (Whatever bone is last selected is the tip of the chain, so select the base of the shaft first, then select the tip of the penis last. Also there needs to be at least 4 bones in the chain for it to work).

    Step6: In the N panel for Mustard’s Tools, select desired number of IK controllers for the spline and amount of bendy bones per segment (if desired as well. Also note that the number of controllers should be at least 1 less than the number of bones in the chain. Example: If you have a 4 bone chain, then you can’t have more than 3 controllers). Generate spline when done.

    Step7: Select both the IK spline bone at the base of the chain and the DEF-spine bone right near it, go into edit mode and ctrl+p to parent with ‘keep offset’. Then after that just select every IK spline bone controller (001,002) generated individually and parent those to the base Ik spline bone (the one parented to DEF-spine) with a child of constraint (make sure you click ‘set inverse’ on every one though). Now you have a spline rig for the penis that works seamlessly with the main Rigify armature.

    @Thomas, P.S.:

    Not to add anymore to your work load, but I would just like to say that having a spline rig script like this rolled into Diffeo for reasons like this would be great, and could help with setting up DAZ characters with special functionality. The Mustard Tools script is very useful, however, It’s not updated much and I fear it might no longer work eventually if negected too long (so far it works great still). At least if something like this was in Diffeo, it could be updated more regularly. Just a small proposal if at all possible, maybe just a simpler version would be great too.

    @Alessandro, P.P.S.:

    Sorry about posting a small proposal here, it wasn’t my initial intention, however seeing that it is relevant to this thread, I figured I’d mention it here. If you want me to create a new post with the proposal, I will just let me know.

  8. Alessandro Padovani

    To clarify, I’m just helping Thomas with the tracker because he trusted me with this, there’s no rules apart trying to keep the tracker clean and useful. I mark a discussion as invalid if it’s a user error or not a bug or not concerning the addon itself.

    Thomas already added some tools in advanced rigging as ik goals and winders, where ik goals is similar to spline ik though more limited. Also the new mhx provides similar options, may be those could be extended to rigify. Personally I do my own rigs so I’m here just for help and because it is interesting to see how others work.

    https://bitbucket.org/Diffeomorphic/import_daz/wiki/Advanced/Rigging

  9. Log in to comment