View Full Version : how to controll a blendshape with two translation

06 June 2010, 05:13 PM
hi everybody i have this little problem to fix , i created a left smile control the allow me to controll the mouth shape if i move translation z i have a flat smile if i translate X too i will raise up the smile , when the controller is at its max translation ( Z 4 X 4 ) i need a little corrective blendshape , but once i create it how can i controll the value 0-1 of the blnadshape?
i tried to thought about ad the two translate and use a value between 0-8 that is (4+4) to controll the blendshape but i'm not sure that it s working properly

06 June 2010, 07:41 PM
If I understand correctly what you are asking, couldn't you just use an expression with clamp?

correctiveBlendshape.weight = clamp (0, 1, ((controller.tx + - 7)));

The value of (controller.tx + -7) will only be between 1 and 0 if collectively they're both pushed over 3.5, and what the clamp will do for you is keep the corrective shape from paying any attention to its value unless it falls between 0 and 1. Maybe there is a better way to do it, but I think some variation of this might work..

06 June 2010, 06:58 AM
that s the solution i thought . adding and link the result into an attribute and use the attribute to controll byset drivenkey but, i dunno how accurate might be that result so i thought another solution make a scrtipt that take the lover translation between z and x and use that to controll the blendshape i still have to figure out well how make that script working tho

CGTalk Moderation
06 June 2010, 06:58 AM
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.