05-26-2006, 06:11 PM
If I am understanding your correctly, what you are trying to achieve is not done by using set driven keys, but more easily with expressions to drive the shapes using that control.
I highly recommend reading Jason Osipa's Stop Staring book as it will tell you exactly how to do what I think you are trying to do.
The basic idea is you have four blend shapes and you want to control them with the "joystick" type control. Your blend shape goes from 0 to 1 so you can do this by writing an expression to turn on and off the shapes by the joystick position.
The easy way to get this is to go over to Jason's website: http://www.jasonosipa.com (http://www.jasonosipa.com/) and download his jsFacialWin.mel script which will actually generate the control and the connections you need to drive your shapes which is awesome.
But here is some techical stuff if you want to learn it yourself:
*Please forgive me Jason for borrowing your code, but here is the expression you need to drive 4 shapes on a normal joystick controller:
BLENDSHAPE.SHAPE1 = clamp(0,1,clamp(0,1,CONTROLNAME.translateX+1)*clamp(0,1,CONTROLNAME.translateY));
BLENDSHAPE.SHAPE2 = clamp(0,1,clamp(0,1,-CONTROLNAME.translateX+1)*clamp(0,1,CONTROLNAME.translateY));
BLENDSHAPE.SHAPE3 = clamp(0,1,clamp(0,1,CONTROLNAME.translateX+1) * -CONTROLNAME.translateY);
BLENDSHAPE.SHAPE4 = clamp(0,1,clamp(0,1,-CONTROLNAME.translateX+1) * -CONTROLNAME.translateY);
In the code you will have to change the CONTROLNAME to the name of the joystick name (the circle that you move) and the BLENDSHAPE.SHAPE# to the blendshape target influence.
I have attached a picture below of the joystick controller and how the joystick object needs to work by each corner reaching the translateX and Y value as in the picture:
05-26-2006, 06:13 PM
oops sorry I think I just read you found an answer... well for anyone else there you go!
05-26-2006, 06:13 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.