Rigging- Add twist to a follow curve setup without using normals of curve?

   3881   13   0
User Avatar
Member
355 posts
Joined: Nov. 2015
Offline
Hello, How can I add a twist to a follow curve IK setup without using the curve normals? using the normals of the curve gives me unpredictable bad results (flipping, unwanted twisting and all other kinds of crap). The attached file has a setup I'd like to add a twist to, any help pointing me in the right direction is very welcome. Thanks much.

The twist should be distributed along the chain.
Edited by traileverse - April 26, 2018 06:17:26

Attachments:
ik_spine_setup_test_05.hip (485.9 KB)

hou.f*ckatdskmaya().forever()
User Avatar
Member
1755 posts
Joined: March 2014
Offline
Check the other thread of “ours” where I just posted, maybe it helps.
On a side note, I'm not sure why you want to build the spine with a single mid ctrl. As you'll read in my post, there's a need to have a smooth transition between the rotation values of the upper vertebrae and the lower ones. Or maybe you're not trying to create a spine?
User Avatar
Member
402 posts
Joined: June 2014
Offline
Hi,

In order to add support for extreme twists you need to equip your path with a couple of point attributes: @twist and @initial_twist. Generally the latter can just be initialised to 0.

The problem in the setup you posted is that if you animate the ‘mid_ctrl’ for example, the twist attribute isn't being set on the curve, as this is tied to the “rz” parameter on the ‘pathcv2’. In order to fix this, you'd need to set the twist attribute from the ‘mid_ctrl’ rz. I cracked open the pathcv2 and made this change on the ‘twist’ node, and switched the IK solver back to ‘Best Guess’, it should behave as you expect now.

I'm not a big fan of the default Path/Path CV setup you get from the shelf tools - main reasons being
a) because the setup relies on non-uniform scales, we can't clean transforms without getting really wonky viewport handles and
b) we haven't got the option of ‘breaking’ the tangents on the curve.
c) solving things like you're initial problem involves cracking open multiple locked hdas.

I've also attached an hda that I threw together that creates a paired-down version of my go-to setup, so see if there's anything of interest in there.

Cheers,
Henry

Attachments:
spline_from_cvs.hda (42.4 KB)
ik_spine_setup_test_05.hip (509.2 KB)
spline_maker_demo.gif (999.8 KB)

Henry Dean
User Avatar
Member
1755 posts
Joined: March 2014
Offline
Problem is, I don't think you can have a very good control over the shape of the spine with a single mid ctrl. But, it could work for other uses I guess.

edit: the setup in your attached file (test_05) doesn't seem to behave too nicely
Edited by anon_user_89151269 - April 26, 2018 10:17:54
User Avatar
Member
355 posts
Joined: Nov. 2015
Offline
Thanks much for response guys, I went through the files (thanks for the asset @friedasparagus) and I'm still wonky on this whole follow curve thing. The closest I think I've seen is from this link bone_thing [www.sidefx.com] but there is no mid control here. I want a mid control (maybe I'm pushing the follow curve chains to an extreme it wasn't built for, I don't know, usually in animation you probably wouldn't push it that far for anatomically correct animation especially with the fact that you'll have hip and chest and the COG(center of gravity) control to do most of the heavy lifting in bending the character).

If this is the best behaviour I can get from the follow curve system with a mid control, that's very disappointing. And the way everything is locked off in the kinCHOP for follow curve feels very counter Houdini. I feel limited in my options which is a weird feeling when it comes to Houdini (I usually have too many options which is good).

We want to build an entire rigging and animation pipeline using Houdini for an animated series and this problem has me scratching my head hard. @friedasparagus the file you edited for me is what I want but it breaks as seen in the gif, also the whole chain has flipped, notice the broad side of the box is no longer facing in z-axis. But thanks again guys for all the help, I'll try other solutions hopefully something will work.
Edited by traileverse - April 26, 2018 22:07:41

Attachments:
follow_curve_ik_is_stressing.gif (6.8 MB)

hou.f*ckatdskmaya().forever()
User Avatar
Member
1755 posts
Joined: March 2014
Offline
If you go to the solver and set “no normals” no flipping will occur. Of course, then you won't have bone twisting if the chest ctrl rotates. But this is expected. The Maya spine you showcased in the “ik madness” thread, I don't think it had curve normal considerations, i.e. “no normals” H equivalent. I might be wrong, but you can confirm or contradict my supposition. Make sure you are comparing apples to apples or your disappointment will be caused by unmanaged expectations.
I agree that the solver being a black-box is not ideal, but until we know why it is like this we can't really bemoan this fact. Ultimately, the deeper you go you reach a level of “black-boxiness” with everything, sooner or later.
Edited by anon_user_89151269 - April 27, 2018 02:37:32
User Avatar
Member
355 posts
Joined: Nov. 2015
Offline
inhiding
If you go to the solver and set “no normals” no flipping will occur. Of course, then you won't have bone twisting if the chest ctrl rotates. But this is expected. The Maya spine you showcased in the “ik madness” thread, I don't think it had curve normal considerations, i.e. “no normals” H equivalent. I might be wrong, but you can confirm or contradict my supposition. Make sure you are comparing apples to apples or your disappointment will be caused by unmanaged expectations.
I agree that the solver being a black-box is not ideal, but until we know why it is like this we can't really bemoan this fact. Ultimately, the deeper you go you reach a level of “black-boxiness” with everything, sooner or later.

Yeh this setup is simple stuff in Maya, throw some clusters on a curve and for twist use the spline IK's twist attribute or turn on the advanced twist and set up some aim up objects and you have a basic working setup. The biggest problem you get there with that is your limited to a 180-degree rotation which can also be easily fixed. But certainly, I don't remember getting these weird flipping and twisting and glitching madness in any pose, the joints just adjust really well to the curve. But, like you said, I don't know why Houdini's follow curve stuff behaves like this, I'm hoping its just my lack of knowledge as to how the tool works.
hou.f*ckatdskmaya().forever()
User Avatar
Member
1755 posts
Joined: March 2014
Offline
If you can, please share that Maya setup; I don't have/know Maya, but I know someone that hopefully is knowledgeable about this stuff.

I'm inclined to think you haven't payed sufficient attention on an easy to overlook but important aspect - the way curve normals behave. The attached image is from Henry's test_05 scene, posed similarly to what you were doing. Notice the normals: they're all over the place. So you either find a way to take over their orientation, or use a simpler setup where the curve has just a few CVs like here [www.sidefx.com], which can control the curves normals by simply moving/rotating the said CVs.

Have you checked the setup I've attached there? I'm curios to hear what objections you have for that setup.

edit: @webmaster: the link to post feature is broken.

@miccetro: it's the 3rd post from the bottom the one that I'm referring to
Edited by anon_user_89151269 - April 27, 2018 06:21:23

Attachments:
test_05.jpg (264.5 KB)

User Avatar
Member
1755 posts
Joined: March 2014
Offline
Oh, one more thing - if you think something's really broken, file a RFE with explanations and scene files. It will be sorted out sooner or later.
User Avatar
Member
402 posts
Joined: June 2014
Offline
Hey,

yeah, sorry I only patched up the twist problem on the mid_ctrl. There are a few other things that'll be causing you issues.

Firstly, the parent constraint probably isn't quite what you were looking for here - the rotations produced when doing anything in ry are giving you some nasty flipping before we even begin.

In the curve object, the polyframe is what was throwing you're normals for a loop when you pull the chest down below the hips, the normals should be set by the path cvs. Secondly, the resample SOP doesn't peform slerping of normal attributes, (I have submitted this as an RFE) so this will also be generating some strange results, so this is best avoided in the context of this particular setup.

The last thing in the curve object is that the InverseKIN chop only plays nicely (in regards to the twist attribute) with bezier curves. So if you want twist, at the moment you need to make sure that your output curve in a bezier. All of these are things that the default Path setup does for us, and alas there is not much room for deviation.

I've made these fixes in the scene file and also added a different constraint network in the mid_aim_util object which which feels slightly better to me (although it's not 100%), but there's lots of different approaches to be taken here.

This is certainly an area which needs some TLC in houdini. So hopefully we'll see some updates soon
Edited by friedasparagus - April 27, 2018 06:44:32

Attachments:
ik_spine_setup_test_06.hip (532.8 KB)

Henry Dean
User Avatar
Member
1755 posts
Joined: March 2014
Offline
In my setup, setting “NURBS curve” at output_curve doesn't make a difference. Or it might actually behave better, not sure.

I've open your test_06 file and I don't think I understand what you want to showcase there…
Edited by anon_user_89151269 - April 27, 2018 06:38:36
User Avatar
Member
402 posts
Joined: June 2014
Offline
Gah, borked the constraint on the chain_root. Try the download link again and the mesh should be there. The NURBs curve won't make any difference apart from the @twist handling.
Henry Dean
User Avatar
Member
1755 posts
Joined: March 2014
Offline
Very nice! Not what I'd use as a spine for a realistic (non-cartoon) humanoid/creature due to the lost stiffness at the ends, but it might be exactly what miccetro's looking for.
User Avatar
Member
1755 posts
Joined: March 2014
Offline
Removing the 2nd and the penultimate point of the curve might solve my issue with it. Will try it.
  • Quick Links