PDA

View Full Version : How to pickup rotation values



prospector
06-01-2011, 06:45 AM
With an IK system the rotational values of any bone in chain are showing up in the little panel on the bottom left of layout
But

Nothing is showing up in the graph editor

That means LW IS getting the info from somewhere, so what do I need to turn on in order to see that info in the graph editor?
Short of baking all the keys (which then show in editor)

RebelHill
06-01-2011, 07:17 AM
Nothing... baking the keys is the only way.

You can also add motion baker to the IK controlled items, set to extra channels, and graph editor will then have additional "AfterIK" channels for the items, but again, the keys shown are the result of the bake... its just that the bake is happening on these extra channels rather than the actual motion control channels.

What is it you're trying to do?

prospector
06-01-2011, 08:48 AM
trying to drive objects by the value of a rotating bone in IK chain

4dartist
06-01-2011, 08:49 AM
If you use an expression will it take the IK rotation value or the FK? Just curious.

prospector
06-01-2011, 09:16 AM
If you use an expression will it take the IK rotation value or the FK?
Have no idea, expressions make me ill :)

got the extra channels working but scaling is way off and no matter what number I try in the little scale setting box I can't et it to go from 0 to 100 on the object movement, if that makes sence

RebelHill
06-01-2011, 09:34 AM
Expressions will take any value that apply before expressions (so basically anything u can see the curve of in graph editor, be that a keyed curve, or a driven curve with its half shade line)... Ik evaluates after expressions, so the only way to get an expression to drive something based on IK is to use the extra channel bake method to provide a channel set that expressions can reference... the downside to this is that it slows things down a LOT.

You can also use some of the motion modifiers in afterIK time too, for instance follower has an after IK switch, so doe DP nodemotion. The expression motion mod also has an after Ik switch, but this only works for LScript type expressions, not regular math ones.

Now obv you're trying to get the IK to drive something else, but how, and in what fashion?

U say you're having problems "scaling"... I take you mean scaling the values... so you're trying to remap? Take say an IK controlled bone, and as it moves from say0-68deg, have something else move between 0-100??

If this is the case you can do it 2 ways... either use DP nodemotion to drive the item with the IK item as the input filtered through a gradient to remap the values (all set to after IK ofc)... or you can use the mapRange expression type (Which is an LS command) in the expression motion modifier applied to the driven item...

mapRange([Driver.Channel],DriverMin,DriverMax,DrivenMin,DrivenMax)

Where DriverMin/Max are numbers of the min max values which will translate into the Driven Items min/max values.

So for instance...

mapRange([Null.Position.X],-1,30,0,145)

will read the X position of an item named "Null" as as it travels from -1m to 30m on that axis, will cause the driven item's channel (that the expression is applied to) to move from a value of 0 to 145.

The Wizzard
06-01-2011, 09:40 AM
Hi Rebel,

I'm working with Prospector on this too... Just given him the MapRange setup he needs too :)

The ExtraIK baker is baking our keys in the Graphedit and we can apply these to 'Other' channels (Morphs, etc...) I'm testing with a Null rotation. However, this ExtraIK channel is only read AFTER the baker is turned off in the the motions panel...

I guess coz as it baking the keys this channel can't be read :(

RebelHill
06-01-2011, 09:48 AM
Shouldnt be the case... ti should read "live" so as changes are made to the IK it rebakes and updates the given items. It does ofc only bake on frame advance, so if you're skipping frames, or looking at values accurring later in time than where the scrubber is, then those won't have updated... but it shouldnt need to be turned off for the values to reference.

The Wizzard
06-01-2011, 09:57 AM
Edit to my last

In my setup, the Null won't rotate... HOWEVER! if this ExtraIK channel is applied to a MORPH! then the baker can be left on... D'OH!

RebelHill
06-01-2011, 10:04 AM
Here...

In this case the forearm bone is being extra channel baked, and the sphere null is moving between 0-1m on Y as the forearm bone bends between 0-60deg... whole thing runs live, so long as both the motion baker, and expression are turned on.

The Wizzard
06-01-2011, 10:17 AM
Here...

In this case the forearm bone is being extra channel baked, and the sphere null is moving between 0-1m on Y as the forearm bone bends between 0-60deg... whole thing runs live, so long as both the motion baker, and expression are turned on.

Thanks, got your example scene... All works live except if i keyframe the Goal null then the baker fails to move Driven null :(

RebelHill
06-01-2011, 10:38 AM
I say.... you're right. How odd is that. But no clue why...

Tbh i havent really used this method for anything in a good while, its always been slow, and there's other ways to do similar things with constraints, which I prefer. Or if we're talking driving morfs, then joint morf plus works after IK anyhow, so I never bother using this kind of method to drive those.

The Wizzard
06-01-2011, 10:54 AM
I say.... you're right. How odd is that. But no clue why...

Tbh i havent really used this method for anything in a good while, its always been slow, and there's other ways to do similar things with constraints, which I prefer. Or if we're talking driving morfs, then joint morf plus works after IK anyhow, so I never bother using this kind of method to drive those.

The most annoying thing is that instead controlling a Null (Which no work :) ) If we us it to control a Morph which Prospector wants... everything's is AOK

We're now on to sequencing a set of 4 morphs so as this 'Arm' bends these morphs pop in one after. I've setup a cycler for that by using a Master channel to invert the values to positives... and all is good.

Gonna have a look at the Joint Morph + now... Thanks for the advice.

The Wizzard
06-01-2011, 11:23 AM
Joint Morph Plus!!!!

YAY - What a great deformer. Thanks Rebel for the info ;)

prospector
06-01-2011, 11:55 AM
yea..thanks
I think he was gonna start me on expressions :eek:
That was close:D

The Wizzard
06-01-2011, 12:18 PM
I think he was gonna start me on expressions :eek:

:agree:

Castius
06-01-2011, 12:31 PM
Relativity reads IK values properly with AfterIK on.

PS.
I wonder if there is still a bug report on the expression modifier not working with AfterIK on?