Now we are going to link
the weight of each clip to the position of the eye_control_pupil
circle.
Right click on the eye_up clip in the mixer,
choose clip properties, lock the ppg that
opens up. Select the eye_control_pupil circle
and press control + Mkto open it's kinematics
ppg, lock it as well.
Right Click on the weight animation divot and choose link
with from the menu, now navigate through the scene
to the local pos y of the eye control
pupil curve as shown in fig5. This
creates a relationship between the weight and
the pos y that is driven by a fcurve. At
the moment the driving fcurve only has on key on it which
means the values are constant, we'll fix that now.
In the eye control pupil's kinematics ppg,
which you should still have open and locked, change the position
- y value to 2.5. Change the clip weight, in the
clip properties ppg, to 1. Right click on the weight animation
divot and choose Set Relative Values. You
can now translate the eye control pupil up
and down and the eye will rotate up and down! However the
relationship is not linear, which we want. To address this
click the animation divot of the clips weight property (which
will have changed to a new icon with an L on it to indicate
that it is being driven by a 'link with' expression).
This will open up an fcurve editor with our' link with' fcurve
already selected. Click the Linear Interpolation
button shown in fig.6 to 'straighten' the curve.
Ok, so far so good, we just need to replicate this process
on the other clip weights.
Right Click on the weight animation divot and
choose 'copy animation'.
Unlock the clip properties ppg and then select the eye_down,
eye_right and eye_left clips from the mixer. The
ppg should update with the properties for these clips.
Right click on the weight divot and choose
'paste animation'. This will paste a copy
of the 'link with' expression onto each of the clip weights,
however we need to change the fcurve for each to get the correct
results, at the moment they are all linked to the pos y value
of the pupil circle.
Select only the eye_down clip, the ppg should
refresh again. Left Click the animation divot to bring up
the fcurve editor. Select the second key on the curve and
change itsframe from 2.5 to -2.5.
This will make the eye_down weight equal
1 when the eye control pupil pos y value
is -2.5. Play with the eye control pupil to
see the results.
Now we need to set up the left and right clips. These are
a bit different as we have to change the link from the pos
y to the pos x.
Select the eye_right clip in the mixer,
again the ppg will update. Right click on the weight divot
and choose expression editor. An expression
editor opens up showing the expression for the link with.
change the expression from :
l_fcv( eye_control_pupil.kine.local.posy
)
to
l_fcv( eye_control_pupil.kine.local.posx
)
click apply in the expression editor to
apply the changes.
How easy was that?
now do the same for the eye_left clip.
Almost there, we just need to flip the fcurve for the weight
of the eye_right clip.
Select the eye_right clip, ppg will update.
Left click the weight divot, select the second key, change
it's frame to -2.5 as you did previously.
Whoooooo Hooooooo, that's it. If all went according to plan
and you followed my cryptic directions then you should now
be able to move the eye_control_pupil around
and the eye will follow. |