I´m currently encountering a "problem" on rigging a character with wire expression parameters. Here´s the situation:
I´m using Max 2011 as application and CAT as a rigging template. What I would like to achieve is a system of adjustment bones to finetune the character´s mesh deformation by help of wire expressions.
For simple joints (knee) this is no problem. I use an ExposeTm to read the local rotation from the CAT bone and then wire the data into the adjustment bones position and rotation (something like Euler_Z*9 for the adjustment bones x position). Knee bones rotation is connected to the adjustment bones x position, everything runs smooth.
So far, so good, here´s my problem. For more complex joints, like the hip joint (Articulatio coxae) I was planning to use 4 adjustment bones surrounding the hip joint. When the leg rotates forward, joint 1 is activated and moves according to the wire parameters, while bones 2 to 4 are non-active, when the joint moves backward, joint 2 is activated, while bones 1, 3 and 4 are non-active, and so on.
I was planning on using an if clause as a wire expression. Currently it looks like this for the first adjustment bone´s X position:
if (World_Euler_Z > 0) then
What happens is as soon as the hip rotation goes over 0 degrees the adjustment bone jumps to a certain position and then stays there (which is bad) until the rotation goes below 0 degrees where it jumps to 0 position (which is good).
Question: How do I fix this? Maybe I need something in the wire expression so on each new frame the position is calculated anew (Like on framechange do (insert code here)). But I could be wrong again. Can anybody push me in the right direction, as I´m running out of ideas right now.
Cheers and thanks in advance :)
BTW: I put this here because I guess this is a problem often encountered in rigging, regardless of it being something more of a 3DS/Max script problem ;)