Home Website Youtube GitHub

Abnormal lips rotation with animation

Hi hi!
First of all, sorry if this topic has already been mentioned, but I didn’t find a solution to my problem on the forum yet.
So I rigged characters for my school short movie, and my animators noticed a weird behaviour a few days ago (on two different characters): it seems that when they animate the face, some of the lips controllers ‘flip’ and the mouth twists in an awful way. However, when they put their controllers back to 0, these behave normally again… until it happens again later (always at the same spot). Any idea what could cause that?
I’ll share a folder with my scene so you guys can take a look (the animation scene is called mGear_gabrielledaid_lipsIssue.ma, the rig in reference is RIG_ERICYOUNG.ma, which takes the scene Eric.ma in reference).
I am still learning, sorry in advance if I did something obviously wrong!!
Cheers. :slight_smile:
https://drive.google.com/drive/folders/1vbsF6_Z1ZUQAftRFMU7Iihu_umy7X4Bs?usp=sharing

1 Like

Hi! Each of the lips has a parentConstraint with 2 targets.

Almost anytime that you have 2 or more targets, the constraint should be set to “No Flip” or “Shortest”, instead of the default “Average”.

If you change all of those parent constraints to “Shortest”, it should fix your flipping lips problem.

import pymel.core as pm

lipControls = pm.ls([
    'lips_R_upOuter_ctl',
    'lips_R_upInner_ctl',
    'lips_L_upInner_ctl',
    'lips_L_upOuter_ctl',
    'lips_R_lowOuter_ctl',
    'lips_R_lowInner_ctl',
    'lips_L_lowInner_ctl',
    'lips_L_lowOuter_ctl',
    'lips_C_upper_ctl',
    'lips_C_lower_ctl',
    'lips_L_corner_ctl',
    'lips_R_corner_ctl',
    ], type='transform')

for lipControl in lipControls:
    # find the parent's parentConstraint:
    oCons = list(set(lipControl.getParent().inputs(type='parentConstraint')))[0]
    # set the constraint to Shortest (2 is "Shortest". 0 is "No Flip")
    oCons.interpType.set(2)

(If that doesn’t fix the problem, it might not be the controls flipping. But some of the lip rigging components might have the same problem. Again just look for parentConstraints with more than 1 target.)

6 Likes

The script you wrote fixed most of the problem! I just had to dive into my outliner to make sure every lip parentConstraint was set to “Shortest”. Thank you so much for your time and the quick answer!!

Ah yes, I forgot the 4 main controls, and only included the 8 inners and outers. I edited the script above for anyone else who finds this thread.

Glad it worked!

3 Likes

Thank you, this script has been very helpful