Jump to content

IK/FK troubles


michael

Recommended Posts

since I don't have any work to do I've been playing around with a little rig - trying some maya tricks/workflows in Houdini...and I've run into what, IMO, is a pretty serious issue with the IK/FX blend (assuming I'm using it correctly <_< )

the attached file is a simple leg rig

it's using a control object for the IK at the ankle and some custom contols for the ball_lift, toe_wiggle etc...

it seems to work just fine, it's by no means final, but it's doing it's job...

the problem comes when I try to do a IK/FK blend...

it seems that to do a blend you must have keys on the IK Goal...but in this setup the goal never gets keyed because it's just a child in the network and just goes along with the heirarchy...so while you can key the Blend on the IK it doesn't behave like it should because there are no keys on the rotations of the bones....additionally...when the Blend is at "0" you can't even key the rotations manually - says they are overridden by chops....

so a few questions I guess...

1) am I just a dumbass and doing this all wrong?

1a) and if so what?

2) is this kind of setup just not a good idea in Houdini? - abstracting the controls like this...in maya you never let an animator touch the real controls...

3) is there a way to set a key on a channel by setting a key on a different channel?...not just a reference - but an actual key?

4) where are the Houdini riggers out there? and why aren't they spilling their guts here? :P

thanks

ps - even though this is just a rough test, if anyone has suggestions/comments about what kind of controls etc that they like to see in a rig, please speak up...I'm not a character animator so I'd like to know what people like in a rig.....otherwise I'll end up building something the 'works' but that no one can use.

rig.hipnc

Link to comment
Share on other sites

Ah yes, I see you got caught in a bit of the H5.5 vs H6 bone setup differences. If you dive into your KIN_Chops network, turn off all the orange flags and you will be able to key the bone rotates after that. They were necessary in H5.5 but are NOT needed (nor desired) in H6. You might then ask the question as to how does the bone know what IK rotations to use? The answer lies in the new Kinematic Solver bone parameter in second page which gives it the CHOP to take data from. Clearly IK/FK blending can't work if you can't key the bone rotates. :)

Once I did this, everything seems to work for me. There's no reason for requiring keys on the IK goal. The only thing you need to be careful of is to set it up so that when you turn off IK blending, to turn it off in ALL three of the chops. This will then turn off all control in the entire leg. If you don't do this, then you will end up getting weird behaviour (go ahead, try it out :) ).

Since you're doing this in H6, the best way is to encapsulate your entire character into a custom optype and put all your controls there. The pose handle will work just dandy on your bone chain and will key the outer control parameters. Basically when you key using handles, they will follow ch() references. So you must promote all the parameters to the upper level that you want to be keyable (which you want to anyways for the animators).

The web forum thing is a relatively new thing for Houdini users I would say. I think most of them are still (only) on the mailing list.

Link to comment
Share on other sites

ah...thanks edward...

I was wondering why I would sometimes get an infinite recursion error in chops...I noticed that the export flags were getting turned off, so I would turn them on again :)

turn it off in ALL three of the chops. This will then turn off all control in the entire leg. If you don't do this, then you will end up getting weird behaviour (go ahead, try it out  ).

yeah...the foot goes a bit funky :)

Since you're doing this in H6, the best way is to encapsulate your entire character into a custom optype and put all your controls there. The pose handle will work just dandy on your bone chain and will key the outer control parameters. Basically when you key using handles, they will follow ch() references. So you must promote all the parameters to the upper level that you want to be keyable (which you want to anyways for the animators).

yeah, that's what I'd planned...just want to get things working first - still learning the way Houdini does things before I add any more layers of complexity ;)

Link to comment
Share on other sites

You can pretty much take whatever the Bones (plural) tool gives you as canon. That tool will always create the newest bones setup. Old setups will still load but if you want to use the new features, you should run the "boneconvert" hscript command to bring them up to date (as much as it knows how to).

Just thinking off the top of my head now. One way you might try to do is to create your custom object optype off the bat and then dive down and create your character inside there. Whenever you want to create a control parameter, you drag 'n drop the parameter inside into the outer level. You pretty much have to drag all the bone rotate parameters that you want to be able to use FK on up one level. If you need a control parameter to reference, create it at the upper level and reference it from inside. To organize things, make use of multiple folders. It's also handy if you group your objects inside the custom optype network and then provide buttons in the upper level to hide/show the different groups.

This way, you're ever dealing with one custom optype. You might even want to create your character in it's own OTL file for now to simplify things. The idea is by the time you're done, you will have one custom optype that you can drop down for your character.

Link to comment
Share on other sites

thanks again edward...

the setup that I'm trying to recreate in Houdini is based on the setup we use at work...

very roughly - it uses proxy objects (very low rez versions of the final geometry) for FK and IK controls, so I plan on the animator not touching the bones at all, just the proxy geometry. Some of the proxy objects, palms and feet, have custom attributes (maya is really good at this) for controling FK/IK switching, finger controls, toe_wiggle, ball_lift etc...

in the end what the animator sees in the viewport is just a low rez version of the character, and everything he or she is able to select is animatable...everything else is hidden and animator proof...lol

I think Houdini has all the tools to do this...it's just a question of finding them and figuring out how they work :)

there are some things that seem a bit strange - like the Pose State...I'm not really sure what this is for - the only thing I've noticed about it is that you can filter what the user can select....but from my point of view, if I don't want the user selecting something then I hide it or make it unselectable...or threaten the animator in the way only a TD can :P

also...workflow wise...in maya when a number of objects are selected you can use the channel editor (or the viewport tools) to type in a value - rotation in X lets say - and all the objects will get this value - then if you want to change the value you can just re-type it...Houdini allows this kind of behavior in the viewport, but not by using the parameters...this makes things a bit slower sometimes - like animating tails etc...

re OTLs :

I'm really looking forward to the new additions to the user guide in this area (if you need beta-readers I have time on my hands :rolleyes: ) - I've used maya's referencing quite a bit and can see how OTLs can give that kind of functionality, plus a lot more...

Link to comment
Share on other sites

The way OTLs work, you're not allowed to change anything inside the custom optype instance unless you've explicitly enabled it with "Allow Editing of Contents" in the tile's right-mouse menu. When you're creating it, this is turned on by default. However, if you put down a new instance of it, this will be off by default. So this means that your animators are shielded from everything that they shouldn't touch.

Everything that an animator needs should be a parameter in your custom optype. So instead of having custom parameters on your controller objects, you simply add more parameters in your custom optype. If you need quick access to them when you select the object, I think you can make use of the Select Script parameter (Misc page of all object parameters). Perhaps something like "opset -C on ..; opparm .. stdswitcher( 2 ); opparm .. std_switcher_0( 2 )" where std_switcher_0 is your swticher parm name under Controls and the 2 in brackets for it is the page you want to switch to.

Buttons in your optype parameters to create the required channel groups is also good practice.

More Pose tool help can be obtained from the question mark in the viewer controls toolbar when you're in it. Basically, it's meant to work on bones.

As for animating tails, just box select all your bones using the transform tool and rotate.

Link to comment
Share on other sites

thanks for the OTL tips :)

about the tail animation - that was just a common eg...

what I was really refering to was the dificulty in transforming a bunch of selected objects at the same time...to the same value

given this situation, box selecting doesn't reveal the difference in the rotations of the objects

start.jpg

if I want all the boxes to have a 30 deg rotation and I use the viewport it takes a while to get the numbers I want - even with the ladder - and I still got a tiny error

in_viewport.jpg

you have to go in manually and change the oddball object - easy to spot in this eg - but most of the time the values will be really small

manual_result.jpg

maya has an 'attribute spreadsheet' which lists, in spreadsheet form ;) , all the attributes of a selected object(s)...everything from transforms to render properties...and you can change things pretty fast by drag selecting the cells etc...does Houdini have something like this? I thought the geometry spreadsheet might do it but it doesn't look like it...

oh and does anyone have any ideas about this?

3) is there a way to set a key on a channel by setting a key on a different channel?...not just a reference - but an actual key?

Link to comment
Share on other sites

Right, you can't currently do this in a UI way to set multiple parameters at the same time. I think the closest thing right now is to use the table mode in the channel editor.

As for the reference part, I think I've answered it two times now but in very unclear ways. :) If you use custom parameters that are referenced from inside custom optypes, this problem doesn't occur. You can select the object from outside and the actual OTL parameter will get keyed when you hit k in the viewport to key the handle because it follows ch() expressions.

Link to comment
Share on other sites

ah....

yeah...I wasn't quite getting it :rolleyes:

I was thinking that a parameter that was referencing another value would just hold the value at a frame - but not be keyed at that frame...

Houdini is like an Ogre...er...I mean onion :)

Link to comment
Share on other sites

Ah, I see your misunderstanding. Expressions in Houdini only exist in channel segments (or key if you only have 1 in a channel). This is actually a very powerful concept. Let's say you had 4 keys in your channel. So now you have 3 channel segments. If you highlight the middle segment in the graph editor, you'll see the channel type at the button which probably says cubic() by default. Note that you can type *any expression* in this field. If you want a sine wave in this segment, you type in some variation of sin($F). If you want to override this with the corresponding segment from CHOPs, you use a chop() expression. If you want to reference another channel, you use a ch() expression. I don't know other packages very well, but I don't think I've seen a different package that can define ranges for expressions with such ease.

Since an expression must exist at the minimal as a single segment, this complicated the task of getting rid of the last key so that it was much more animator friendly. However, since a segment evaluates past it's ends when there are no other segments, we can simply create a zero length segment to represent the expression. And this is what gets done when you simply type in a single expression in an parameter.

Hope that clears some things up.

Link to comment
Share on other sites

The way OTLs work, you're not allowed to change anything inside the custom optype instance unless you've explicitly enabled it with "Allow Editing of Contents" in the tile's right-mouse menu. When you're creating it, this is turned on by default.

Stupid question. :blink: How do you do this when you have a menu parameter or a toggle parameter? When its unlocked a callback script and opparm work but when its locked it doesn't. I could unlock the OTL but that kinda defeats the purpose. Are menus and toggles not to be used or am I missing something very obvious?

jim.

Link to comment
Share on other sites

Seems to work for me. I don't know the exact details but I think it's along the lines of something like temporarily allow editing and then immediately disable it again after that. Best to ask on the Side Effects forum.

Edit: Actually, I just noticed that menus and toggles have a speciall callback syntax that probably helps in H6. So I have no idea how it works.

Link to comment
Share on other sites

I don't know the exact details but I think it's along the lines of something like temporarily allow editing and then immediately disable it again after that. Best to ask on the Side Effects forum.

Edit: Actually, I just noticed that menus and toggles have a speciall callback syntax that probably helps in H6. So I have no idea how it works.

Hehe, Thanks Edward. :D

I'll poke around on the Sidefx forums when I get back. One last silly question. :P When ever I install a new OTL it always puts some sort of dialog in $HFS/houdini/config/Dialogs/whatever_type. The file says it its a "Automatically generated PSI dialog". Is this ok? I thought we were suppose to treat $HFS as read only. But if Houdini does it I guess its ok. :P

jim.

Link to comment
Share on other sites

Yes, those are ok. They're generated for the parameter dialogs of the custom optypes. They're ok to delete as they will be regenerated if they don't exist. Think of them as a caching mechanism.

If you want some hackish type of fun, you can remove the first line and modify it to have custom layouts.

Link to comment
Share on other sites

...threadjackers... ;)

well I got my IK/FK spine working...chop() works really well...I had a lot of trouble at first (I misspelled 'spine' a few times <_< ) but all is good now...

I'll try to move the test setup into a real rig and post if if anyone is interested

grrr...I think any app that takes scripts or expressions should have a spell-checker...lol...

Link to comment
Share on other sites

I'm interested in seeing your spine. Show me yours and I'll show you mine;) I did one last week, but it was a monumental pain in the butt. My setup had had a Follow curve that scaled the bones to fit the spline, and an IK Arm that limited the stretch of the spline, and I messed with using FK to make fine adjustments to the spine, but it breaks easily and the setup is very convoluted. I didn't use any CHOPs though other than the standard IK CHOPs. Alot of expressions and relative references, though, and alot of kludges. I want to try to clean it up and then I'll post it if you want to see it.

Link to comment
Share on other sites

yeah, lets trade :)

expressions are giving me a lot of grief...why didn't I learn this stuff when I was young :(

ah HA!...weeeee....working now :)

just as a side note: can someone give me a place to look for a way to use the distance between things to determine what channel drives another....er, I mean....

lets say you have 2 objs:

a 5 CV curve at the origin going up in Y with xforms on each CV

and a circle on the XZ plane at the origin

what I'd like to do is drive the translates of the xforms with the circle, but only when the circle is within a given distance from one of the CVs (plus a bit of falloff)...so as it stands the circle is at the origin and so is closest to CV[0], so any translation of the circle will translate CV[0], but if I move the circle up in Y it gets closer to CV[1] and so it's influence will be on CV[1] and not on CV[0]....

Link to comment
Share on other sites

I'm on my way out the door, but I did something like this with my spine (no falloff though). In order to do find the offset (find the distance) you'll have to look into writing expressions using origin and or origin offset. When I did it, I actually need two origins (nulls) to get it working right, one at the world origin and one at the characters pelvis, although I'm sure I could have done it using just the world 0,0,0 as the origin if I had put some thought into it when I was building the rig. Anyway, I'm walking out the door right now, so check this post for info about origin and origin offset.

http://odforce.net/forum/index.php?act=ST&...7cb08eaa735310f

I was asking about blending, but I found it very usefull when manipulating the spline for the spine using SOP xforms as well.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...