bicep and forearm roll

Issues concerning rigging & Face Robot...
User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia
Contact:

Re: bicep and forearm roll

Post by Mathaeus » 09 Jan 2014, 22:54

missingkey wrote:Hi Mathaeus, thanks for replying.

I'll have to read, and re-read what your wrote a few times to grasp what your saying. it's a little over my head, but I am somewhat familar with swapping between global space and local space in ICE.

I ended up being able to simply rotate the Y and Z vectors around the X axis of the IK solution. I'm now stuck on how to drive that.

I figured out incrementing the rotation per roll divisions using an fcurve, so now I just have one scalar value that controls the twist throughout.

The problem I'm having, which seems to be quite common. is how to drive the that scalar value to get my twisting automatically.

Any rotation values used, obviously ends up with flipping. Victor Vinyals has a really nice setup for this in maya, but I'm unable to find any information about the technique. Most things talk about using extra constraints, upVectors, and helper objects, it starts to blur the technique when trying to apply it in ICE with transform matrices and vectors.
Of course, 'global' and 'local' SRT is completely relative here. Just want say how, maybe, it's easier to narrow it down to first executed rotation - that is , if you do that roll division first, then apply the parent transform after, it should not flip. In picture, I did this on point cloud ( as my ancient SI does not support ICE kine) - but I believe it's pretty explanatory. So, rotation of selected null, relative to rotation of unselected one , drives the X rotation of particles.

Image

missingkey
Posts: 91
Joined: 19 Dec 2012, 18:16

Re: bicep and forearm roll

Post by missingkey » 09 Jan 2014, 23:12

Okay I follow that. I don't think I'm going about it as elegant as you did, but I'm more or less getting the same result.

It doesn't flip anything If I drive the rotation directly. But when I try to create the scalar that drives it from rotation values, that causes the flip. I can only assume it's because the way those euler rotation values are calculated. Does that make sense? Maybe your giving me the answer and I'm not understanding you right?
Attachments
rotateVector_RollDivisions.png

missingkey
Posts: 91
Joined: 19 Dec 2012, 18:16

Re: bicep and forearm roll

Post by missingkey » 10 Jan 2014, 00:06

Well I've got something working using the "get angle between" node. I'm honestly still trying to understand what I did. I'm getting the values I need now to drive the rotation. however, at some points where those values should be negative, their actually positive. Since it's always gonna give me a positive number for the angle between two vectors - makes sense really, but how to get around that.


edit: Okay so I'm now getting the angle between the root vectorZ and the Bicep Bone Vectorz giving me the scalar value I need to drive the rotations of the roll divisions. I'm still having problem with always receiving +values though.


this article puts my troubles into words. Comparing the Hand heigh to the shoulder height is interesting, and just may be the condition I need. But how to account for the up vector?

http://www.fie.us/rolls-and-other-rolls/

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia
Contact:

Re: bicep and forearm roll

Post by Mathaeus » 10 Jan 2014, 02:54

missingkey wrote:I'm getting the values I need now to drive the rotation. however, at some points where those values should be negative, their actually positive. Since it's always gonna give me a positive number for the angle between two vectors - makes sense really, but how to get around that.
well I think I've already answered in my first post: you need an additional, orthogonal vector ( orthogonal to first testing vector) if angle to that second vector is more than 90, then... This gives you 360 angle.

By the way, if standard Softimage kinematics is still an option, you can set the "indicator" null: parent it to object where you want to apply transform, pose constraint it to object of interest. Read and apply local transform of this "indicator" to anything you want. Just set the zero constant expression on SRT parameters, to prevent local angles to go in some insane value.

missingkey
Posts: 91
Joined: 19 Dec 2012, 18:16

Re: bicep and forearm roll

Post by missingkey » 10 Jan 2014, 18:14

ah sorry, you did answer that in your first post ;)

So right now, X is going down the bone, Y is pointed at my upvector, and Z is the cross product of the X&Y.

the root is aligned to the first bone, and I'm getting the angle between the bicep Z vector, and the root Z vector. So the condiiton would be: If angleBetween( BicepZ, RootY ) > 90, take the angleBetween( BicepZ, RootZ ), negate it, add 180. Otherwise, use the angleBetween( BicepZ, RootZ ) ?
Attachments
BicepRoll180.png
BicepRoll180_2.png

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia
Contact:

Re: bicep and forearm roll

Post by Mathaeus » 10 Jan 2014, 21:01

missingkey wrote:ah sorry, you did answer that in your first post ;)

So right now, X is going down the bone, Y is pointed at my upvector, and Z is the cross product of the X&Y.

the root is aligned to the first bone, and I'm getting the angle between the bicep Z vector, and the root Z vector. So the condiiton would be: If angleBetween( BicepZ, RootY ) > 90, take the angleBetween( BicepZ, RootZ ), negate it, add 180. Otherwise, use the angleBetween( BicepZ, RootZ ) ?
Honestly I don't have these things 'engraved' in my mind. Here in pic is my helper map. This one just goes from 0 to 360.

Image

BTW I know you know , angle can be calculated directly from vector . That's a bunch of nodes in bottom group. If so, there is no chance for anything to flip. In the past, I've used similar method a lot, to get orientation of bicep, then to modulate the corrective shape keys on shoulder. (Using a bit extended trick with classic Si constraint - where null is constrained with offset of 1, to bicep bone. Having parent in place of chain root, constrained by orientation to chest bone) To get it linear from arc, it's arc tangent2 or two arc tangents for 2d, arc cosine for 1 d, or cosine or sinus for a kind of smooth step like interpolation.

missingkey
Posts: 91
Joined: 19 Dec 2012, 18:16

Re: bicep and forearm roll

Post by missingkey » 10 Jan 2014, 21:50

Okay I think Im understanding you right. Your picture basically illustrates the nature of my flipping around it's X axis. I should be getting 360 both directions right?

I'm really not sure how to apply what's in the bottom of your ICE tree, here's my weak attempt, it doesn't work. I'd really like to understand it, and get it working. The vector going into your normalize node, is just a 2d vector. what would I use in my case. The bicep bones X vector? Sorry if I'm being a bit thick, lol.
Attachments
ArcTan2.png

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia
Contact:

Re: bicep and forearm roll

Post by Mathaeus » 10 Jan 2014, 22:42

missingkey wrote:Okay I think Im understanding you right. Your picture basically illustrates the nature of my flipping around it's X axis. I should be getting 360 both directions right?
well, no... this is just something I had before. I posted it more as an example how you can create a visual helper. If you're not sure, find some way to visualize it.
missingkey wrote:I'm really not sure how to apply what's in the bottom of your ICE tree, here's my weak attempt, it doesn't work. I'd really like to understand it, and get it working. The vector going into your normalize node, is just a 2d vector. what would I use in my case. The bicep bones X vector? Sorry if I'm being a bit thick, lol.
For arc tan2 input, I think it will be much easier figure out, if you use the result of 'rotate vector', while this rotation is "relative" to something - that is, narrowed down to "local" rotation.

missingkey
Posts: 91
Joined: 19 Dec 2012, 18:16

Re: bicep and forearm roll

Post by missingkey » 10 Jan 2014, 23:38

I think the arcTan2 setup may be a bit over my head right now. I'm still trying to figure out comparing the two angles. I'm actually not sure, will this only give me a total of 360 degrees before flipping. So -180, and +180 values going into my roll divisions? or should I be able to get -360 and +360 values?

here's where my flipping happens currently. So if my upVector translations defaults at ( 4, 0, -4 ) the flipping happens when I move the upvector between ( 4, 1, 4 ) & ( 4, -1, 4 ) - if that makes sense.
Attachments
1.png
2.png
3.png

missingkey
Posts: 91
Joined: 19 Dec 2012, 18:16

Re: bicep and forearm roll

Post by missingkey » 12 Jan 2014, 20:33

Okay, I think I understand this now. What I have is right (like how you suggested) It's just a little different from your nodes in that it gives me -180 to +180, instead of 0 to 360. which is perfect.

What I'd really like to figure out now, is how to get -360 to +360 twist before flipping. I was under the impression I'd be able to do this with quaternions, But It's not easy for me to figure out.

missingkey
Posts: 91
Joined: 19 Dec 2012, 18:16

Re: bicep and forearm roll

Post by missingkey » 13 Jan 2014, 19:31

Well the previous setup i thought was working well, was actually giving some popping nonsense. Using the dot products and the arctan2 of those seemed to stop any popping, and everything is nice and smooth.
Attachments
ArcTan2.png

Post Reply

Who is online

Users browsing this forum: No registered users and 29 guests