View Full Version : Switching between two inputs on multiply/divide node
LoudNoises 09-23-2009, 04:33 PM I am a relative novice when it comes to rigging, basically I know what I have learned from books and dvds and the odd bit of advice from riggers at companies I have worked for.
My question is probably very obvious but I am currently experiencing a mental block. I have a three chain arms setup (bind, one ik and one fk chain) and there is a roll joint on the forearm to help distribute the wrist twisting. I have intended this to be automated in both fk and ik modes so that it take 0.5 of the rotate x value from either the ik or fk wrist control shapes rotate x value.
I have so far been unable to get the roll joint working with both the ik and fk shape as I have yet to figure out how to switch which input the multiply divide node uses depending on if I am in fk or ik. I have been attempting to figure out if the condition node can usethe ik/fk switch controls 0/1 values along with the reverse node used in the ik/fk switch. Any help would be most welcome.
|
|
gonzalimator
09-23-2009, 07:24 PM
I like the blend colour method of driving the FK IK arm setup. You could use it for your roll joint as well, but adding a multiplyDivide node in there before connecting it to the roll joint.
Connect the FK IK switch attr (wherever you created it) to the Blender attr of the Blend Colors node. Remember that when the Blender is set to 1 it shows Color 1, and when at 0 it shows Color 2.
Connect each wrist joints' rotateX to the appropriate blend color inputs (color1R, color2R)
Connect the ouputR of the Blend Colors to the input 1X of the multiplyDivide. Set the input 2X to 0.5.
Connect the ouput 1X of the multiplyDivide node to the rotateX of your bind roll joint.
Hope that gets you going.
Marcos
LoudNoises
09-23-2009, 08:06 PM
Cheers for that, your an absolute star. I hadn't even considered that the colour blender could be used like an if statement. Needless to say your suggestion has worked exactly as I had hoped. You said you use it for the actual ik/fk switch, I have been following the Gnomon puppet rig dvd and the guy uses a reverse node for the switch on the parent constraints from the ik to fk chain. Is there an advantage to using the blender for this intead?
Thanks
gonzalimator
09-23-2009, 10:06 PM
I can't remember where I read or saw it first, maybe the Animator Friendly Rigging series by Jason Schleifer? Somebody figured out that the values for rotate XYZ can be channelled into the RGB inputs of the Blend Colors node and the rest is history. Anyway, using Blend Colors nodes removes the need for constraints in this situation and helps to reduce the overall number of constraints in a rig which should help it evaluate more quickly. So, if you aren't familiar with the technique, here's a summary:
You need one Blend Colors node for each joint of your arm/leg.
You need an FK IK switch somewhere that is limited to values between 0 and 1. (let's assume that 0=FK and 1=IK) This can also be an Enum attr like "FK" and "IK" because the first in the list has a value of 0 and the second, 1.
Connect your FK IK switch to the Blender of all of the Blend Color nodes.
For each FK limb segment, connect the rotate to the Color2 of the matching Blend Colors node. No need to grab individual rotate XYZ, just "rotate" to "color2".
Do the same for the IK limb segments but connect them to the Color1.
Connect the output of the Blend Colors node to the rotate of the appropriate joint of the driven arm/leg.
That's it. It acts like Orient constraints without the need for them.
Also, when driving switches between values like 0 and 1, reverse nodes are definitely better than using something like set driven keys that are set to do the same job. I've used that technique for controlling the visibility of the FK and IK controls by using the FK IK switch for the input.
Enjoy!
LoudNoises
09-25-2009, 04:50 PM
Many thanks again, I tried the blend nodes on the actual switch between the fk and ik chains and it worked perfectly. Now all I need to do is figure out, from several online tutorials (the zootoolbox looks interesting) the cleanest method of space matching the ik and fk chains when I perform the switch so there is no pop or need to blend over frames. Cheers.
CGTalk Moderation
09-25-2009, 04:50 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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.