Attaching Eyebrows to Face

Most often, we have the eyebrows as a separate geometry. We might have done blendshapes to drive the skin around the eyebrow up/down/fwd/back etc. But how do we make sure that the eyebrow follows along with this deformation?

1) We can make a separate blendshape of the eyebrow and do a set driven of the facial blendshape with the eyebrow blendshape. But, to get the eyebrow to move exactly can still prove to be a stiff challenge.

2) Point on Poly constraint
Look up the maya Help to see what this does. This is my preferred method to make the eyebrows follow.

The short Explanation:
– I add three joints to the eyebrow corresponding to eyebrow tips and center of eyebrow.
– bind the eyebrow geo to these joints
– Do a point on poly constraint with the faces of the skin and these joints.

Thats it!!!

The Long Explanation:
– when you do a point on poly constraint, the joint is going to snap to the center of the face. Its orientation too is probably going to change. If your skin is bound, then this will probably flip your eyebrow to some weird location.
workaround???

– create a locator. Group it. Create 2 more copies of this group.
– Place your joints on the 3 ends of the eyebrow. Make sure though that there is no hierarchy in joints. These are just 3 independent joints not connected to each other.
– select a face on the faceGeo and then select locator1Grp and do a point on poly constraint. Now snap the locator to the joint holding V.
– Point and orient constraint the joint to the locator with offset ON.

The group I created allowed me to move the locator in its space while still being constrained to the face.

Now your eyebrow should follow all deformation.

A snapshot of the setup if you are having any trouble.

if you notice, the eyebrow on the right, after the deformation seems to have lost volume at the tip. This is because, I have not done any paint weights on it. We can also do corrective blendshapes to fix this.

In Ridiculous Detail:

Ok.. So, we know it works.. We should also know when it works, and when it wont work… That’s exactly what we will be discussing here.

You need to make sure you do the following:
1) Unwrap your model.
2) NOT move the UV texture around.

Only then will this technique work.
why?

I did a little test. I selected a face and then a locator and did the point on poly constraint.
Notice, that when you selected the face, it lists the number associated with the face as face[456] or something. So, I initially thought the locator will remember this face number and always attach itself to the surface normal of that face.
But then, what happens when you smooth the geometry? each face is being divided into 4 faces. So, our face[456] is no longer that anymore. So, shouldn’t the locator snap to whatever is face[456] now?
it doesn’t. Why???
The answer lies in the UV and a little digging in the script editor.

When you see the script that is executed after a point on poly constraint, you might see something to what I saw here:
select -r Face.f[572] ;
isolateSelect -loadSelected modelEditor2;
select -tgl locator1 ;
isolateSelect -loadSelected modelEditor2;
doCreatePointOnPolyConstraintArgList 1 { “0”,”0″,”0″,”1″,””,”1″ };
{string $constraint[]=`pointOnPolyConstraint -weight 1`; setAttr ($constraint[0]+”.FaceU0″) 0.477869; setAttr ($constraint[0]+”.FaceV0″) 0.802925;};

So, looking at the bold part of the script, you see that this locator is being given a specific value in U and V co-ordinates. When I selected the face and went into my UV editor, its location was 0.477869 on U axis and 0.802925 on the V axis. (looking this up is similar to looking into a world atlas)

Thats how this locator stays put even after we smooth it. Because, it reorients itself to the face that is going to lie on 0.477869×0.802925 in the UV axis.

How to test it further???
I often think the best test is to see if you can break it. If not, its good.
So, I selected all the UV in the UV editor and resized it. So now, we have different faces that will come under the co-ordinates of the locator. And presto! I could see the locator moving to different faces in the viewport.
So, if you ever decide to redo the UVs, you are going to have to redo this setup as well.

I did not try it on a model that was not unwrapped. But I am really curious to know what would happen. In an unwrapped model, many faces can overlap. So, this locator is purely driven by UandV values.. At that same point, there can be more than one face in the UV co-ordinate. Where then would this locator snap?
Something to try out on a Sunday.

Advertisements

3 Comments to “Attaching Eyebrows to Face”

  1. This was very helpful, thank you! 🙂

    P.S. My model uses two different materials (one for the skin and one for the clothes) and the skin UVs overlapped those of the clothes. When I first tried this, I tried constraining the locator to faces or vertices (those also work) from around the eye area, but the locator would stick itself to the shirt instead… I also tried with the follicles (which work in a similar way), but the follicle would also appear on definitely-not-the face-I-had-selected D: It only worked properly when the UVs were non-overlapping.

  2. Hey Sam, good to know that this technique helped you out. And thanks for letting me know what happens when there is overlapping UV

  3. Hey, thank you so much! this helped me a lot!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: