KineFX Attaching a piston to an IK chain

   2156   3   0
User Avatar
Member
21 posts
Joined: Sept. 2018
Offline
Any type of piston locked to a mechanical arm:


Goal:
Moving elements are in an IK chain.
1. Lock piston bone/geometry to 'arm' bones in IK chain.
2. Constrain min/max length of root-tip.

This is part of what I have now:


I can get individual constraints to work fine, but I'm having trouble getting the full package to function. I managed something hacky by using a wrangle to lock the piston's bones to their position relative to the 'arm' primitive uv coordinates, but it was messy and I couldn't get the bound geometry to behave. I added another joint to the middle of the piston (as well as removing the bones entirely and relying on the joins only) as a lookat but again I'm unsure of the order of operations and end up with wacky joint or bound geometry behavior.

I completed the Fur Dude KineFX tutorials which are great for organics but less helpful here. I watched Rok Andic excellent videos on constraints [www.youtube.com]. I read the constraints page in the documentation [www.sidefx.com] and dug through the example files for constraints. Jeff has a masterclass and I tried to use the full body IK setup he demonstrates toward the end but had little success. CGWiki has a KineFX page that goes really in depth on the transform order but I haven't managed to wrap my head around it enough to complete the setup. The only search result is for an obj style free-floating piston from 2018 and this request for a mechanical rigging series [www.sidefx.com] but I don't think anything has been made yet. I'm sure all the information I need is available but I can't get my brain to put it in order.

Any advice would be appreciated.

Hip with my setups from attached.
Edited by vandoornjerry - Nov. 12, 2021 06:24:37

Attachments:
pist.jpg (37.5 KB)
12332r.jpg (117.6 KB)
321233.jpg (65.3 KB)
L_pist_Rig.hiplc (227.9 KB)

User Avatar
Member
21 posts
Joined: Sept. 2018
Offline
Here's the hacky approach I'm almost too embarrassed to post, but at least it shows the desired functionality. It takes the rest position of the bones and forces the points back into position after the IK, then rotates them. I did manage to get the geometry to somewhat behave, but it breaks down if the tip of the IK chain is moved in Z since I'm forcing the top piston back into position without considering the rotation of the bone. I could hack that again but at that point I'm not even sure it's a rig anymore and I want to understand what I'm doing.

I could also hack it to enforce range of motion on the tip but again, I'd learn nothing.


GFYCAT because I don't know how to embed gifs [gfycat.com]
Edited by vandoornjerry - Nov. 12, 2021 16:57:52

Attachments:
L_pist_Rig_hack.hiplc (257.9 KB)

User Avatar
Member
1850 posts
Joined: May 2006
Offline
Here's one way using the ikchains sop. I'm sure there's a more elegant method using rig vops, but this should work well enough here, and seems to work for all orientations.

Edited by mestela - Nov. 13, 2021 07:19:35

Attachments:
ik_pistons.hip (178.0 KB)
ik_rig_piston.gif (546.8 KB)

http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
21 posts
Joined: Sept. 2018
Offline
That's super helpful I appreciate it!

Edit: Slightly upset I didn't think of this... I did end up trying a rig vop but it's hardly any more elegant and even gets slower. Thanks again!
Edited by vandoornjerry - Nov. 13, 2021 16:42:40
  • Quick Links