PDA

View Full Version : Acheiving the "PERFECT" arm Rig.


JellyFire
01-17-2006, 04:13 PM
Hi there rigging experts ;)
*(Bit of flattering gets you everywhere!!!)

I'm just about to start work on a character that I want to rig to a professional standard.
He's going to have the works! HOPEFULLY!

I'm sure I'll be posting many questions up here over the next month, however this is
the one thats playing on my mind at the moment. I am sticking a 3 chain IK/FK switch
into the arms and legs, concentrating on the arm, how can I get a none-jumping switch?

When you are animating in FK mode and switch to IK the hand will jump right back to where
the IK handle was last keyframed, bit of a problem. I'm guessing to solve this you might
animate the stickiness of the IK so that in FK mode it doesn't stick, then do some sort
of constraint back and forth between the FK and IK bones.???

what I want is that no matter where I've animated the fk arm to, when I swap to IK
I want it to be invisible, for it not to glitch out and jump (Always have a problem with
hands that way).. Any help Advice on this would be great!!!

JellyFire.

P.s. would it be ideal to got past the switch consept? To create the rig the same, but
without the need to actually switch it, so you grab the ik when you want to use
that, then can just select the fk controls to tweak it? On second thoughts I see
problems with the animation curves arising there.

If anyone else has a suggestion on how to create an amazing arm rig, or tips etc please
don't keep quiet! I am also going to tackle isolation on bits of the body after seeing the
cat rig demo from another member, that is very inspiring!

Morganism
01-17-2006, 04:34 PM
Most of the time in my experience this IKFK matching is done with a script. So when you want to switch from IK to FK you run a script that gets all the rotation values from the IK chain and dumps them into the FK joints, or gets the position and orientation of the FK joints and then uses that to move the IK controls.

JellyFire
01-17-2006, 06:54 PM
great thanks!
I'll start looking into this soon, I guess it's a lot to do with the LS command, some pickwalking and the xform script :)

Nice, a challenging bit of work for me there!

later
JellyFire

kcfang
01-17-2006, 08:21 PM
thanks Morganism, I was wondering the concept behind it too. Mystery solved now.

seven6ty
01-17-2006, 08:48 PM
Yeah, I've been familiar with the script to query the values on the FK, and apply those to the IK controller... I was thinking of scripting an arm setup that says, when ikBlend = 0 (IK is turned off), the visibility of the IK controller is turned off, so you can't see it, and it's position is directly driven by the location of the FK wrist. I was just wondering if there's a way to then break this connection, and key the IK controller's position automatically, whenever ikBlend != 0.

Something I have yet to get into, but seems like I'll have to soon for this script I've been working on.

kcfang
01-18-2006, 03:19 AM
come to think of it, would this script be an expression that runs on every frame? recalculating every frame?

ha|yardShr0ud
01-18-2006, 07:40 AM
To achieve a no jump fk/ik rig.. i have explored other options but by far the best one is to have 3 joint chains, a driven (final output) and two drivers one containing an ik chain and one without. the driven chain which is orient constrained to both the other chains leaving you with a w0 and w1 value attributes, all you need to do to accomplish smooth blending is inversely roll off the values. w0 = .7 w1 = .3 etc.

seven6ty
01-18-2006, 03:52 PM
come to think of it, would this script be an expression that runs on every frame? recalculating every frame?

No, expressions bad, utility nodes good.

Ah, and yeah, that's the plan so far shroud. :)

Cleveland
01-18-2006, 06:21 PM
hi jellyFire, seems like this is just the thread for me.
i have a question, can ANYONE explain why the attribute on the ikHandle is called ikBlend when it does no such thing? shouldn't they just call it an IK switch? i mean, if it's easy enough to contrain one thing to two other things and blend between the two, why can't it be done for a... oh, i think i get it. there's no way to store the FK rotations so once it starts to move to the IK, the current rotations become the Fk that it's trying to blend with, so i tries to blend with them and so iterates until the two meet. bugger. anyone got a way aound this?? oops, just did a quick check. the ikBlend works perfectly I was just using it the wrong way. you have to have the movement over time. turn ikBlend to 0, position and animate in fk like normal along the timeline, then move the timeline ahead to where you want the ik to fully kick in, set ikBlend to 1, move the handle to where you want it. in the scene (for that frame) the arm will snap, but if you scrub the timeline it's a smooth transition from FK position to IK position. and don't forget to set keys on the Fk when transitioning from ik to fk, otherwise it will jump back to the previous keys...NO need for 3 arms!!

cleveland.

Morganism
01-18-2006, 08:13 PM
I still basically use the 3 joint chain setup, maya's ik/fk thing is kinda cool, but I think it gets a little less useful once you start adding lots of features and control.

What I think would be awesome is one set of controls for the arm that act as both IK and FK. So you rotate the elbow and it works like standard FK, but if you translate it the wrist stays locked and you're essentially altering a pole vector. Same with the wrist, you could pull it around like IK, and the elbow control would follow the ik elbow. For something like this to work I think you'd need lots of fancy scriptJobs or plugins to move joint chains around every time you changed the position and rotation of a control. Plus you'd still need some sort of switching to tell it whether to stay in world space or follow the clavicle. It would be a fun experiment, but possibly more trouble than its worth...

So basically I don't think there's anything terribly wrong with the 3 chain setup with a script to match them. I think having separate IK and FK controls can actually be useful sometimes. And with a good matching script it doesn't take much out of your workflow.

The way I like to do my matching scripts is to just have one command that runs the script based on what the animator has selected. So if you've got part of the FK arm selected when you run the script, it will match the IK to fk, and then switch that arm to IK mode. That way you end up with one intuitive command that can be mapped to a hotkey or shelf button to hopefully make IK/FK life a little easier.

JellyFire
01-19-2006, 04:55 PM
For ha|yardShr0ud:
Yeah man, the plan is to do a 3 chain setup, but the question was how to stop it jumping, ie, if your FK chain is at a certain point in space, say 0 0 10 and the IK was at 0 0 -10 when you activate the switch it blends the skinned chain between the two, this is not what I want, so we're looking into ways of querying the current chain, either FK or the IK depending on what is being used, then applying that to the one being switched to so there is no jump.

For Morganism
Sounds like you have done this before.
One thing that bugs me out is that on one of my rigs in it's default pose, so both FK IK and Bound joints are in exactly the same place, when I activate the switch my hand with rotate slightly, or once flipped upside down, I have solved this to an extent so that the hand hardly moves but in this setip we are talking about I can see problems with that, as it would be hard to align the hands when switching from FK to IK, as FK follows the Joint heirachy and the IK is isolated.

Stuff like this is a potential headache for me, I'm a bit glad I have to concentrate on uni work for the next couple of weeks, as it gives me chance to watch some schleifer dvd\s I have, hopefully I'll get a good insight from that!

Later guys
Keep brainstorming :)
I think the answer might lye in utility nodes. h,,,,mmm
JellyFire

Cleveland
01-19-2006, 05:09 PM
then i remain a little confused. what i have now is an arm with a translation control on the wrist. this control has a ikBlend switch on it. i select the control, turn on ikBlend (1) and translate, the arm follows. the elbow control (the pole vector) follows the arm or i can move it to move the elbow. when i want to control the arm via FK i just turn the IKBlend off and i have FK control again. i have to take the step of setting keys on the FK arm, but you have to anyway. it would be a snap to rig up a shelf button that selects the handle sets keys on the ik translations and a key on the ikBlend and another button that turns off the ikBlend and sets keys on the FK arm. no real scripting, just cut and paste. what's wrong with that... i'll check it now... yup, works fine. one button on, another off. every one of my ikHandles goes between worldspace or local based on an offset point constraint with the blend switch right there on the handle, including my pole vectors. and all my FK inheritance is breakable. i'm certainly not saying that there's anything wrong with a 3 arm set-up, because i haven't used it, i'm just asking, as a beginner, what's wrong with the way i have it?

cleveland

JellyFire
01-19-2006, 05:21 PM
It can be broken in animation.
I forgotten what Is the main cause of it, but the built in IK/FK switch can be made to do wierd things that are hard to fix if you have a complex scene.
Theres nothing wrong with using it, but as far as robustness goes, and obviously from a TD point of view, customability, a 3 joint chain is much better and will give you more control.

I think :D
Later
JellyFire

underearth
01-19-2006, 08:10 PM
hi...
haven't tested it by myself... but i have kept link handy....
try to search forum before post such topics are genrally coverd before..

http://forums.cgsociety.org/showthread.php?t=191455

it also has script.. that does trick..

thx :scream:

Morganism
01-20-2006, 01:09 AM
One thing that bugs me out is that on one of my rigs in it's default pose, so both FK IK and Bound joints are in exactly the same place, when I activate the switch my hand with rotate slightly, or once flipped upside down, I have solved this to an extent so that the hand hardly moves but in this setip we are talking about I can see problems with that, as it would be hard to align the hands when switching from FK to IK, as FK follows the Joint heirachy and the IK is isolated.

Yup. And this becomes even more apparent when you have weird default poses who's hands aren't aligned to the world. Plus good IK controls usually don't have the same orientation, zero pose, or rotation order as their FK counterparts. For example, FK joints usually mirror behaviour, while IK controls you often want oriented the same way as eachother, and to the world. So one hand will flip upsidedown and backwards to match the orientation of the FK joint.
So I'm not sure the best way to solve this, I think what I did was zero the FK and IK controls to determine the offset, and then reapply that offset after doing an orient constraint. Gonna have to look into that....
Another option would be in the default pose to align a locator perfectly to the IK control, and the parent that to the FK control. Then just do a point and orient constraint to the locator rather than the FK joint, and it should match up in any pose because it matches up in the default pose.

Cleveland
01-20-2006, 07:01 PM
if you've got everything set up correctly, the joints shouldn't flip. i've been testing this like a madman and there's only flipping if you do something silly like try and translate the ik handle somewhere where the arm couldn't go anyway (in real life) and then switch to ik. the ik solver takes care of the joint rotations so when you swicth out of ik the fk joints have the rotations in them at that point to match where the ik was. the ikSolver takes care of the fact that the FK and IK are in different rotation/translation orientations/spaces. you just have to set keys as soon as you switch to fk. still, like i keep saying, i'm a beginner so when i stumble upon the situation that you guys find with this set-up i'll let you know. but i'm fairly certain that M.E.L. uses the ikBlend too without a problem.

cleveland.

pjohnsen
01-27-2006, 02:16 PM
I got inspired by this thread to make a script for arm setup and here is the first version ;)

It includes synching from IK > FK and from FK > IK.

Simply unzip and save the script in your scripts folder and write "rehash;pjRigging" in the Maya command line (you only need the "rehash;" if you don't want to restart Maya.

This will create a menu with entries to setup the arm rig from 3 locators (shoulder, elbow, wrist) and to sync between IK and FK.

I'm hoping to get around to write a more detailed tutorial on how to use it.

-Pelle

JellyFire
01-28-2006, 09:47 PM
Thats wicked of you, I'll look into it asap.
I need to start sketching things out for my rig.
I went through the Hyper Realistic Body rigging from alias the other day and learnt about creating a full bound skeleton, then a split hierarchy control rig, I can see this having problems with my current workflow, however it might explain why your script has only the FK and IK joints and not a third bound joint. I'm gonig to have to look into it m ore.

Thanks for the script! I'll check it out asap!
JellyFire

pjohnsen
01-28-2006, 11:47 PM
The script actualy creates 3 sets of joints: ik, fk and real (or bind if you will). It auto detects if it is a left or right arm and names the joints acordingley (I used the motion builder naming convention, e.g. LeftArm, LeftForeArm, LeftHand).

It sets up the real joints to blend between fk and ik based on an attribute on the hand manipulator.

Anyways let me know what you think about it.

-Pelle

pjohnsen
01-29-2006, 01:26 PM
Thought I'd add some screenshots to show how the script works ;)

First create 3 locators for shoulder, elbow, wrist :
http://pjohnsen.com/video/misc/pjRigging_01.png

Then run the arm setup script:
http://pjohnsen.com/video/misc/pjRigging_02.png

The arm is now in IK mode and you can move the IK and elbow manipulators:
http://pjohnsen.com/video/misc/pjRigging_03.png

Switch the arm to FK by using the Ik/Fk Blend attribute on the hand manipulator and rotate the FK manipulaors:
http://pjohnsen.com/video/misc/pjRigging_04.png

Back to IK:
http://pjohnsen.com/video/misc/pjRigging_05.png

And now sync the IK to the FK:
http://pjohnsen.com/video/misc/pjRigging_06.png

-Pelle

Digital_Rebellion
02-15-2006, 04:19 PM
pjohnsen, thanks for the script man! i've been smacking my head on the wall over the last few days, not knowing what to do with IK > FK > IK. The timing of couldn't have been any better.... downloaded your script and gonna check it out...... RIGHT NOW!

actionbrad3d
02-16-2006, 10:53 PM
Hi i was just trying to figure out if there is a way to more or less "fake" an IK /FK blend using parenting and constraints. (please see attatched file) Im sure this is something someone has already thought about, but from my quick glance this seems to be an ok solution, just wondering if there may be any long term problems with it.
Please take a look and let me know if Im dreamin! (or have overlooked something)

cheers dudes. rock on and all that .

pjohnsen
02-17-2006, 09:38 AM
Looks interesting. I noticed a couple of things though:



The elbow control doesn't follow when you translate the wrist (IK)
How do I make the arm fully follow the movement of the body, as it would in FK? Right now the hand is always stuck at the IK
The shoulder behaves rather strange when I hook the clavicle joint into a spine. As it is contorlled by IK it doesn't follow the rotations of the spine properly?
-Pelle

nullNode1
02-22-2006, 10:52 AM
@pjohnsen: i've downloaded your script and it works great. just wondering tho, (forgive my noobness) how did you parent the joints in the FK chain to the curve controller? i like the way it shows up in the hypergraph. and it is quite clean too.

anyway, great job! thanks for sharing this stuff.

actionbrad3d
02-22-2006, 08:47 PM
thanks man- the joints themselves arent parented to any controllers, they are point and orient constraints going between IKs and such ( forgive my vagueness, it was a few weeks ago i did this and havent had time to revisit it. ) so they are constrained, not parented.
phjonsen:
yep,you are right about the elbow controller, the "fk " controler for the elbow doesnt respond to the ik movements of the wrist, so you end up with offset stuff, which can cause problems. If anyone can figure out a way to have the wrist controller parented to the elbow one, yet still have the elbow one move in relation to the IK movements of the wrist ( my god that sounds confusing...i hope that made sense) then please let me know. :)

Re- the spine, this setup should work into a standard rig by parenting the clav to the spine and the shoulder contoller to the spine/top spine contoller. basicly, the arm/elbow/wrist are paented to eachother, with the shoulder at the top of the "chain" allowing for the dodgy fake FK movement.

I'll have another look at this when I can and try and get it working in a full rig and see what i can iron out and post somehting again. Thanks for the feedback guys!

Brad

pjohnsen
02-23-2006, 04:54 AM
@null_node1: it's the good old shape parenting 'trick' ;) Select the curve, press down arrow to get to the shape, shift select the joint and then write 'parent -s -r' in the command line. You may have to freeze transmforms and delete history on the curve first and it should be placed at the origin, no matter where the joint is.

nullNode1
02-28-2006, 01:46 AM
@pjohnsen: thanks! i'm gonna be using that a lot in my future rigs. :D

the_podman
02-28-2006, 04:59 AM
Anyone seen Chris Fram's IK/FK arm tut. It's probably my favorite method, also 3 arm method:

http://www.dirtyoldtoon.com/tutorials/IKFKTutorial_01.htm

Only thing missing are "roll" joints, but you could easily set those up by splitting the joints afterwards, putting one inbetween the wrist/forearm and one between the shoulder/elbow, restricting Y/Z rotations(assuming X in pointing down the bone), connect the X rotations to the corresponding wrist/Shoulder joints, then using multiply divide nodes(ala cane toad) to 'half' the rotation values.

pjohnsen
02-28-2006, 11:24 PM
Interesting idea with adding FK rotations on top of IK ... kind of like a separate layer of animation :)

Regarding twist (or roll) joints, I've been thinking about that a bit. So far I've concluded not to add those in the control rig ... they really only belong in the bind rig, so what I'll probably do is to make a separate script for adding twist bones. But I also need a good easy way to copy the control rig into a bind rig, split it into a separate file and have some easy way of connecting them later when referencing in the completed bind rig.

-Pelle

inverse catheter
03-01-2006, 02:59 AM
.

where MEL is concerned .i 'm a novice at best .but i 've been tinkering with this scriptJob which basically intends to rebuild constraint relationships ( IK to FK .and vice versa ) with each selection change ( checking for custom attributes set on controller curves ) via a simple macro type procedure .ie :

select a control object which would logically infer an FK mode ( shoulder .elbow .etc ) .constraints / relationships are created to pose ones character in FK .removing the IK setup

select a control object which would logically infer an IK mode ( wrist .ankle .etc ) .constraints / relationships are created to pose ones character in IK .removing the FK setup

.

it is only very much in its beginnings .and buggy as hell .but the theory .i believe .is sound .and it works halfway at least .for now .needs a ton of work to be considered stable

.

the scriptJob thus far which creates / deletes the relevant setup on the right arm :

//
int $DynSelectionScriptJob = `scriptJob -killWithScene -event "SelectionChanged" "MakeIKFKDynamicSwitch"`;
//
//
global proc MakeIKFKDynamicSwitch()
{
//
string $sel[] = `ls -sl`;
string $obj = $sel[0];
int $i = 0;

//{
if (`attributeExists "RT_FKmode" $obj`)
{
//
delete `parentConstraint -mo -weight 1 RT_shoulder RT_shoulder_ctrlNull`;
delete `parentConstraint -mo -weight 1 RT_elbow RT_elbow_ctrlNull`;
delete `parentConstraint -mo -weight 1 RT_wrist_ctrl RT_wristIK`;
delete `poleVectorConstraint -weight 1 RT_elbowlocator RT_wristIK`;
//
parentConstraint -mo -weight 1 RT_shoulder_ctrl RT_elbow_ctrlNull;
orientConstraint -mo -weight 1 RT_shoulder_ctrl RT_shoulder;
parentConstraint -mo -weight 1 RT_elbow_ctrl RT_wrist_ctrlNull;
orientConstraint -mo -weight 1 RT_elbow_ctrl RT_elbow;
poleVectorConstraint -weight 1 RT_elbow_ctrl RT_wristIK;
pointConstraint -weight 1 RT_elbow RT_elbowlocator;
setAttr "RT_wristIK.ikBlend" 0;
//
print "Entered RT_FKmode.";
}
if (`attributeExists "RT_IKmode" $obj`)
{
//
delete `parentConstraint -mo -weight 1 RT_shoulder_ctrl RT_elbow_ctrlNull`;
delete `orientConstraint -mo -weight 1 RT_shoulder_ctrl RT_shoulder`;
delete `parentConstraint -mo -weight 1 RT_elbow_ctrl RT_wrist_ctrlNull`;
delete `orientConstraint -mo -weight 1 RT_elbow_ctrl RT_elbow`;
delete `poleVectorConstraint -weight 1 RT_elbow_ctrl RT_wristIK`;
delete `pointConstraint -weight 1 RT_elbow RT_elbowlocator`;
//
parentConstraint -mo -weight 1 RT_shoulder RT_shoulder_ctrlNull;
parentConstraint -mo -weight 1 RT_elbow RT_elbow_ctrlNull;
parentConstraint -mo -weight 1 RT_wrist_ctrl RT_wristIK;
poleVectorConstraint -weight 1 RT_elbowlocator RT_wristIK;
setAttr "RT_wristIK.ikBlend" 1;
//
print "Entered RT_IKmode.";
}
//
if (`attributeExists "LT_FKmode" $obj`)
{
print "Entered LT_FKmode.";
}
if (`attributeExists "LT_IKmode" $obj`)
{
print "Entered LT_IKmode.";
}


}

pjohnsen
03-06-2006, 04:31 PM
I'm not sure if it is a good idea to actually create/delete the constraints in a scriptjob, but maybe I don't fully understand how this is supposed to work.

What happens if I want to animate a switch from e.g. FK to IK? Say that at frame 50 the arm should switch from FK to IK (maybe the character puts his hand on a table and leans on it).

Another note: It's generally a bad idea to directly use the names of nodes in your script to access them (e.g. RT_shoulder_ctrl). This will break the script if you have multiple characters in your scene or when using references.

-Pelle

inverse catheter
03-07-2006, 01:15 AM
.

i will readily admit .i 'm not at all a setup expert .this has been developed simply as an experiment .since i 'm annoyed by FK to IK blending in any example i 've seen .i view it as another of maya 's weaknesses that one cannot simply pose a skeleton in either mode .at any time

i don 't know enough about scriptJobs to have concern for any problems that may arise with them .as far as this matters it updates in realtime .no lagging .so becomes quite fluid to use .i want to pose in FK .i go right ahead .i want to pose in IK .i do just that .no switches as such .no blending .easy

the naming convention you see is just to test .ultimately there would be a UI within which to set this all up .unique names for all controllers and such .so no mix ups with multiple creatures in a scene

all i 'm after here is an intuitive rig where one just goes ahead and poses the thing .i don 't want to deal with any swimming between FK and IK .a three joint setup ? what a mess .that doesn 't make any sense to me ( i understand the setup .of course .though do not see it as a solution so much as a workaround ) .but as i said . i 'm no expert .i don 't even animate anything .so i would have only my narrow point of view to see from .i welcome the opportunity to shed my ignorance




.

niralrajani
03-07-2006, 10:36 AM
Hi
I knw the problem in maya..softimage doesnt have this...ok now u need to script small technique...what u can do is after switch frm Ik to Fk point const FK controsl to Ik controuls with maintain offset off so Fk will snap to Ik taking its true world values...and then remove the point constrain ...so fk will be at Ik post..same thind can be done whn u switch frm Fk to Ik...and in case of pole vector it need to be aim const with null obj which will be snap to Fk elbow so.. that elbow point in right direction....
this can be script and make button on shelf..but naming conv is very necessay ... to make this script work for every model....
cheers...
if need more help mail me on niralrajani@gmail.com

darkjedi1929
03-08-2006, 05:51 AM
hey all...

How about this: Create 3 controllers, one on the shoulder, one on the elbow, one on the wrist. Parent the wrist controller to the Elbow controller, Elbow controller to the Shoulder controller. Finally, create IK and parent the ikHandle to the wrist controller. Voila. Single Chain IKFK Arm ready and no switching, sliding and slipping required....neat huh? Of course you still need a scriptob to make it work better....what do you guys say?

P.S. The credit for this rig oughtta go to Keith Lango and Michael Comet (I think); they mention this rig on another link here (http://forums.cgsociety.org/showthread.php?t=316119).

inverse catheter
03-08-2006, 10:58 AM
on its own .that setup won 't work .you 'll get the desired result when posing in an ' FK ' manner .soon as you try to pose in ' IK ' .by translating the wrist controller .trouble .the hierarchical relationships are only maintained in one direction .for this type of setup to happen the parent / child relationships need to be reorganised for each of the two modes .FK travelling down .IK travelling up .as far as i 've found ( i haven 't actually been able to achieve it .but i 'm not no pro ) this is extremely tricky to do manually .if not impossible .cycles abound

i cannot see a way of getting it done without the use of MEL or an expression ( in my case a dirty scriptJob ) .maybe some truly clevers can pull it off with some utility node trickery .i don 't know .ultimately .i ask the maya dev team allow that an IK skeleton simply be posed in FK also .what an obvious solution .to a problem that has been around for this long

zhenyang
03-08-2006, 12:42 PM
Hey guys, this might interest you if you haven't seen it, Ian Jones' IK/FK tutorial http://www.shrtcww.com/journal/166/Tutorial-IkFkArm

darkjedi1929
03-08-2006, 01:42 PM
Read the post:

Of course you still need a scriptob to make it work better

I myself admit that you need a scriptjob to get the functionality...what this method does is it eliminates two chains of joints, thereby making for a simpler rig structure...

just my 2 cents.

jdj
03-08-2006, 02:53 PM
I'm not sure if it is a good idea to actually create/delete the constraints in a scriptjob.


...no its not.

See it like this: Maya does not record the creation process (i.e. how and when nodes are created and connected). So if a structure is changed in mid-animation, that will remain even after you rewind the animation. I.e. the changes are not "undone".

The way to record time changes is basicly via animation curves or other clever node networks (expressions etc.).

So - you can use scriptJobs to re-position objects at selected points in times, but you should not create or delete stuff.

Cheers
/ Daniel

pjohnsen
03-08-2006, 09:45 PM
@jdj: Thank you ... that was exactly my concern. Another issue I had with scriptjobs (when playing around with zzToggle) was that they require the script to be present for the scene to work, meaning that the scene file is no longer self contained, i.e. if you send the file to someone who hasn't got that script it won't work very well. This can be solved using scriptNodes, but I found that it quickly became cumbersome to manage :( E.g. if you want to use zzToggle in your rigging script you have to also copy the needed procs into script nodes in the scene for the file to be self contained.

@inverse catheter: I don't think scriptJobs will work for this, but if you manage to get something working, please post it and I'll have a look ;) Have you tried using Maya's builtin Ik/Fk switch? The thing I find with that is that you have to remember to use the special 'Set IK/FK key' when blending. I've also tried playing a bit with Full Body IK, which in theory looks very cool (it's the same stuff MotionBuilder is using). However I didn't find it mature enough for production use ... maybe in the next version ;)

@zhenyang: Looks interesting, however when I tried it, I had the problem that when I animated a blend from Ik to Fk, the Ik controller would be left behind. I think this is using Maya's builtin Ik/Fk switch, so maybe I should use 'Set Ik/Fk key' ?

Anyway my rigging teacher just got back from Canada and he already showed a new way for doing an Ik/Fk switch, this time using aim constraints to ensure a perfect blend between Ik/Fk. Maybe I'll try to update the script to use that, but it is a bit complicated ;)

-Pelle

inverse catheter
03-08-2006, 10:31 PM
.


jdj .you 're right .what i had put together doesn 't work with animation .essentially has the effect of deleting any motion the controller curves would pass to the joints .leaving them swimming about in place

in writing this i 've just had a thought then .perhaps if i could bake the rotation values into the joints themselves .with each key set on a controller ( more scriptJobs a .i can feel the shaking heads right now ) .if any of you guru 's out there can see a problem with this outright .maybe let me know .before i go messin ' about with something which is doomed to failure

i 'll keep playin ' by .a hobbyists indulgence .looking forward to whatever conclusions this thread presents




.

animationrigs
03-11-2006, 08:43 PM
Wow, what a thread. Ok so in practice;
ScriptJobs for autoswitching/animating can be very dangerous, when used for things like workflow and interfaces they can be useful. In general, in production we avoid scriptJobs.

FK/IK switching 3 bone vs maya single chain.
3 bone all the way. Here is why, the work flow for the Maya version isn't always animator intuitive (which seems to be the underlying point of this whole thread) and it is unstable in various situations. I've seen it work and I've seen it not work and when it doesn't work it isn't an easy issue to solve. That alone is worth the 3 chain system.

Now as for animation. Believe it or not 3 chain is pretty animator friendly and easy to understand and explain. The only scripting required is a little add on tool that would snap FK->IK or IK->FK if the animator wanted to do a 1 frame blend. Keeping it simple is extremely important. It has to be fast and easy to use.

If you are interested in a beginner setup tutorial you can probably get through most of the one we have up and animationrigs.com for free. Just go to the site and sign up for a demo subscription, then check out the FK/IK arm blend training. It will walk you through it from a beginner stand point.

Sweet.

darkjedi1929
03-13-2006, 01:25 AM
Hey guys, while you are at it, why don't you check out my reel here (http://rapidshare.de/files/15367872/myReel1.avi.html)? Would love to have yuor crits on it.

P.S. Do you guys know of a free webhosting thing where I can put up my reel? right now its at rapidshare....

darkjedi1929
03-13-2006, 05:07 AM
ScriptJobs for autoswitching/animating can be very dangerous, when used for things like workflow and interfaces they can be useful. In general, in production we avoid scriptJobs.



Just curious, as I have never yet used scriptjobs in production, what are the dangers? I mean, all we are doing is getting attributes from A and setting them to B. We do this with a button click, or we do it using a scriptJob, whats the difference (other than the obvious one of course ;))?

animationrigs
03-13-2006, 04:51 PM
One of the biggest pitfalls is they don't always "fire" correctly. Even a simple script job that runs on attribute change when connected through a node network doesn't fire all the time. It's weird. Oh and a peeve of mine is there is no scriptJob/call that tells you when a user sets a keyframe, at the core level.
On numuerous occasions I've seen crashing as well. Could very easily have been the way the scriptJob was written, but it definitely happened. Just be diligent about testing this out before wide scale use. I mean really test it. Give it to a bunch of animators that are working on shots type testing.

jdj
03-14-2006, 07:58 AM
One of the biggest pitfalls is they don't always "fire" correctly. Even a simple script job that runs on attribute change when connected through a node network doesn't fire all the time.

There are several exceptions described in the documentation to when the scriptJob fires. While playing back animation is one case I believe.

I admit that I have not used scriptJobs to any large extent yet, but I am currently toying with a scriptJob that sets keyframes on attributes when the user performs certain actions (i.e. sets other attributes). It is far from production ready, but I think that is the way to use them: i.e. to set keyframes. To rely upon other means to store animation is shaky at best. As far as I have seen, it seems to work in a predictable manner.

animationrigs.com: have you seen situations where this approach fails ?

As a side note: ...of course you can use scriptJobs to support other tasks like modeling etc. but that is outside the scope of this thread.

Cheers
/ Daniel

animationrigs
03-14-2006, 06:27 PM
There are several exceptions described in the documentation to when the scriptJob fires. While playing back animation is one case I believe.

animationrigs.com: have you seen situations where this approach fails ?

Cheers
/ Daniel

yes, if you are using the attributeChange option for the script job, but keep in mind there were other nodes connected to the attribute. If it works, then great! Just let us know if happen to run into a problem with it. Maybe checking the attribute directly will work in a reliable manner.

NolanSW
03-15-2006, 12:20 AM
Keep in mind all that using a scriptJob will have to be added for each character you have. So in a production enviroment, having all those scriptJobs looking for changes will really slow your scene down. Also, you would have to change each scriptJob to accomadate each character. You don't want to run into name clashes. Plus, once you reference in the character, your scriptJob will not work unless you build into it a way to check nameSpaces.

I created a FK/IK switching script for the animators that was really simple. Two buttons that said "Switch". Find at what state the arm is in, IK or FK and make the switch based off of that. The script had to find what each character's nameSpace was but is no hit the scene.

Keeping it simple is always your best option.

3 arm setup is also my vote. Creating a stretch IK arm is impossible to create in a single IK/FK arm chain.

ashishdantu
03-15-2006, 08:42 AM
Hello PPL,

very gud thread... lots of fud for thought !!

actually using scriptjobs definately seems to be trick, we need to be careful about.

was working on a method... which allows us to do a *series of things* (like a scriptjob)- in this context, eg: match FK elbow to IK elbow..and then match FK shoulder to IK shoulder , key them and keep doing the same vice versa.... but the thing is, these are fired on an attribute change action..almost similar to what scriptjobs can do on attributeChange.

i call it "Fire my Function - attributes (FFA)" setup- this isnt anything new, but i use this method to get multiple things done, in a single instance (event).

it involves setting up an attribute and using this to fire our required functions (embedded in file through script nodes) and in that have all our required series of code.

if any one is interested, i'll put my page somewhere , n all can see and give me feedback...

-rgds,

jdj
03-15-2006, 08:47 AM
yes, if you are using the attributeChange option for the script job, but keep in mind there were other nodes connected to the attribute. If it works, then great! Just let us know if happen to run into a problem with it. Maybe checking the attribute directly will work in a reliable manner.


Ok - I have so far only triggered on an unconnected attribute - the sole purpose of this attribute is to fire the scriptJob, but that works. So far :)

Plus, once you reference in the character, your scriptJob will not work unless you build into it a way to check nameSpaces.

Yes - this is why I have not really given these any serious thoughts yet - you basicly need to find a way to "re-link" the scripts and I have not found any waterproof ways of doing this yet. It would be nice if you inside a running script could find out which scriptNode it resides in...

/ Daniel

inverse catheter
03-15-2006, 08:56 AM
.


again .i 'm no td .nor animator .but i feel like the 3 joint setup is .as i put earlier : more of a workaround .and less a solution .though .of course .most seem entirely happy using it .and those being from a true production background .so .yeah .it works .the question i 'm left to ask is :

if it were possible to pose a joint chain .a single joint chain .in both ik .and fk .would that be preferred ?

ashishdantu
03-15-2006, 09:50 AM
hi ppl,

Maybe checking the attribute directly will work in a reliable manner....

in case you are interested, here is my page : FmFA - Fire my Function Attribute (http://dantuashish.tripod.com/Maya/FmFA.html) page and this does the same. Checking an attribute and fire your function to do ur required things..

-cheers,
rgds

pjohnsen
03-15-2006, 02:25 PM
Hi again,

As mentioned in an earlier post I played around with zooTriggered (http://www.macaronikazoo.com/download/000058.html) some while back. It basically lets you run a script when something is selected. One cool thing is that it has a solution for referring to objects through what is called symbols. This makes sure that it works even when using references.

The main issue I had with it, was that I found it rather cumbersome to include all the needed code for zooTriggered to work inside scriptNodes.

Anyways it might be worth a look ;)

-Pelle

animationrigs
03-15-2006, 05:53 PM
.

if it were possible to pose a joint chain .a single joint chain .in both ik .and fk .would that be preferred ?
First I am assuming that you mean you could pose the chain using FK or IK any time all the time (Maya already provides a single chain that can do both)
My initial thought if that is the case is no. Here is why. Where do your animation curves get stored? ie if you pose the arm and set a key does the key go to the IK handle or the FK joints or some mystery control. If you choose one, then when I pick the IK control I don't see the keys and the arcs created when animating IK are different then when using FK. This is actually one of the reasons I have been researching the practicality of implementing full body IK style rigs. It doesn't work from a work flow stand point and I took the full body IK for spin while at Siggraph this past year, with an alias engineer right there, and broke it in less than two minutes. Doing very basic stuff like trying to block out a walk. You can see though, that with a full body style rig you would be getting fk and ik all in one and then your animation becomes truly pose based. Which is a great idea until start trying to figure out how to edit it. I think if you were to be working in a certain style of film (very posey or even stop motion) then a more pose based work flow would be great. I haven't given up on this but haven't seen a solution that works from an animation stand point yet.

inverse catheter
03-15-2006, 08:30 PM
.



animationrigs.com .you assume correctly .a single joint chain that can be posed using ik .or fk .anytime .all the time



the curves would be stored consistent with those objects which have had their attributes keyed .as usual .in imagining such a setup the idea is presented as though there exist no kooky flaws like the one you suggest .a stable .functional rig .and when you say : " Maya already provides a single chain that can do both " .are you referring to the ik blend attribute ? nobody dare go near that thing .do they ? i do not see why the developers just wouldn 't actually solve the problem and allow that chain to be posed in both .or .are there logical flaws .or engineering problems .where this type of freedom is too difficult .or impossible .to achieve ?



which brings me back to my question : if it were possible to pose a joint chain .a single joint chain .in both ik .and fk ( assuming no kinks ) .would that be preferred ?



this question needs to be asked because .if animators do indeed favor the 3 joint setup .and would favor it above all other methods .there 's not too much incentive in researching an alternative which would never see adoption ( aside from the obvious fun to be had in getting dirty under the hood of maya 's architecture .which is why i 'm here .to play .to learn )



.

animationrigs
03-16-2006, 02:11 AM
I only asked about the Maya one, just in case I was misunderstanding....I wouldn't go near it.

I don't know that it is a matter of preferred or not. the question may just be about an all new work flow. "Nodes" controlling FK/IK to achieve your pose and when you key it it keys the rotations on the joints? ....hold on. Maybe you are talking about a control that is just like an IK control that switches between FK/IK seemlessly....you still have to pick the mode it's in and you can switch back and forth? ie the maya implementation that actually works? If that is the case I would still wonder about switching between the two in the middle of an animation curve. Example, animate an FK arm swing frame 1-10...then go back and turn on/animate IK at frame 5 now at frame 15 switch back to FK...where is the arm? Where the IK left off or where the FK arm was last keyed at 10?

Did you ever see.... I think it was called animMan. It was another full body IK/pose based animation setup. looked cool

for now I'm sticking with the 3 arm deal and I'll just keep prototyping new ways/methods until one is more stable/better.

nullNode1
03-16-2006, 10:04 AM
@ashishdatu: thanks for the link. saw it, tried it and hope you don't mind if i use it.
i usually add group nodes on top of the controller objects i constrain so the second issue doesn't really affect me. thanks again for the tut.

ashishdantu
03-16-2006, 12:01 PM
hi null_node1,

i'm glad that it is of some use to someone.. ya..ya .. pls use it and let me know if u have any further enhancements/suggestions for it...

-rgds,

JellyFire
03-16-2006, 06:53 PM
Hey Guys,
Jesus, this topic got popular.
I'm back on a mission with this arm, I'm going to test out the Schliefer arm switch script and find out how it works, from there I'll put it's functionality into the channel box, probably through a drop down menu..

I'll let you know how it goes.
Jellyfire

darkjedi1929
03-18-2006, 05:49 AM
First I am assuming that you mean you could pose the chain using FK or IK any time all the time (Maya already provides a single chain that can do both)
My initial thought if that is the case is no. Here is why. Where do your animation curves get stored? ie if you pose the arm and set a key does the key go to the IK handle or the FK joints or some mystery control. If you choose one, then when I pick the IK control I don't see the keys and the arcs created when animating IK are different then when using FK. This is actually one of the reasons I have been researching the practicality of implementing full body IK style rigs. It doesn't work from a work flow stand point and I took the full body IK for spin while at Siggraph this past year, with an alias engineer right there, and broke it in less than two minutes. Doing very basic stuff like trying to block out a walk. You can see though, that with a full body style rig you would be getting fk and ik all in one and then your animation becomes truly pose based. Which is a great idea until start trying to figure out how to edit it. I think if you were to be working in a certain style of film (very posey or even stop motion) then a more pose based work flow would be great. I haven't given up on this but haven't seen a solution that works from an animation stand point yet.

hmmm....not to start off a flame war over here, but I think Max's biped does the same thing...and it is considered to be a pretty robust solution (I have just HEARD, never really TRIED). So if Max can do it, why can't Maya?

csc2h
03-21-2006, 02:28 PM
I have always looked at the "IK BLEND" feature in Maya as an automation for IK/FK blending...NOT GOOD...anything automated in maya is bad bad bad...Dont do it...If you are rigging the character quickly for yourself, it works great...but if someone else has to do it, I guarantee if something is setup weird and the animation curves get off, someone is going to kill the TD... Its really not hard to setup and IK/FK blending arm with multiple arm joints...Also if you have a blending arm and want to go back and add say a "motion capture" rig inside the arm, just add another set of orient constraints.... I have seen the IK BLEND be used for an arm, but I would prefer to set up 3 arm rigs and have it blend back and forth - more control over what happens and I always yield good results from this method... just my $.02 :)

donvlatko
04-30-2006, 07:15 PM
Maya HELP:
To eliminate unexpected joint flipping after turning on the IK Solver

After FK animation, a joint chain may flip to an undesired position when you turn on Animate > IK/FK Keys > Enable IK Solver. To undo the joint flipping and prevent it from occurring when you turn on Enable IK Solver, do the following:


Open the Animation menu set (press F2).
Undo the Enable IK Solver menu item to return the joint chain to the position it had before flipping.
Select the IK handle.
Select Skeleton > Set Preferred Angle.
Select Animate > IK/FK Keys > Enable IK Solver (http://localhost:4449/Maya7.0/en_US/CharSetup/animateikfkkeysenableiksolver.html).
Select Animate > IK/FK Keys > Set IK/FK Key (http://localhost:4449/Maya7.0/en_US/CharSetup/animateikfkkeyssetikfkkey.html).

Continue using IK as desired.





Can't nmake this to work, anyone know why? also this maybe a solution?

donvlatko
04-30-2006, 07:58 PM
this work good I figure out, is there a problem with this technique?

Nahaz
05-08-2006, 06:03 AM
We've phased out FK almost entirely. If you make your IK solvers spongy, especially for the legs you can avoid unsightly over-extentions. I've not found it any harder getting nice arcs out of IK.

VM
05-08-2006, 11:40 AM
ammmmmmmmm..... so how do you get arcs with IK?.........

MikeRhone
05-09-2006, 06:09 PM
Better yet, how do you get good secondary/follow through with IK? Arcs would be hard enough to achieve with a straight IK rig unless you have keys set on at least every other frame. Even if you get nice arcs out of it, tweaking those curve would be an unintuitive nightmare.

this work good I figure out, is there a problem with this technique?

Nope, thats the way you do IK. A good rule is to make sure you only have rotations in one channel when you set it. (IE: X = 0, Y = 0, Z = 30). Add to that one pole vector and you have yourself one stable IK arm.

ussmc
05-17-2006, 05:38 AM
Anyone successful with this tutorial http://www.dirtyoldtoon.com/tutorials/IKFKTutorial_01.htm, that was posted on this thread sometime ago?

the_podman
05-17-2006, 05:12 PM
Anyone successful with this tutorial http://www.dirtyoldtoon.com/tutorials/IKFKTutorial_01.htm, that was posted on this thread sometime ago?

Yes, I've used his version of the arms a few times. The tutorial skips over a few important steps, which beginners may not be able to follow, but it's an effective arm. It's sort of a 'hybrid' arm which seems a little weird at first, but if I do end up using this arm, I'll probably make a switcher somewhere for a more traditional IK/FK arm.

-pod

CGTalk Moderation
05-17-2006, 05:12 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.