Home Website Youtube GitHub

Lips rig do not scale properly

Goodmorning.

I have a problem. When I scale the rig by the “world_ctl” with the values ​​less than 1, the lips rig do not scale correctly (see Attachment).
When I scale with the value over 1 - like 10 or 100 - everything is working properly.

Can someone help me solve the problem?

Alessandro_

Maybe this:

Good morning Mr. Lesage.

Is there a way to fix the problem directly on the rig, manually, with constraint or connection via Node Editor?
I’m not good with the code.

pm.parentConstraint(“headSquash_C0_0_jnt”, “lips_C_crvs”, mo = True) pm.scaleConstraint(“headSquash_C0_0_jnt”, “lips_C_crvs”, mo = True)

Should I use these lines of code?

How should I replace the joint headSquash?
Can you explain it better?

I apologize and thank you very much.

Thanks for the support.
Alessandro_

Parent constrain and scale constrain lips_C_crvs to whatever your head joint is.

Hi Mr. Lesage.

I tried with the scale constraints but the problem is not solved.
If it were a problem of scale constraints between “setup” \ “lips_C_crvs” and “neck_C0_head_jnt”, the rig would break even with scale values ​​greater than 1, but this does not happen.

Maybe you may want to know this:

The “mouth_C0_lipup_jnt” and “mouth_C0_liplow_jnt” scale correctly.
Do not scale correctly the controls inside “lips_R_corner_npo”, “lips_C_upper_npo”, “lips_L_corner_npo”, “lips_C_lower_npo” like “lips_R_corner_ctl”, “lips_R_upOuter_ctl” etc.

I try to add a scale contraint to this ctl (whith the head or world_ctl), but nothing changes.

From the deformations it produces, it seems almost a problem of double transforms…

Did I just have this problem?

Can I try sending you the rig?

Thanks,
Alessandro_

Sure, I can take a look. You can share it in a message if you don’t want to share it publicly.

Glorious!

Message sent. :sunny:

Thanks,
Alessandro

This is pure expeculation, but just in case. There is an option called “static rig parent” this should be a parent for elements that are not move, scaled or rotated. If you set an element that is moving or scaling as static parent, this may cause the issue

I hope this helps

3 Likes

@Alessandro_Melis Your eyeballs are also moving inwards when you scale, but I don’t know why. I can’t figure that one out! The eyeball joint does not move, so it doesn’t make sense.

For the mouth scaling, there are a few more steps to take. They all involve constraining some nodes to the head joint.

  1. There is a node “lips_C_rope”. Underneath that node, every single “upLipRope” and “upLipRopeUpv” needs to be scale constrained to the head joint.
  2. The 4 lips corner controls need to be parent and scale constrained to the head. Constrain their npo parent to the head joint.
    lips_R_corner_npo
    lips_C_upper_npo
    lips_L_corner_npo
    lips_C_lower_npo
  3. The lips_C_crvs group needs to be parent and scale constrained to the head, as previously mentioned.

Here is a Python script that will do that. Are you able to run Python scripts in the student version of Maya? I assume yes.

Open the script editor. Open a new tab for a Python script. Paste this code, and run it. You shouldn’t have to change anything, because I specified your head joint.

import pymel.core as pm

headJoint = pm.PyNode('neck_C0_head_jnt')

# Constrain ALL the lip rope nodes that are under "lips_C_rope" to the headJoint
if pm.objExists('lips_C_rope'):
    for each in pm.PyNode('lips_C_rope').getChildren(type='transform'):
        pm.scaleConstraint(headJoint, each, mo=True)

# Constrain the corner lip controls to the head control.
if pm.objExists('lips_R_corner_npo'):
    lipNpos = [
            'lips_R_corner_npo',
            'lips_C_upper_npo',
            'lips_L_corner_npo',
            'lips_C_lower_npo',
        ]
    for each in lipNpos:
        pm.scaleConstraint(headJoint, pm.PyNode(each), mo=True)

# Constrain lips_C_crvs to the headJoint
pm.parentConstraint(headJoint, 'lips_C_crvs', mo = True)
pm.scaleConstraint(headJoint, 'lips_C_crvs', mo = True) 

@Miquel Sometime in December, I’m going to look in the lips_rigger code and see if there needs to be an improvement or a bug filed. Maybe all this stuff should be constrained to one of these nodes, if it isn’t already. If you specify one of these nodes, maybe it already does this? I don’t know.
image

8 Likes

(Oh I missed your reply as I was typing.)

Alessandro, the eye offset is happening because you turned off inherit transform on the eye geometry AND you have transformations on the eye geo parent groups AND you have transformations on the eye joints after it has been skinned. Somehow that combination of 3 movements is causing the eyes to drift when you scale.

You can clean the eyes if you simply do this:

  1. Delete history on the eyes. This will freeze the rotation offset on the eyes.
  2. Skin them back to the joints.

You can leave the transforms on the locators above your eye geometry. Or you can freeze them too. Either way should work.

This community is fantastic.

Mr. Lesage, your code solved the problem. :star_struck:

Thanks also to Mr. Miquel: I would like to learn more about the “static rig parent” option on both the documentation and with some examples. :man_student:

Thank you all for your support.

Good weekend,
Alessandro_

Was having this exact same issue and your script worked like a charm, saved me a lot of trouble! Thank you!

1 Like

thank you chrislesage,You save my life