Join EJ Hassenfratz for an in-depth discussion in this video Using position, scale, and rotation constraints to place a logo element, part of Mograph Techniques: Rigging a Robot Arm in CINEMA 4D.
With most of our robot arm animation already key framed, the only thing left to do to complete our animation is opening the claw and dropping the excog element into its correct place in this pixel factory logo. Now to place in this excog into the logo manually would involve making many duplicate versions of this object, adjusting the opacity of some of them, and then actually key framing the excog. But I am going to show you a way that is much easier and where you only need to set just a couple key frames.
So, instead of the manual way, we are going to use another constraint tag, much like the constraint tag we had applied to our Main null here that has the aim. Or you're going to use a contraint tag PSR option that you can see right here. So, what we're going to do is we have this end position here that we hid that is actually the final resting spot for our logo. I'm going to hide that again. And we also have our start position, which is actually in the grasp of the claw.
So, what we need to do is create yet another copy of our cog. And this is going to be the one that we'll call the morphing one. ' because basically this one, I'm going to move this at the bottom here, this one is going to be morphing between these two positions. So it's going to morph between the position of the cog in the claw's grasp, so this one, and then morphing into this final resting spot cog right there.
So we're going to do this morphing by using a constraint tag. So right click on your Morph cog here. Go to Character Tags > Constraint, and we're going to constrain the position, scale, and rotation. So click on that button there. Go to our PSR tab. And I'm actually going to go into our hierarchy here, and I'm going to turn off the visibility of our excog in here. And this'll be, let's rename this the start position, and I'll hide this by clicking on the stoplights here. So let's go back to our cogmore.
So we have our start position, our end position in their correct places in our scene, we just have them hidden right now. And we're going to use this null to pass and morph between those two states and positions. So let's go into our constraint tag options here. And we can set a target. Now our first target is going to be this start position. So we're going to drag our excog start into the target. And you'll see that our cog snaps right into the position of that excog start.
So this is exactly what we're wanting. So now we have to add a second target by clicking the Add button. And if I scroll down, we now have the option to set a second target. And our second target is going to be this end position. So if I drag that in there, you'll now see our cog kind of moved a bit and that's because our weight is 100% up. If I bring the weight down, you can see our cog morph back into that start position.
Now watch what happens when I bring down the weight of the start position and bring up the weight of the N position. You'll see that the cogs snaps to the end position where this end position cog is. So, all we have to do is animate between these two states. So we're going to start by setting a key frame, let's see, just around frame 50, and we'll set a key frame on our weight.
And we'll also set a key frame on our weight on the end target position here. And then we'll go to frame 65 and we'll bring down the weight to 0%, set a key frame, and then we'll bring up the weight on our end position and hit another key frame. Now if we scrub through, you'll see that this cog is morphing between these two states. So it's moving between the start state and the end state.
So it's morphing between the position of this object right here, the start position, and it's morphing to the end position or our object that was placed where it should be in our logo. So now, we have this nice morphing where it kind of looks like our robot arm is placing the object in the logo. So we can maybe adjust some of these key frames to make it look a little bit more seamless. Let's just move our constraint key frames up just slightly.
We'll see how that looks. And then, the last thing we have to do is actually animate our claw opening. 'because, right now, get rid of the timeline here, right now, our cog is just going through the geometry of our claw fingers here. So we can fix that by animating our claw opening, and that is under our Claw Control here. Now let's set a key frame where our claw opening will start.
And we'll scrub to, say, frame 60, and have our claw open fully. So let's scrub here. Now you can see that our claw opens as it places the logo and pulls away and leaves. So we actually set another key frame and close the claw as it's coming towards the camera again, or just leave it partially open. So let's set another key frame here. I'm going to actually bring this key frame out a little here.
So now we have our claw coming in, our robot arm coming in, our claw opening. And as it's opening, our PSR constraint is morphing between these two weights, or these two target states, target positions and rotations. And our robot arm is now leaving, and then our claw is then closing as it leaves the scene. So let's just hit Play. So we can actually just do a little bit of fine tuning.
Let's make our claw open a little bit faster. So, let's go to our timeline again. Just want to make sure that we don't have any intersecting of geometry here, even though it's very hard to see, but just want to make sure. So, let's bring our, see, here's our claw open and close. Let's bring this up a little bit so our claw opens much quicker. And so we don't have any trouble with geometry intersecting. All right. Play this one last time. Looking good.
Using multiple targets and weight controls in the constraint PSR options are excellent ways to kind of morph between objects' positions that you set in your scene, and morph between those states. To do this manually, the process would be much more complex and time consuming.
- Setting up the model
- Creating an IK chain
- Adding animation controls
- Constraining position, scale, and rotation
- Adding depth of field and motion blur in After Effects