Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
In order to get our shark's jaws and mouth to move together, we need to establish a relationship between the Morph slider and the rotation of the lower jaw. The rotation of the lower jaw is going to be driven by the Morph slider. Now in order to do that we're going to use something called XPresso. XPresso is the node-based language for creating expressions inside of CINEMA 4D. An expression is really just a relationship that's been established between two or more parameters. Now the shark file that we have here has the Morph tag on it. I'm going to click on the Morph tag and just adjust this slider open and closed.
You can se that we already have that morph working pretty well. Now what I want to do is create relationship between this open slider here and the rotation of the lower gum object. So let's move the Morph slider to the open position and select the gum object for the lower jaw. Then I'm going to use the Rotate tool and just rotate it around the z-axis. As I rotate it open here, you can see that it doesn't quite rotate into the position that I'd like. So I'm going to modify the rotation axis for this gum symmetry object.
So in order to do that let's undo and get our rotation back to the starting point. Then I'm going to switch to Axis mode. Let's move to the four way view and then using the Move tool, I'm going to drag this only on the x-axis here in the Front view. As I move that back, I'm going to move it back to a point where I think that the jaw ought to rotate from and we'll probably have to do this couple of times, just to the see if we got it right. So I'll move it back to about there, then I'll switch out of Axis mode. That's very important. And grab the Rotation tool. Now in that Front view, I'm going to click outside the yellow band, just to rotate it down.
You can se that my jaw now rotates from a very different position. It rotates in a more natural way for a shark, and then I can move it back and forth here and it really looks convincing from a directions standpoint. Let's rotate it down and kind of tuck it into the geometry here. Now let's look at that from the Perspective view. And I think that's okay from a rotation standpoint. The next in the process is to establish relationship between the Morph slider and the rotation of that jaw. So right-click on the gums lower Symmetry object and add something called an XPresso tag.
And in the XPresso Editor here that pops up when I add the XPresso tag, you can see the XPresso tag looks like kind of a flowchart here. When you double-click on that it brings you to the XPresso Editor. Now the XPresso Editor wants to have some nodes in it and so we're going to need a node for the Morph tag. So I'd grab the Morph tag drag it right into the XPresso Editor. Then we're going have to have a node for the gums lower Symmetry object, so I drag that object into the XPresso Editors as well and I get another node. Now the blue side represents the input side; the red side represents the output side.
Now I want have the open slider for the morph drive the rotation for the lower Symmetry object. So let's start by clicking on the red side and going to tag Properties and finding the word open. This word open relates to that open slider that we have in there. The next thing we need to do is to get the rotation parameter for the lower Symmetry object. So I'm going to click on the blue area here and go to Coordinates > Rotation > Rotation Bank. Now I know what's the bank, because it's the blue band on my jaw object and you can see its going to rotate around the z-axis and I know that's rotation bank.
So now I've got these two parameters here and what I'd like to do is to create a relationship between this slider and this rotation. But the slider value is expressed in percentages. The rotation of the lower jaw object, the gum Symmetry object, is expressed in degrees. So what we have to do is create a translator between the percentage values of the slider and the rotation degree values of the lower symmetry object. So the node that you used to do that is something called Range Mapper. I'll right-click here in the XPresso Editor and add a new node, XPresso, and then under Calculate > Range Mapper.
In a Range Mapper when you click on the node here, you see the parameters for the Range Mapper show up in the Attribute Manager. Under the Node property, we're going to specify what types of values we're going to be using in this. So the Input Range is the value that's going to come in from the Morph tag and so that's percentages. So I move that, pull down to Percent. The Output Range is the value we'd like to send out to the lower symmetry object. So I'm going to click on that one and go Degrees. So we're going to convert percentages into degrees. The Parameter option is the actual values that are going to be contained in this node.
So the input value here is going to get controlled by this relationship between these two red and blue dots. Now the Input Lower and Upper are the ranges that you'd like the values to react to. So this is the range of the slider that's going to be coming in. So our Morph tag slider, if I click on that, it goes from 0 to 100%. So on my Range Mapper node, I want to have the Input Upper and Lower set to 0 and 100% and they already are by default. Now the Rotation value that I would like to have come out of this node are the values that will affect the gum lower symmetry object.
So the Output Lower is the state that I'd like the rotation object to be when the slider is at 0% and so when the mouth is closed, I'd like my symmetry object to be at 0 degrees. If I move the slider to zero and rotate my symmetry object bank to zero, you see that the mouth looks closed. So on my Range Mapper the Output Lower at 0 degrees is just fine. Now the Output Upper is what I'd like the rotation of the gums lower Symmetry object to be when the slider is at 100%. So let's move the slider to 100% and then rotate the bank on our gums lower Symmetry object.
Now I'm just going to scrub that value, I'm clicking and dragging up on the scrubber. And rotate it down until it just intersects the geometry. I think that's pretty good. That's about 40 degrees. So now, I go back to my Range Mapper and I put in the Output Upper 40. Now I'm ready to establish my relationship between these objects. The relationship has not been established yet and in order to do that I have to drag a little line from the red dot to the blue dot. So you just click on the red dot and drag across to the blue and you see a little green line form. That indicates it's okay to let go.
When I let go, I now have a red line that connects these two nodes. I'll click on the red dot from the output of the Range Mapper to the input of the Rotation _ B and now I have a line that connects those nodes. Now when I go to the slider on the shark, when I drag that slider left and right, you see the shark mouth rotates open and closed. Now the next step in this process is going to be to tweak the morph a little bit. Sometimes when you create this morph relationship, you need to make some adjustments. As I open the slider, open and closed, you can see that my jaw and when it's open is not quite lined up with the lips on the shark morph.
And so rather than move the jaw element I'm going to adjust the morph. So if I go above from Morph tag and click on Edit mode and select the open slider, I can just take the points that make up the geometry. I click on the actual shark body object and take these points and just move them and tuck them in just little bit and here we go. I'll take the other points on the outside here and bring those in just a bit. Let's say I go to the Side view, grab those points there, and then I just use the Scale tool, T on the keyboard, and just scale those in just a bit and you can see by making those scale adjustments, you can easily tweak the morph.
Now when I go back to the slider and switch on the Animate mode. That gives me a much better relationship between the teeth. Now those guys are actually moving outside the morph. That's a normal behavior. The morph when it moves from position to position does not rotate. It moves in a straight line and so you have to tweak your tag repeatedly just to make sure that things aren't passing in and out of one another. So the process is really straightforward and simple but it takes a little bit of fine-tuning to get it right. Our shark can now open and close its mouth. The model is really looking great and it's ready for animation.
Get unlimited access to all courses for just $25/month.Become a member
107 Video lessons · 32841 Viewers
94 Video lessons · 22749 Viewers
78 Video lessons · 9003 Viewers
83 Video lessons · 8298 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.