Pneumatic cylinder/piston door help

Hello all. I’ve been trying to rig this block out of a roof hatch with those pneumatic hinge cylinder things and not having much luck. Found a few tutorials that were close but I don’t know enough to tack on the other bones and stuff I think need.

Also I hope to bring this into unreal and the progress I’ve made I’m pretty sure won’t even work as constraints don’t carry over to ue4? So ideally a rig that also works in ue4 would be great.

Some gifs of what I’m working with and have so far. The pneumatic piston works as expected when posing but stuck on attaching the hinged roof part.


It looks like you have the basis of it? Maybe? There are a few problems (incl maybe a dependency loop.)

Here’s what I’d do, for the meshes you have. Start with bones Lid, BluePiston, PinkPiston. Lid bone is at origin of object, PinkPiston is at the position of the bone you’re manipulating in your animation. No constraints.

Parent PinkPiston to Lid. Leave Lid and BluePiston unparented (or parented to a different, shared root bone). Duplicate PinkPiston to PP2. Give BluePiston a damped track constraint targeting PP2, default settings, then apply to rest pose (ctrl a menu). Give PinkPiston a damped track constraint targeting Blue Piston, then apply to rest pose.

Locked track would be better than damped track here, at least in principle, but for your axes it shouldn’t matter (the damped track will act like a locked track anyways), and you’d need to be careful about your bone rolls if using a locked track.

Constraints won’t export to UE but animations will. So the typical way to do things here is to use constraints to create an animation in Blender, then bake the animation to visual keyframes/deforms and use that in UE.

1 Like

Hi,

Here a new possibility to rig a piston ==> With Constraint
I rarely use bones to do this…

Already a long time ago, I gave this example…
Hoping that it would make it easier to solve your problem.

Piston/shock rigging

1 Like

Hey @bandages Thanks for the reply, unfortunately you’ve completely lost me lol. Rigging, constraints, all that stuff is pretty new to me. I’m assuming the “Lid, Bluepiston, PinkPiston” are bones but not sure if they’re separate or if thats actually the objects or what. I’m not sure how to add a constraint to a single bone, so you mean each bone is it’s own armature? Or PP2 which is PinkPiston2(?) should be the only separate armature? Sorry!

Thought I was getting somewhere but once I did the constraint from BluePiston to PP2 the bones moved all over and the rest pose thing didn’t change anything. Also yes exporting animations makes perfect sense, thanks. Added the .blend, not really sure how to capture whats going on and where I’m getting stuck.


Hatch_Rig.blend (274.4 KB)

Hi,

You should look at what I propose using Constraints…

I simply took over your scene:
- delete all the Bones.
- Transform Pivot Point = Median point (don’t leave it on 3D Cursor)

  • define the rotation point of each Hatch at their base.
    - On this rotation point, add an Empty (Plain Axe)
    - Parent each Hatch with its Empty (CTRL+P - Object (Keep Transform))
    - On each Hatch object, put a Damped Track Constraint, with the Empty of the opposite Hatch as target.

… et voilà . . . :grinning:

I am attaching your modified Blend file for your inspiration.
Hatch_Rig_Constraint.blend (268.5 KB)

1 Like

@FreeAccess Ahh much appreciated. In response to your previous post I still was hung up on how to attach the piston to the hatch lid, this empty version is very helpful, thank you! I’m much more of a visual learner and this makes it click. The empties are so simple, as usual I was overthinking, making it all more complicated than it needed to be. Got a little hung up on the lid parenting, but believe I parent only the Top Empty to the Lid instead of the Empty and the Top Piston, seems to be working now :slight_smile:

Thanks again!

Here’s what I was saying:

Hatch_Rig1.blend (267.2 KB)

Bones can have individual constraints, which are “bone constraints”, accessible in a different tab from object constraints, but only while in pose mode with a bone selected.

But sounds like you’ve got this worked out anyways.

1 Like