Finding the right choice of constraint, problem with child of constraint

Ok, so I’ve got a model which contains as a component a mechanical arm onboard a vehicle. And I need to animate this arm picking things up from one spot on the vehicle and transferring them to elsewhere on the vehicle, while the vehicle is moving through its surroundings. The arm has to move to grab an object, grab with a gripper, then move the object with the arm, then place the object down, open the gripper and let the object go, before moving the arm again while the object stays in it’s new location.

This would look like a job for parenting done via the “child of” constraint, with the constraint being applied to the objects being moved and the arm set as parent, then the strength slider at the bottom of the constraintrising over the course of one frame from 0 to 1 during pickup then dropping back to 0 once the object is put down.

BUT this doesn’t work well when the vehicle body, a parent of the arm’s baseplate object, is moving around, translation and rotation. Rather the object with the constraint start drifting around strangely, something related to the which frame the origins are being constrained in. And often an object doesn’t properly maintain it’s transform (the way you can ctrl+p Parent (keep transform) and also keep transform when unparenting, with permanent parents rather than constraints) when going from a 0 influence to the full 1 influence of the constraint, this would seem to only be workable if the origin was at global 0,0,0 before and after the influence changes.

Has anyone got suggestions of how to handle this, or how to achieve the same sort of effect without this constraint, maybe with another constraint which doesn’t have problems with being done in the moving reference frame onboard the vehicle.
Thanks

How is your arm rigged?

I would use an IK chain in an armature, then have a place-holder bone in this armature to attach objects, then use a Child Of to transfer “Parenting” of the objects. I normally use other fixed bones, on or off the vehicle to locate the objects when not on the arm, and use Copy Location Cons, if needed, to make sure the objects go to the right location, i.e. the place-holder bones.

Without seeing your rig, it is difficult to answer precisely, so post a rig and I will look at it!

Cheers, Clock.

The arm is rigged solely with constriants.

I cannot see your PC from here, so I have no idea what your model looks like… Why use constraints when Blender has Armatures for complex structure rigging?

Cheers, Clock.

Clockmender, right now this is a work in progress project. So the model I’m talking about isn’t fully build yet. I know I’m going to face this problem because of experience I’ve had in other files*. Right now the file I talk of doesn’t exist, sorry, I had thought that this would be a common problem with a well known solution someone could just tell me of. I hadn’t realised this was something that needed me to post the file for help. I’ll come back to this when I can show examples.

  • One of those experiences I had was with another file where I had an object (call it “a”) on which I used the “child of” constraint to make “a” a child of “b”. But also in the outliner there was a parent structure of f(e(c(a())),d(b)), or should I say:

“f” had children “e” and “d”, “e” itself had “c” as a child and “a” was a child of “c”. While “d” itself had “b” as a child.

Then I moved “f” in global space and “a” and “b” came out of alignment in a very strange way. In the end I got around that by realising that in that older model I could dispense with the need for the “child of” constraint and could set things up to only use children of the outliner form. But in the file I’ve now begun work upon I know I won’t be able to get out of the issue like that and will need a way to handle the parenting properly because of the dynamic nature of picking up and putting down, the influence on a constraint can shift easily during the course of an animation timeline, the order of outliner parenting can’t. So I thought I’d ask now for tips in the hope of getting an answer before I get stuck at that point.

Thanks

You could do it like this:


Note the red cube has its origin at 0,0,0

Bend file: pickup-1.blend (501 KB)

Just press Play to see the animation.

Cheers, Clock. :slight_smile:

EDIT: It doesn’t matter if there are other objects parented to the cube, but it should be at 0,0,0 or it will jump all over the place. Try not to mix Child Of’s and CTRL+P parents if you can avoid it, stick to Child Of’s. Also, avoid cyclic dependancy loops where things end up being children of themselves through a circuitous route.

Thanks for the example file.