View Full Version : Shoulder deformations
quyeno 08-05-2003, 05:43 PM hi guys,
i'm trying to setup the shoulder of my character at the moment and was wondering what the best approach would be to get correct deformation on all degrees of rotation.
i think my weights for the shoulder are optimised enough and was thinking either about adding influnce objects for problem areas and SDK the transforms to tweak the areas that are collapsing. also i was thinking about creating a shoulder 'muscle' geo and use it as an influence object with weights of 1 for the relevant verts and then create blendshapes which will be SDK to the shoulder rotations.
which mehtod do you think is best? can you see any problems with those two methods? if anyone knows a better method i would really like to hear.
i would try out both methods but time is short and i haven't got to much time to experiment.
|
|
Akkalis
08-05-2003, 06:30 PM
Aside from rigging methods of /making/ a shoulder work, what does your mesh look like to begin with? I might be nuts, but I've found that can make the differance. If you're stuck with bad topology, or even good topology that is being difficult, influence objects should work in a pinch, its the quickest way to fix deformation problems I think. Skinning can also be a big part of it, also do you have joints for the scapulas? If so, using them to lift the arm up above 90 degrees can get you out of a lot of problems with the actual shoulders...
Post a picture of what you are working with maybe?
quyeno
08-05-2003, 08:42 PM
here are some pictures. i have used a clavical bone in my setup. the main problem is when the arm is raised forward and up.
quyeno
08-05-2003, 08:46 PM
heres a pic
quyeno
08-05-2003, 08:49 PM
heres the problem
quyeno
08-05-2003, 08:52 PM
here it is from the front. sorry about posting so many times.
goosh
08-05-2003, 09:41 PM
Hey quyeno
the topology doesn't look bad... to me it looks like your problem is your skeleton.
Your shoulder bone seems to be too far out.
Also, when you rotate the shoulder along the arm bone, you get the pinching, which is nothing new. To work with it you have a few options... most of them a little bit complex.
You can build a set of 2 or 3 bones that are between the shoulder and the elbow. and instead of rotating the shoulder bone, you rotate these bones.this way you gradually rotate the arm.
Another option is to attach an influence object to the shoulder, and counter rotate it (with expressions or SDK) so that it brings the skin back to where it's supposed to be.
There are other techniques that get more and more complex, but you should be able to get pretty good results with just these two
Good luck
Goosh
Akkalis
08-05-2003, 09:46 PM
Okay, what looks to me like your biggest problem is you're moving the model as it really can't move. In your pictures, the deltoid is actually facing the BACK of the body. Try it with your own arm, see if you can rotate that way; if you can, consult a doctor. Basically, the majority of your rotation along the bones doesn't come from the shoulder, it comes from the forarm and bicept area twisting some (as well as the shoulder, some).
Basically, I don't think you have an issue, as far as model and rig goes, I think its more understanding the movement of the specific joint. If that's all your problem is, simply don't do it and move on. I wish I knew your axis setup so I could use XYZ terms, but basically, when you are testing to see if your rig works, rotate in ONLY one direction at a time. You've got two rotations there, and trying to paint fix them, or set up a driven key is going to be painful. One trick that works, is actually set some with say X, -X rotations, Y, -Y rotations, and Z, -Z rotations and then you can scrub the timeline as you paint. Its fast, and it lets you test quickly. Ones it can rotation in each of those directions fairly nicely, THEN try combining some rotations and see if you still get the wierdness. But the deltoids (and I do think its deltoids, if I am wrong, tell me, but I mean the muscle ontop of your arm).
Anyway, I hope thats helpful, and on the right track, if I am not, there is likely someone more professional prowling the forms that can point out a better answer.
Also, what are you working on that time is so short? Inventing the wheel as you drive sucks, trust me.
Akkalis
08-05-2003, 09:48 PM
Bah, Goosh types faster then me. :/
goosh
08-05-2003, 11:05 PM
:thumbsup:
But yeah yeah.. what Akkalis said! :)
quyeno
08-05-2003, 11:37 PM
thanks for your help guys. i'm trying to do a pose to pose non-simulated muscle technique for my MSc project and only have a couple of weeks left.
the only major problem is when i raise the arm above 40 degrees from 6 o'clock. i guess i can do what goosh said and just get what i need, so i guess i cna try and get the shoulder looking good so i can pose it in the classic bicep pose.
with regards to the tow possible solution i suggested above which one do you think is better?
i really appreciate your help.
cheers
quyeno
Akkalis
08-05-2003, 11:41 PM
Yeah, that always sucks, try rotating the scapula down, I find I can often get something a bit cleaner if I use the scapula, just lowers the shoulders some, and means I have to rotate the shoulder less...
pauldryzen
08-11-2003, 10:50 AM
Hi guyeno,
if written a small script to solve the shoulder problem.
It works quite well, you can give it a try.
Some things you need to know:
1. Your joints must be oriented in Y (best way to do this is Jason Schleifers Script for orienting joints (jsOrientJoint)
2. You MUST have zero rotations on your selected bone, otherwise the script wonīt work properly.
3. Donīt bind the original uperarm joint to your mesh, use only the new ones!
have fun
Greetz Paul
// build new joints script (c) Paul Dreisen 2003
// mailto: pauldryzen@web.de
// Version 0.2
/* This scripts builds new joints from the selected joint to its first child.
I use this script for character setup (upper arm, lower arm, upper leg...).
how to: First, drag the whole script to your shelf and press the new button, if everything is right... you should see a new window :-)
Now select the joint, type the new name in the empty textfield of the window.
Choose the number of joints
Now press the "GO" button and see what happens ;-)
LIMITATIONS: you cannot choose the the orientation axis (the default is: YXZ), should be added in the next version
The selected joint MUST have zero rotations!
History: V0.1: first version
V0.2: fixed the number of joints problem, added an extraAttribute (inRotateY) to the selected joint, for more flexibility during the setup process.
(see comment lines for more information)
*/
// start of Script
if ( `window -exists jointMaker` )
deleteUI -window jointMaker;
window -title "add Joints UI" -wh 320 104 -sizeable 0 jointMaker;
$form = `formLayout -nd 100`;
$col = `columnLayout -adj true`;
textFieldGrp -label "Enter new joint name" -cw 2 160 jointName; intFieldGrp -nf 1 -label "how many Joints?" -v1 8 joints;
setParent $form;
$b1 = `button -label "Go" -command "addJointsCallback"`;
$b2 = `button -label "Close" -command "deleteUI jointMaker"`;
formLayout -edit
-attachForm $col "top" 5
-attachForm $col "left" 5
-attachForm $col "right" 5
-attachNone $col "bottom"
-attachNone $b1 "top"
-attachForm $b1 "left" 5
-attachPosition $b1 "right" 2 50
-attachForm $b1 "bottom" 5
-attachNone $b2 "top"
-attachPosition $b2 "left" 2 50
-attachForm $b2 "right" 5
-attachForm $b2 "bottom" 5
$form;
showWindow jointMaker;
global proc addJointsCallback()
{
string $jointName = `textFieldGrp -q -text jointName`; int $number = `intFieldGrp -q -v1 joints`;
string $sel[0] = `ls -sl`;
string $child[0];
string $nJoint[];
// add an extra attribute to the selected joint and connect the rotateY to the attribute (inRotateY).
// If you have an Ik-setup you can connect anything to the new attribute without having the problem that the rotations are locked
addAttr -ln inRotateY -at double -keyable true $sel;
connectAttr -f ($sel[0] +".rotateY") ($sel[0] +".inRotateY");
float $n3;
// this lists the child of the joint
$child = `listRelatives -c $sel[0]`;
// get worldPosition of the two joints
float $cvpos1[] = `xform -q -a -t -ws $sel[0]`;
float $cvpos2[] = `xform -q -a -t -ws $child[0]`;
// create the needed multiplyDivide nodes
string $multi = `shadingNode -au multiplyDivide`;
string $multi2 = `shadingNode -au multiplyDivide`;
string $multi3 = `shadingNode -au multiplyDivide`;
// settings for nodes
setAttr ($multi + ".input2Y") -1;
setAttr ($multi + ".operation") 1;
// fixed setting for the rotation divide node
setAttr ($multi2 + ".input2Y") ($number -1);
setAttr ($multi2 + ".operation") 2;
setAttr ($multi3 + ".input1Y") 1;
setAttr ($multi3 + ".input2Y") $number;
setAttr ($multi3 + ".operation") 2;
float $n3 = `getAttr ($multi3 + ".outputY")`;
// make connections
connectAttr -f ($sel[0] +".inRotateY") ($multi +".input1Y");
connectAttr -f ($sel[0] +".inRotateY") ($multi2 +".input1Y");
// create a curve to have control over the position of the new joints
string $baseCurve = `curve -d 1 -p $cvpos1[0] $cvpos1[1] $cvpos1[2] -p $cvpos2[0] $cvpos2[1] $cvpos2[2] -k 0 -k 1` ;
// create the additional joints
for ($i=0;$i<$number+1;$i++)
{
// V0.2 added this varible to have control over the curveParamter, sometimes it needs to be clamped to the value 1
float $cpara = (0 +(($n3 * ($i))));
if ($cpara<1)
{
float $posi[]=`pointOnCurve -pr $cpara -p $baseCurve`;
$nJoint[$i] = `joint -p $posi[0] $posi[1] $posi[2] -n ($jointName+"BIND_"+$i)`;
}
else // if the $cpara value is more than 1, Maya cannot query the world position and prints out 0 0 0,
// to fix this I just enter the value 1 into the $posi[] and everything works fine.
{
float $posi[]=`pointOnCurve -pr 1 -p $baseCurve`;
$nJoint[$i] = `joint -p $posi[0] $posi[1] $posi[2] -n ($jointName+"BIND_"+$i)`;
}
if ($i>0 && $i<$number+1)
{
//orient the joints (because they only get rotations in y we donīt need to take care for the x and z axis
joint -e -zso -oj yxz $nJoint[$i-1];
}
if ($i>0 && $i<$number)
{
// this connects all the new joints to the $multi2 node
connectAttr -f ($multi2 +".outputY") ($nJoint[$i] +".rotateY");
}
}
// at last connect $sel[0] rotateY to $nJoint[0], to remove the rotation in Y
connectAttr -f ($multi +".outputY") ($nJoint[0] +".rotateY");
// now parent the new joints to the selected Joint and delete the unused nodes
select $nJoint[0];
select -tgl $sel[0];
parent;
delete $baseCurve;
delete $multi3;
}
// end of script
quyeno
08-11-2003, 04:28 PM
hi pauldryzen,
wow! i'm really flattered mate, its feels really nice to know someone has gone out of their way to help, its really nice of you. i have a couple of questions though, basically what does it do exactly? i assume it adds an extra joint so i can have two joints for the shoulder, but will the new joint have any smooth skin weights when its added?
thanks
quyeno
pauldryzen
08-11-2003, 06:06 PM
Hey,
you can only use the script before you bind the geometry to the joints. Otherwise you must add the joints to your skinCluster, but this should be no problem.
What the script does... read it, it is with "online" help ;-) All the things are explained...
Your idea with a direct connection to the skinCluster is very interesting... maybe Iīll add this in a future version.
Hope this helps a bit... Iīm a little busy right now...
Greetz Paul
CGTalk Moderation
01-15-2006, 07:00 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.