Website Youtube GitHub

Brow rigger script


#21

Thanks so much for the assistance! I’m an animator and not a TD so I need as much help as I can find with facial rigging.


#22

Hi @Krzym ,
The brow rigger looks great.
I tried applying it to a character I’m working on, but I’m getting an error:

Traceback (most recent call last):

File “C:\Users\tsahi\Documents\maya\mgear_3.2\scripts\mgear\custom\brow_rigger.py”, line 1417, in buildRig

browRig(*self.buildDict[“brows”])

File “C:\Users\tsahi\Documents\maya\mgear_3.2\scripts\mgear\custom\brow_rigger.py”, line 138, in browRig

c_Loop = [pm.PyNode(e) for e in pm.polySelect(geoTransform, edgeLoopPath=(l_inner.indices()[0], r_inner.indices()[0]), ass=True, ns=True)

TypeError: ‘NoneType’ object is not iterable

Attaching a screen shot.

What am I doing wrong?

Also, another question, can you provide a typical simple custom step post script for building the eye rigger from the json file?

Disclaimer… I don’t code. I did manage to set up import geo and import skin pack custom steps following instructions.

Thank you!
Tsahi


#23

Hi! Glad you like it, well there is a lot to improve and you just faced one more issue :wink: I think, that the script is not that smart (Symmetry mode => ON would look for edges on the same poly mesh), so if you have brows like these, you need to turn off symmetry and prepare separate configs for each eye (you could set up side manually).

Let me know if that’s working, here is script example:

import mgear.shifter.custom_step as cstp
import pymel.core as pm

from mgear.custom import brow_rigger2


class CustomShifterStep(cstp.customShifterMainStep):
    def __init__(self):
        self.name = "simpleFacial"
        self.charName = pm.PyNode('guide').rig_name.get()


    def run(self, stepDict):

        if self.charName == "MyCharRig":
            # facial_rigger.eye_rigger.rig_from_file(r"D:\Dropbox\data\facial\L_eyeSetup.eyes")
            # facial_rigger.eye_rigger.rig_from_file(r"D:\Dropbox\data\facial\R_eyeSetup.eyes")
            # facial_rigger.lips_rigger.rig_from_file(r"D:\Dropbox\data\facial\lipSetup.lips")
            brow_rigger2.browsFromfile(r"D:\Dropbox\data\facial\L_browSetup.brows")
            brow_rigger2.browsFromfile(r"D:\Dropbox\data\facial\R_browSetup.brows")
        return

#24

Hi,

Both brows are the same poly mesh, they’re just not connected with geometry as one shell.
Creating a separate brow for left and write worked. The only thing is that this way the brows aren’t connected through the middle like they are when created as symmetrical. I wonder if there’s a simple work around. Perhaps I’ll create a simple alternative brows mesh that is connected through the middle, just for rig creation, and then skin the real mesh to be used.

Thanks for the custom steps script. It doesn’t work for me so far. It doesn’t give any error either.
It actually says it succeeds, but non of the facial rig parts are created and the skin script skips the head because it looks for the missing facial joints.
Could it be something with the line: if self.charName == “MyCharRig”: ?

Thanks,
Tsahi


#25

Yes, you should create an alternative mesh that would be connected, that’s the way it’s designed. You could create separate modules or a single one, but the loop must be continuous.

Well, actually you could skip the whole if, but “MyCharRig” is the Rig Name from guide settings, so it won’t run until you put your rig settings.


#26

Hey,

The alternate mesh worked great. Also managed with the custom scripts, thanks to your reply in the pre-post scripts thread.

I encountered something that doesn’t seem right in the rig itself.
Built the rig with symmetry on.
On the left side brow_L_in_tangent_ctl moves together with brow_L_in_ctl.
But on the right side brow_R_in_tangent_ctl doesn’t move with brow_R_in_ctl.
See attached video…

brows in tangent ctl sides comparison


#27

Hmm, just try to break connections on “brow_R_in_tangent_npo”. My bad again, sorry it’s fixed already but will need some time to clean up a bit


#28

That worked. Thank you.


#29

Any idea why the joints are not staying parented?
image


#30

Any idea why the joints are not staying parented?

As usual, no one can help you if you don’t give any information. Was it working before, or did it always do this for you? Was it when you switched to Maya 2019? What version are you using?


#31

Maya 2019. The brow rigger script does this for me as soon as create. The controls also dont follow the head.


#32

LEt me troubleshoot it a bit and get back to you


#33

Yeah I’m not sure why it does this. Script editor shows this message after build:

Warning: Too many coincident knots. Maximum allowed is degree


#34

Warning: Too many coincident knots. Maximum allowed is degree

Don’t worry about that as much. This is one of the first steps when I create curve (which is later deleted anyway).
I’ve not switched yet to 2019, but as far as I can see there shouldn’t be any issue -it’s working for me.


#35

Maybe you can share a screenshot of the settings used to generate the eyebrows?
That gives us some more insight on what might go wrong :).


#36

NP. Everything works fine it’s just that the joints are pinned to the position where they are built.


#37

Could you share the scene with me? I think it’s the best way to check that


#38

#39

Hey mate :wink:
I’ve checked your file in both 2018 and 2019, and there is no issue with brow rigger - fortunately :wink:
I fact the rig is parented correctly to the brow controller, the thing is that your brow CTL needs to be parented to the head or where ever you like. See at the attached video:
VIDeo

Usually, I’m placing the brow pivot more inside of the head, makes easier to rotate the whole setup.
Also, remember that you should fix wires deformers and joint rope scale -> scripts to be found on the forum

Cheers


#40

Thanks for your assistance!