|10-19-2012, 08:48 PM||#1|
Join Date: Oct 2012
NEWB: Joint Rotation Problem in Maya 2011
I'm new to CG Talk and relatively new to skinning so I could use all the help I can get (as well as a high tolerance level). So here' the rundown of my problem:
I have a weapon that I am skinning but have found that this happens when I rotate the top "Spin" joint that will be used to spin the barrel when firing.
This is how the joints are set up:
And here is a visual on the painted weights and their relative influences:
I need to figure out what I'm doing wrong or a work around to let the barrel be able to spin while sill being affected by the "Pivot" joint that will be dynamically rotated through code. Thanks!
|10-29-2012, 03:17 AM||#2|
Join Date: Feb 2002
Make sure your "spin" joint it the only joint affecting the barrel. It looks like both 'pivot' and 'spin' are affecting those points. Spin will inherit the motion from pivot automatically because it is a child of pivot, so you don't need to paint the points to both.
Here's an explanation if you are interested:
By default the skinCluster moves point by point, working on one at a time, so for simplicitly just think of a single vertex. The skincluster works by transforming that vertex by every joint it is weighted to as if it was weighted 100%. If it is weighted to two joints it will come up with two possible point positions, one for each joint. It doesn't care about weights at this time.
Then, to figure out the final result, it draws a straight line between the two new positions it just calculated. The final blended position will be somewhere on that line between the two possible results. Where it ends up on that line depends on the skin weights. So if it is weighted to both joints by 50% it will end up exactly halfway on that line. If it is 75% to one joint and 25% to the other it will be 3/4th of the way down the line. This is known as 'linear' interpolation, with 'linear' referring to that line.
Rotation like your barrel can make cylinders appear to shrink because one joint is telling it to be on one side of the barrel, and the other joint is telling it to be on the other side of the barrel via a 180 degree rotation. If you draw a straight line between those points it goes right through the middle of the barrel, so if your point is weighted 50% to each it will end up right in the middle. This is known as a "candy wrapper" because when it happens on a character's arm it looks like the ends of one of these .
In your case the solution is to simply weight to a single joint, spin. On a deforming character where it has to blend either more joints are used to "ease" the blend in, or 'quaternion' blending is used instead of 'linear', which is a type of rotation blending that does not draw a straight line.
Last edited by BenBarker : 10-29-2012 at 03:20 AM.
|10-29-2012, 03:17 AM||#3|
Join Date: Sep 2003
Thread automatically closed
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.
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
|Thread Closed share thread|