Home Youtube GitHub

Eye rig- workflow


#1
  1. is ther a way to also import the expoirted .eyes format? also, how do you use it?
  2. after generating the eye rig, there is no going back with Ctrl Z, how can I delete it without destroying my mesh…
  3. is there a way to add the eye rig into my guide setup so every time I generate it anew it would also set up the eye rig as well?

#2

Hi @Amihi

  1. In these videos miquel shows hows to work on eye rigger & how to import the .eyes and .lips into your rig.
    https://youtu.be/TZ2obTOYvn4
  1. You can switch off auto topological skin in the eye rigger to stop it from getting it skinned. Also you can remove the skin weights of the eye joints and then delete them to stop getting your mesh from getting damaged.

Hope that helps
Thanks


#4
  1. hey, I’m sorry but I’m not that mutch of a rigger or a programmer. so I’m having a difficulty understanding the general idea of the process.
  2. as for section 2, i’ll check it out
    thanks

#5

I can understand. When I stated that was the situation for me as well. Try and replicate as much as you can. Then try it in different ways. You’ll start to get a basic idea of what’s going on. Then go ahead with the experimentation as much as you can and you’ll end up learning a lot.


#6

The way Shifter works is Guide -> Build -> Test -> Delete -> Build -> Test -> Delete -> Build

So yes, you should delete your eye rig and rebuild it.

You can rebuild the eyes and lips by importing your .lips and .eyes files using Python like this. You pretty much have to use Python.

Put these code snippets in one of your POST Python scripts when building the guide:

from mgear.maya import rigbits
import os
lipsConfigPath = os.path.abspath(os.path.join('YOUR PATH HERE'))
rigbits.lips_rigger.lipsFromfile(lipsConfigPath)
from mgear.maya import rigbits
import os
eyesConfigPath = os.path.abspath(os.path.join('YOUR PATH HERE'))
rigbits.eye_rigger.eyesFromfile(eyesConfigPath)

This is more advanced, but just to show you, this is an example of what part of my actual production code looks like. (The actual file is 493 lines long, setting up many more parts of the face.)

In the first few lines, I get the name of my character from the guide, and that name helps me find the path to my lips and eyes config files. I store the info in directories per character.

Example: P:\Rigging\rigging\data\characters\tom\configs\rightEye.eyes

import mgear.maya.shifter.customStep as cstp
from mgear.maya import rigbits
import os

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


    def run(self, stepDict):
        for side in 'LR':
            self.mgear_eye_controls(side, self.charName)

###
###
###

def mgear_eye_controls(self, side, character):
        postpath = os.path.abspath(os.path.dirname(__file__))
        basepath = os.path.abspath(os.path.join(postpath, '../../../..'))
        
        ###. Run the eye autorigger json config
        # Example ..\data\characters\tom\configs\leftEyes.eyes
        if side == 'L':
            configFile = 'leftEye.eyes'
        if side == 'R':
            configFile = 'rightEye.eyes'
        eyesConfigPath = os.path.abspath(os.path.join(basepath, 'data', 'characters', character, 'configs', configFile))
        
        # Only rig the eyes if the config exists
        if os.path.isfile(eyesConfigPath):
            rigbits.eye_rigger.eyesFromfile(eyesConfigPath)
        else:
            return False

#7

@chrislesage Thanks for the explanation. This is great!