PDA

View Full Version : Preferred Angle Question


jgr77777
12-31-2005, 09:02 PM
I am trying to figure out why I can't seem to set preferred angle. I select the parent joint (hips), and set preferred angle (recursive). If I rotate the hips joint, then select assume preferred angle, nothing happens. I have to control-z to get back. I'm using 7.0 if that makes any difference.

Does preferred angle only work in conjunction with Ik? I do not have that set up yet.

M.E.L.
01-01-2006, 07:11 AM
Preferred angle is used to reset the angle at which the vector is being calculated from for the IK. So yeah, gotta have IK on your joints to set your preferred angle.

-s

skullofbone
01-03-2006, 09:38 PM
I'm still trying to find good sources of rigging information, if you could provide me with what you are following, would appreciate it.

Like M.E.L. said, you do need IK, but I don't understand what you would rotate the HIPS and set preferred angle on them.

You may wish to rotate an Elbow or a Knee, But I don't understand why hips. Also, after setting the preferred angle, you can return the joint to its 0 rotation value, you don't need to keep it bent.

jgr77777
01-04-2006, 03:20 AM
Well, I have added IK to the spine, arms, and legs. I highlight and RMB click the hips (root) joint, select "Set preferred angle", then I translate an arm. Next, I again highlight and RMB click the hips (root), and select "Assume preferred angle." The arm does not move.

I swear I saw this work on a different skeleton I made a couple of weeks ago.

skull, I have been going through the Learning Maya 7 book "The Modeling and Animation Handbook." About half the book is modeling; the rest is rigging/animation. It comes with a DVD, but don't expect a lot out of it; it only skims over a few of the chapters from the book. The book so far has been quite instructive.

M.E.L., thanks for you help on the other question I posted! I posted a response there, too.

skullofbone
01-08-2006, 04:23 AM
Thanks ;)

I read my last post, kind of garbled, try this: (again not sure if what it's what you're trying to do)

Focusing on a Leg...L_Hip, L_Knee, L_Ankle
first rotate the L_Knee joint, so the leg looks bent how a real leg would.
(Here the amount of rotation doesn't matter, just the direction you rotate in)

Set preferred angle

Here, I normally 0 out the rotation in the channel box, not by sight.

Now, create an IK handle from L_Hip to L_Ankle

Now you should be set. Grab the IK effector, press W(translate shortcut) and move the leg all over the place.

This is the roughest of a basic Ik implementation. I've gone through alot of rigging tuts/books, including from Alias and still feel lame. i'd love to see what you come up w/After this book, as I was thinking of picking it up.

The book hopefully will end up showing you how to create CONTROL CURVES, so you don't grab the Ik to move the foot, but a curve.

Good luck...if this IS what you were trying, for the arms draw the Ik from the Shoulder to the wrist....a regular rig involves a forearm twist, and the Ik will be placed differently, please let me know if the book details this as well. (after you're all done )

dying to see some output from your work from this book :)

jgr77777
01-08-2006, 04:11 PM
thanks, skull, i will try it. i do set up curves and add attributes to control various things. example: i have a footprint shaped curve, one for each leg, to control foot/leg movement.

my preferred angle problem persists, however. i have an IK set up, 6 in fact, on this character: left/right arm; left/right leg; spine; neck. i have everything set to a neutral pose. i highlight hips (the root of all the joint chains). i RMB and select "Set Preferred Angle." i then move something, say the right leg IK handle. i highlight hips again, RMB, and select "Assume Preferred Angle." the leg doesn't return to its neutral position. like i said, i know i saw this happen at least once on a different model i built.

seven6ty
01-08-2006, 05:49 PM
You may have to turn off the evaluation of all IK nodes so they don't override that command to resume rest pose, possibly?

jdj
01-09-2006, 03:23 PM
Preferred angle is used to reset the angle at which the vector is being calculated from for the IK. So yeah, gotta have IK on your joints to set your preferred angle.

-s

hmmm,

I think I would like to differ. I can of course be totally wrong but anyhow I am quite certain that a joint does not need to have IK in order to use preferred angles. I will check this later when I have Maya in front of me. I believe that if you just create a set of joints (perhaps set preferred angle first) and rotate them around, "Assume preferred angle" would reset them.

I will check later.

Anyway: in my experience, usually when skeletons refuse to assume its preferred angle is that some other attribute drives the rotations. IK or constraints for instance.

Cheers!
/ Daniel

M.E.L.
01-09-2006, 10:30 PM
hmmm,

I think I would like to differ. I can of course be totally wrong but anyhow I am quite certain that a joint does not need to have IK in order to use preferred angles. I will check this later when I have Maya in front of me. I believe that if you just create a set of joints (perhaps set preferred angle first) and rotate them around, "Assume preferred angle" would reset them.

I will check later.

Anyway: in my experience, usually when skeletons refuse to assume its preferred angle is that some other attribute drives the rotations. IK or constraints for instance.

Cheers!
/ Daniel

joints on their own don't have a resolution plane, the reason there is a "preferred angle" is to be used in conjunction with the IK once it is set in place so that if you decide to zero out the IK, it will maintain that angle.

essentially, this feature isn't even used anymore since the T pose was almost completely fazed out (preferred angle was simply to stop the straight arms in the T pose from breaking and solving in a backwards fashion).

a bindPose would get caught up with numerous connections and the such but generally a preferred angle is simply reading off the resolution plane of the IK itself. just to clarify.


-s

jdj
01-10-2006, 08:06 AM
joints on their own don't have a resolution plane, the reason there is a "preferred angle" is to be used in conjunction with the IK once it is set in place so that if you decide to zero out the IK, it will maintain that angle.

essentially, this feature isn't even used anymore since the T pose was almost completely fazed out (preferred angle was simply to stop the straight arms in the T pose from breaking and solving in a backwards fashion).

a bindPose would get caught up with numerous connections and the such but generally a preferred angle is simply reading off the resolution plane of the IK itself. just to clarify.

-s

Yes - that is it used with IK is no question.

But the point is that it can also be used without any IK at all to get back to a base position unless the joints are prevented from doing this by other means (IK, constraints and whatever). Tried this yesterday (not on 7.0 though, but I don't see why they should change this behaviour) and it worked like a charm: In a new scene, create a three joint chain in any shape. Select some joint and rotate. Choose the menu option "Assume Preferred Angle" or just "joint -e -ch -apa". The joint chain resets itself. No IK involved to get this behaviour.

Cheers!
/ Daniel

skullofbone
01-10-2006, 05:30 PM
M.E.L. said...
essentially, this feature isn't even used anymore since the T pose was almost completely fazed out (preferred angle was simply to stop the straight arms in the T pose from breaking and solving in a backwards fashion).

Can you please elaborate on this. Everything I've encountered with rigging deals with T-Pose and setting preferred angles at some point. Again, I don't know how to rig though, seriously, this information would be great :)

Not going to vear off topic asking other rigging questions don't worry, but since it relates to preferred angles figured would ask. Thanks

Buexe
01-10-2006, 07:59 PM
The original use of the prefered angle attribute on joints is for IK reasons.
Why? Because when you have 3 joints in a line at creation time of the IK chain
IK computation will not know what to do ( where should it bend the joints ? ). But by reading out the prefered angle attribute IK gets a clue how the IK chain/plane should
be oriented in space. It`s just like M.E.L stated earlier. BUT that doesn`t not prevent
you from using this attribute for other purposes like "saving" and "loading" a pose for a joint.
Itīs just like the bindPose attribute on joints. It stores a matrix and has no easy GUI implementation of setting and saving it so most users don`t know it`s even there.
Note that joints as a nodeType in Maya exist only because of IK. They use another
transformation matrix type (ever wonder why you can not freeze translate values on a joint? ) to make solving complex IK chains efficient.

Back to topic: set/assume preferred angle works great without IK

amreet
01-23-2006, 06:12 AM
i have a quick question reg set preferred angle.


i have a character which has been fully rigged up. except the fk-ik switch on the arm doesnt work properly. the elbow is bending in the wrong direction, when i rotate from the shoulder in fk mode. how do i fix this. i am using a pole vector btw.

http://img42.imageshack.us/img42/8472/arm8hu.gif

thank you
slider17

cmd
01-24-2006, 03:37 PM
HI eveybody, this is my first reply/post so be nice pls.

jgr77777 you are right, I am currently going through the same Maya 7 book "The Modeling and Animation Handbook" Your issue is on pg 347 point 7-8. Everybody is getting too technical regarding IK's, etc. You can set and assume preferred angles on just a bone setup, check the Maya help regarding this, or do a little test like I did.

What I have found is when you use the Context Sensitive Marking Menu (RMB-click) to set the Preferred angle, if you check what the script editor is saying, is wrong, it automatically says....... joint -e -spa -ch; AND joint -e -apa -ch;____ even if you just RMB-click on the Hip joint and dont select..... SET PA or Assume PA.

So when the book tells us, 8) TEST rotations "....select the shoulders on both arms and notice the effect of the mirrored local rotation axis. When you done, select the Hips joint, then RMB-click and select Assume Preferred Angle.

It's Set PA on the rotated arms and assumes it straight afterwards, therefore it does'nt get back to the original pose. Hence your needing to undo a couple of times.

Use the main menu bar to SET and ASSUME. It works...

I might be wrong, but I think there is an error in the Context Sensitive Marking Menu script.


Hope this helps

CMD

Mikademius
01-25-2006, 11:03 AM
I haven't read the whole thread, but this is a quote from the mail I just sent cmd


...And as you say, maya sets these even if you're just clicking there and exit without selecting one of them. I also tried to find the script that creates the menu without luck ... so far ( I have to work :P ) But if you don't want to set preffered angle why do you rightClick the joint in the first place? To buypass this you could create a shelfButton with the lines:

string $selected[] = `ls -sl`;

for ($sel in $selected)
{
joint -e -spa -ch $sel;
joint -e -apa -ch $sel;
}

I guess Maya has a bug here because she executes the edits as yuo click and release... Not handy if you ask me....

cmd
01-25-2006, 01:30 PM
My Sincerest apologies, Mikademius...for the misunderstanding

I stumbled upon this problem in the same way jgr77777 did, by going through the afore mentioned book, step by step.

I tried to SET and ASUMME through the main menu, and then with the CSMM, while watching what the script editor said. This is when I found the discrepancy.

If you select, Set Prefered Angle, through the context sensitive marking menu (CSMM) it still executes both commands in the script editor, the same applies to when, you Assume Prefered Angle, or just click and release without selecting an option.

Thanks for your imput Mikademius, Maya must have a BUG here....

Until such time as someone can help resolving this matter, it's best just to go via the Main menu bar.

Cheers
CMD

Mikademius
01-26-2006, 02:06 PM
You could create a new markup meny for this though. Since I can't fint the one Maya uses. Just drag the commands I wrote on the previous page onto a shelf and create a new markup menu where you drag these. And don't forget to tell Alias via the new helpmenu :)

CGTalk Moderation
01-26-2006, 02:06 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.