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.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.
bicep and forearm roll
Re: bicep and forearm roll
-
- Posts: 91
- Joined: 19 Dec 2012, 18:16
Re: bicep and forearm roll
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?
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?
-
- Posts: 91
- Joined: 19 Dec 2012, 18:16
Re: bicep and forearm roll
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/
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/
Re: bicep and forearm roll
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.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.
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.
-
- Posts: 91
- Joined: 19 Dec 2012, 18:16
Re: bicep and forearm roll
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 ) ?
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 ) ?
Re: bicep and forearm roll
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.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 ) ?
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.
-
- Posts: 91
- Joined: 19 Dec 2012, 18:16
Re: bicep and forearm roll
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.
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.
Re: bicep and forearm roll
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: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?
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 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.
-
- Posts: 91
- Joined: 19 Dec 2012, 18:16
Re: bicep and forearm roll
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.
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.
-
- Posts: 91
- Joined: 19 Dec 2012, 18:16
Re: bicep and forearm roll
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.
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.
-
- Posts: 91
- Joined: 19 Dec 2012, 18:16
Re: bicep and forearm roll
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.
Who is online
Users browsing this forum: No registered users and 29 guests