Creating a Cartoon Character in Cineversity Brand ID: Setting up Eye Blink Controller with Xpresso

Photo of EJ Hassenfratz

Instructor EJ Hassenfratz

Share this video
  • Duration: 05:43
  • Views: 1255
  • Made with Release: 18
  • Works with Release: 18 and greater

In this video we used simple primitive geometry and a Sweep Object to create basic facial features for our octopus characters.

In this video we used a few Spheres, a Symmetry Object, and a Sweep Object to create basic facial features for our octopus characters.

Less...

Transcript

In this video we're going to finish off our character rig by creating a simple XPresso set up to control and animate our octopus eyes blinking. So I have two sets of geometry for the eyes, the Open Eyes which we created previously, and then if I go ahead and just turn off the Visible in Renderer for that Null it's going to hide it from our visibility in the viewport. And if I go to my Left Eye Closed geometry and just turn that On, to be visible in the editor, you can see that it's just a simple capsule with a bend deformer on it. So what I want to do is set up a rig where I can easily toggle between the visibility of the Open Eye and the Closed Eye geometry. So just like we created custom User Data to help us rig up our 2D vector field for our mouth rig, we're going to create another User Data option that will be a simple switch that'll allow us to make our eyes blink. So let's click on our Eye Null and add the User Data here. So to do that I'm going to go to User Data, Add User Data. And again delete the default data that's in there and then I'm going to add a Group. Now remember a Group is basically a tab in our options here. And I'm just going to rename this Blink Control. And then I'll add some Data to go underneath that tab, just like we have data in this basic tab. We want to make a switch just like this Icon Color that has a checkbox. And to do that we'll just create a data type that is a Boolean and you'll see that we now have a checkbox as our default value. So let's go ahead and rename this Blink and then we can go to the example to see what this will look like. So you see we just have a checkbox here and we can just hit OK. So our default value will be unchecked. And now we have this Blink Control with this checkbox toggle. So a boolean is a data type that's either true or false or in our case, this checkbox will determine whether an option is on or off. So we need this to control the visibility being either On or Off in the Editor and the Renderer. So to set that User Data up to control those options on both our Left Eye Closed and our Open Eye on our Left Eye, we'll create a simple XPresso set up to link all those options together. Now, XPresso is basically CINEMA 4D's version of After Effects Expressions. To create some XPresso, we'll right-click on our Null here, go to CINEMA 4D Tags and choose XPresso. And this will bring up our XPresso Editor. Now what we're going to do is drag and drop that Null that we have the User Data applied to. Go to its output port and go to Blink Control, you can see our custom User Data's already in here. So that is our checkbox. Next we'll bring in our Left Eye Open, drag it in here. And then in the import side of our node, we'll go to Basic Properties, bring in Visible in Editor and Visible in Renderer. So now we can just feed that checkbox On or Off, boolean output and feed that into our Visible in Editor and Visible in Renderer. You can see that we now have our Left Eye Open because the checkbox is Off. So that's all we need to do for our Left Open Eye. Now we can bring in the Left Eye Closed and bring that into our XPresso Editor. And the same thing, bring in the Visible in Editor and Visible in Renderer. Now, we want to make a connection between the Blink output checkbox and the Left Eye Close, but since this is feeding in a value of false and turning on the Left Open Eye, we actually need to feed in the opposite in to the Left Eye Closed. So we need to negate whatever's being fed into the Left Open Eye, and we can do this by right-clicking and creating an actual Negate Node. So in XPresso Calculate we have Negate and in the Negate node we have a data type, and since we're dealing with booleans, true or false statements or on or off statements, we need to choose Boole as the data type being passed through this node. So now I can go and link that Blink output checkbox into the input of the Negate, and then output the opposite of whatever's being fed into the Open Eye. So now if we go into our Blink Control and check it on. We should have the Blink turning off the Open Eye. And since this is off this will actually turn on the Left Eye Closed because it's going through the Negate option. So now we have a simple checkbox that controls the visibility of our Open Eye and our Closed Eye. So now we can click and drag this Blink text and drag it into our viewport, right-click on it, say Lock to View, and Show Always. And now I can click off of that Eye null and now I can easily just click on the text of this little hut element to turn it on and off. So now if I want to keyframe this, I simply just click on the little circle here, so it turns red, go forward a frame, click on the Eyes Blink text, make another keyframe here and then I have my blinking. So super easy. All we have to do now is set up that same workflow for the Right Open Eye and the Right Closed Eye. And we'll have our Eye Blink Controls. So by rigging our Blink Controls with a simple XPresso setup we now have a fully rigged character ready for animating.
Resume Auto-Scroll?