Intro to XPresso in Cinema 4D

Ready to make your brain hurt a bit? Ok, so it won't be that bad. We're going to go through using XPresso step by step to build a clock rig that actually ticks on it's own in Cinema 4D. Now this may sound very specific, but by doing this exercise you'll be learning the foundations of how XPresso works that you can use to build your own custom tools to make you a faster MoGrapher.

If you have any questions, click over to the Q&A tab to post them. Other students can answer you, and we'll put our team on the case to try and get you a solution ASAP.
    • What version of C4D do you use?

    • The tutorials uses R16 but nothing covered in the video has changed in more recent versions.

    00:00:01,139(clock ticking)
    00:00:10,476(jingle music)
    00:00:18,779- Hey there, Joey here for the School of Motion.
    00:00:20,914In this lesson, we're gonna take a look
    00:00:22,568at some of the basics of Expresso in Cinema 4D.
    00:00:26,370Expresso is a very powerful tool that may not be
    00:00:29,307the easiest thing to wrap your brain around, at first,
    00:00:31,692but once you get in there and you start to understand
    00:00:34,235how to hook everything up, you'll have a very powerful
    00:00:37,128new skill at your disposal that you can use
    00:00:39,659to unleash some real power in Cinema 4D.
    00:00:42,641Don't forget to sign up for our free student account
    00:00:44,430so you can grab the project files from this lesson,
    00:00:47,055as well as assets from any other lesson on the site.
    00:00:49,755Now, let's hop in to Cinema 4D and get going.
    00:00:53,872So this is the finished version of the rig
    00:00:57,428that I'm gonna post on my website.
    00:01:01,354And if we click on the clock,
    00:01:04,004I basically have all the parts of the clock
    00:01:06,197under this null here, and I have made
    00:01:09,775some user data controls for the clock.
    00:01:13,488And I'm gonna show you guys how to do this
    00:01:14,827in this tutorial, but let's just see what the clock does
    00:01:17,921if I, I'm gonna make this project a thousand frames
    00:01:22,196so we have a little running time here.
    00:01:24,120I'm just gonna hit play and show you guys what happens.
    00:01:26,921So the second hand is ticking.
    00:01:30,375Every second it ticks one more tick.
    00:01:33,120And you may barely be able to see
    00:01:36,101that the minute hand is rotating slowly.
    00:01:37,643Basically, right now this clock is running in real time.
    00:01:41,558There are no key frames here.
    00:01:42,820This is all Expresso.
    00:01:45,439So if we click on the clock, we have some options here.
    00:01:48,623We have the time multiplier, one equals real time.
    00:01:51,931So right now this is set to one.
    00:01:53,393This clock will literally keep time,
    00:01:56,454if you set it to the current time
    00:01:58,332and you run Cinema 4D for a long time,
    00:02:00,538it will tell you the time.
    00:02:02,349So I can't imagine any scenario where you would
    00:02:05,094actually want that in a motion graphics piece.
    00:02:07,935So let's make that 100, all right?
    00:02:10,654And now let's hit play again.
    00:02:13,052And now it's going a hundred times real time.
    00:02:16,135So now you can see the minute hand
    00:02:18,171is actually moving pretty quickly,
    00:02:19,994and the hour hand is even starting to move.
    00:02:23,234And I've actually added some options here
    00:02:25,360to get rid of the jumpiness,
    00:02:27,667the ticking of the second hand,
    00:02:29,742so you could have it be a little bit smoother.
    00:02:32,633And then, I've even added a control
    00:02:34,219to get rid of the visibility of the minute hand,
    00:02:36,998sorry, of the second hand,
    00:02:38,855in case you really want to crank up the speed here.
    00:02:42,016Let's say you needed some sort of time-lapse clock.
    00:02:46,201You can crank this number up as high as you want.
    00:02:50,015And then, there's some controls to set the starting hour,
    00:02:54,887minute, and second of the clock before it starts running.
    00:02:59,601And then, this spline down here, this is actually,
    00:03:02,976if I set this back to one,
    00:03:05,608this is actually the spline that controls the animation
    00:03:11,020of the second hand.
    00:03:12,674So this motion where it kinda springs forward
    00:03:16,679and then jiggles a little bit,
    00:03:17,804that's actually created by this spline.
    00:03:19,492So Expresso is extremely powerful.
    00:03:23,902It is, I think, far more powerful
    00:03:26,523than Expressions in After Effects.
    00:03:28,875And I'm gonna show you guys how to build
    00:03:31,249most of this rig, not all of it,
    00:03:32,758because it would take too long.
    00:03:34,778So I have a copy of this clock with all of the rigging
    00:03:39,706in Expresso and everything taken off of it.
    00:03:41,618So first of all, if you've never used Expresso,
    00:03:44,521let me try and explain what it is
    00:03:47,232and how it works a little bit.
    00:03:49,392So Expresso is sort of the Cinema 4D version
    00:03:53,712of Expressions, and Cinema 4D has many, many ways
    00:03:57,481to use code and
    00:04:02,128different ways, besides key frames, to animate things.
    00:04:05,581There's Coffee, there's now Python,
    00:04:08,978and then there's Expresso,
    00:04:10,880which is probably the simplest way
    00:04:14,333of creating behaviors and things like that.
    00:04:17,641So in order to use Expresso,
    00:04:20,983you need to put an Expresso tag on an object in Cinema.
    00:04:24,898Now one thing that is very different about Expresso,
    00:04:30,501as opposed to After Effects, is that the Expresso, itself,
    00:04:34,620the nodes and behaviors you create,
    00:04:37,442they don't actually have to be applied to the object
    00:04:41,222that you want those behaviors to affect.
    00:04:43,675What I mean by that is, if I create a new null,
    00:04:47,196and this is pretty common, actually.
    00:04:49,008A lot of designers do this.
    00:04:51,044You could just call this null Expresso,
    00:04:54,678and this null doesn't do anything except
    00:04:56,624hold an Expresso tag.
    00:04:58,739So I'm gonna right-click it, go to Cinema 4D Tags,
    00:05:02,740and add this Expresso tag.
    00:05:05,766And the first thing that happens is,
    00:05:06,895this Expresso editor pops up with nothing in it.
    00:05:09,130Now we're ready to add some Expresso.
    00:05:11,504So let me close this for a second.
    00:05:14,812Within this Expresso tag, I can actually affect
    00:05:18,727any object that's in my scene, anywhere.
    00:05:22,530And this can be handy if you wanted to create
    00:05:25,061one master control for your whole scene,
    00:05:27,795and you had dozens of objects and they all needed
    00:05:30,563to react to some controls
    00:05:34,694that are manipulated within the Expresso.
    00:05:37,270You could put the Expresso tag here, just edit it here,
    00:05:40,375but actually control every object in your scene.
    00:05:43,143Now because my goal was to create a clock rig
    00:05:47,991that you could, just basically copy and paste this clock
    00:05:51,040into your scene and use it,
    00:05:53,098I actually want this tag on the clock.
    00:05:56,091And the reason is, that way if you just click on the clock
    00:06:00,434and hit copy and paste, all of the Expresso and control
    00:06:03,696will come with it.
    00:06:04,854If it was on the Expresso null,
    00:06:06,765you'd have to copy both of these,
    00:06:08,104and that just seems kinda silly.
    00:06:09,871So in this case,
    00:06:11,683it's better to have the tag right on the object.
    00:06:14,292So now we have this tag, there's nothing in it.
    00:06:16,880Now what is this?
    00:06:19,175It looks like graph paper.
    00:06:21,515The way Expresso works is very different
    00:06:24,406than Expressions in After Effects.
    00:06:26,107You don't generally type anything in.
    00:06:28,695It's all done with nodes.
    00:06:31,688You can see what those nodes are by right-clicking in here.
    00:06:36,098And if you go to New Node, there are some drop-down menus
    00:06:39,518and you can actually just drill down.
    00:06:41,734And all of these things that it's showing me
    00:06:43,773are nodes you can add.
    00:06:46,383And the nodes do basically the same things
    00:06:49,848that you can do in After Effects with Expressions.
    00:06:52,560They perform math.
    00:06:54,494They do conversions between different types of numbers.
    00:06:59,580They can store values.
    00:07:01,323You can use them for if/then behavior.
    00:07:04,260If this switch is on, do this.
    00:07:05,464If it's not, do this.
    00:07:07,117And there's a lot of, you can obviously tell,
    00:07:09,514there's a lot of things you can do.
    00:07:11,640There's also options in here in this Script menu
    00:07:14,587to actually create nodes where then,
    00:07:16,973you would go into the node and you would type in some code.
    00:07:20,798And you can actually program and get some
    00:07:22,091really, really complicated behavior with Expresso.
    00:07:26,322There's also a whole section for Thinking Particles,
    00:07:29,799and that will be another tutorial for another time,
    00:07:32,239because that is a very deep topic.
    00:07:34,625But Thinking Particles actually are controlled
    00:07:37,021entirely through Expresso.
    00:07:40,115So getting the hang of Expresso is really important
    00:07:44,187to become a Cinema 4D artist.
    00:07:47,349You can do a lot of things without it, but again,
    00:07:50,308it's just like Expressions.
    00:07:51,489It's gonna make your life a lot easier.
    00:07:53,660So the example of the clock, let's get started here.
    00:07:57,104If you haven't watched the intro
    00:07:59,453to After Effects Expressions,
    00:08:01,714then I'll just do a quick recap.
    00:08:03,436We basically use the technique
    00:08:07,184of mapping the time of the composition
    00:08:11,078to the rotation of the hour and minute hand of the clock.
    00:08:15,240We're gonna do the exact same thing here.
    00:08:18,098So the first thing I'm gonna do is,
    00:08:20,011I need a way of getting the time of this project.
    00:08:24,466And just like there is a time variable in After Effects,
    00:08:26,716there is a time node in Cinema 4D.
    00:08:29,416So I'm going to right-click, New Node,
    00:08:33,511and then in Expresso, General, way down here,
    00:08:36,905there is a time node.
    00:08:38,592Now there are many, many nodes in Expresso,
    00:08:41,798and honestly, the best way I've found
    00:08:45,377to discover new ones and to
    00:08:49,345come up with ways of using them
    00:08:51,583is to watch tutorials like this, and then,
    00:08:54,283just try and come up with challenges for yourself,
    00:08:56,646things that are very tedious to do by keyframing,
    00:09:00,212but you suspect could be done with Expresso.
    00:09:04,015And then go into the Cinema 4D Help,
    00:09:06,996go to the Expresso section,
    00:09:08,256and try and read through these nodes.
    00:09:10,236They are called pretty intuitive things.
    00:09:13,510Most of the time you can just kind of figure it out.
    00:09:15,963So this time node here,
    00:09:18,100is going to return the time of the comp.
    00:09:23,597Let's say we don't know if this is
    00:09:26,336gonna give us seconds or frames, we don't know.
    00:09:30,994And let me just show you really fast,
    00:09:32,265when you click any node in the Expresso editor,
    00:09:35,674the properties for that node show up down here,
    00:09:38,127so if there's options that you can change,
    00:09:39,994they'll show up in this little area.
    00:09:41,842Now this doesn't give us any options.
    00:09:43,654So how do I know what this is actually spitting out?
    00:09:48,277We're gonna grab another node, New Node, Expresso,
    00:09:52,046General, and the one we're looking for is Result.
    00:09:59,291all it does is basically show you the values
    00:10:02,633that are coming out of other nodes.
    00:10:04,451And this is a good time to explain what these nodes,
    00:10:08,141how they're sort of formatted.
    00:10:12,101The left side of a node, the blue side, is the input.
    00:10:16,388So some nodes have inputs into them, like this Result node.
    00:10:20,348It needs something inputted into this little blue dot
    00:10:24,432in order to work.
    00:10:26,198This node only has an output.
    00:10:28,156All it does is compute the time of the project,
    00:10:32,127and then it spits that value out of this red dot here.
    00:10:36,515And in order to connect nodes together,
    00:10:39,429you click the output of one node,
    00:10:41,870and you get this little pick whip,
    00:10:43,031and you will drag it to the input of another node.
    00:10:46,067Now Expresso doesn't always update automatically.
    00:10:50,162Sometimes you have to go backwards or forwards a frame.
    00:10:54,381So I'm hitting G and F to go one frame forward,
    00:10:57,453one frame back.
    00:10:58,521And you can see now,
    00:10:59,939we're seeing the result from the time node.
    00:11:02,515And it's clearly not in frames, because we're at frame 11,
    00:11:05,924and it's showing 0.458.
    00:11:07,915But this project is most likely
    00:11:12,029in 24 frames a second,
    00:11:13,604so if we go to frame 24, we are now getting a one.
    00:11:17,712So we now know the time node is giving us seconds,
    00:11:20,332not frames, and that's actually pretty useful
    00:11:24,585if you're building a clock
    00:11:26,396because you want that clock to run at a constant speed,
    00:11:29,591regardless of the frame rate of your project.
    00:11:32,641So that's actually pretty useful.
    00:11:34,373All right, so now, what do we want to do with this value?
    00:11:37,399We want to map that to the rotation of these hands.
    00:11:42,203So why don't we start with the second hand,
    00:11:46,512and then we'll go to the minute hand and the hour hand.
    00:11:49,219So in order to affect the second hand,
    00:11:52,482which is this red hand,
    00:11:54,012all the hands are overlapping right now,
    00:11:55,609which is why it looks funny.
    00:11:57,443If you come into your object manager
    00:11:59,986and you find the second hand, you can literally
    00:12:01,910click and drag it into the Expresso editor.
    00:12:04,858And you'll see, now we have a node for the second hand.
    00:12:08,345So you can see the second hand,
    00:12:10,381right now there's nothing, there's no values,
    00:12:13,374there's nothing in here.
    00:12:15,320We have to add everything manually that we want to control.
    00:12:20,597We want to tell the second hand what its rotation should be,
    00:12:25,221specifically the bank rotation.
    00:12:28,348If I change it here, the second hand rotates around.
    00:12:33,592I want to find the input for bank rotation here.
    00:12:38,016So again, inputs are on the left side here, on the blue.
    00:12:41,256So if you click this blue square,
    00:12:44,789you have now some options and you can look through here
    00:12:47,894and pick a million different things about
    00:12:50,132the second hand object that you can control with Expresso.
    00:12:55,589And what we are going to look at is the coordinate section
    00:13:00,292and we're gonna go down to Rotation.
    00:13:03,014And just so you know,
    00:13:03,948the difference between global position, global rotation,
    00:13:07,098and position rotation is that,
    00:13:10,442when the object is parented to something else,
    00:13:14,885the global rotation and position will give you
    00:13:17,979the actual position in your entire
    00:13:21,486project, in 3D space.
    00:13:23,298Whereas the position and rotation will give you
    00:13:26,290the position rotation relative to its parent.
    00:13:31,911It just so happens that the null clock,
    00:13:34,874which is the parent of these minute, second, hour hands,
    00:13:38,824it's in exactly the same position as all these hands.
    00:13:41,939So it's not really gonna make a difference, in this case,
    00:13:44,189if we use global or if we use just the standard
    00:13:47,632position rotations.
    00:13:49,229So I'm gonna use Rotation, and I'm going to go down
    00:13:52,694to Rotation.B for bank.
    00:13:55,927And so now, if I move this Result out of the way,
    00:14:00,978so if I just take the output of the time node,
    00:14:03,701pipe it to the input of the second hand,
    00:14:06,086into this Rotation.B,
    00:14:08,067and I come over here and I hit Play, it's going to play.
    00:14:14,985And you will notice that it's actually rotating,
    00:14:19,577not super fast, but faster than you might think,
    00:14:23,119because you would assume that because,
    00:14:27,305over here in your Attribute Manager,
    00:14:29,544if you click on the second hand,
    00:14:31,704the rotation bank parameter is set to 157 degrees.
    00:14:37,307However, we know, by looking at the Expresso,
    00:14:39,669that the number actually getting piped into this is 2.75.
    00:14:45,846So why is 2.75 seconds turning into 157 degrees?
    00:14:51,808Well, that is because,
    00:14:55,173unfortunately, because it just makes it
    00:14:58,109a little more complicated,
    00:14:59,571even though you work in degrees
    00:15:01,956when you're manually changing these values,
    00:15:04,308in Expresso, you're working in radians.
    00:15:10,349Basically, a radian
    00:15:13,023is a method of talking about degrees using Pi.
    00:15:16,564So Pi is 180 degrees.
    00:15:19,055Two Pi is 360 degrees.
    00:15:21,980Fortunately, you don't really have to worry about that.
    00:15:23,885What you do need to do is convert these radians
    00:15:27,018into degrees, so you can work with them,
    00:15:31,945and it'll be a little easier.
    00:15:37,157What I want to do now is create a control for this clock
    00:15:42,354to set the overall speed of the clock,
    00:15:46,053because what if we want it to go faster or slower
    00:15:48,809than the time node is actually animating?
    00:15:52,358So in order to create controls in Cinema, you use User Data.
    00:15:57,674So if I click on this clock and I come down here,
    00:15:59,927you can see right now, we have no User Data.
    00:16:02,020We have basic coordinates and object tabs, and that's it.
    00:16:05,638If we go to the User Data menu right here,
    00:16:07,663and click Add User Data,
    00:16:09,864we now have the Manage User Data window open up.
    00:16:12,915And this is where we can create controls.
    00:16:14,819There's a lot of options, how to do that.
    00:16:17,100So the first thing you do is name the control.
    00:16:19,584So I thought about how I wanted to control this,
    00:16:22,730and it seemed to me the easiest way to think about it
    00:16:25,538would be, how fast should our clock move
    00:16:29,507relative to real time?
    00:16:31,843So I'm gonna call this the Time Multiplier.
    00:16:35,691And then I gave myself a little hint,
    00:16:37,189saying one equals real time, so that,
    00:16:39,849if you want a clock that runs in real time,
    00:16:42,022you would just set the value to one.
    00:16:44,115So then, if you look down below this,
    00:16:46,558it's asking for a data type.
    00:16:48,786You have a lot of different data types.
    00:16:51,243Float is probably the most common.
    00:16:54,321Float just means any number.
    00:16:58,777And then, the interface, you can have
    00:17:02,530a Float interface, which is essentially just a box like this
    00:17:06,256where you can type in a number or use these little arrows.
    00:17:09,334There's also a Float slider,
    00:17:11,386which gives you this nice little slider interface.
    00:17:14,317And I'm just gonna use Float for this.
    00:17:17,097And then, what units do we want to use?
    00:17:19,811We're not working in percents here.
    00:17:21,957We're gonna use real numbers.
    00:17:23,523And your options are Real, Percent, Degree, and Meter.
    00:17:27,101And we're just gonna use a real number because
    00:17:30,908we just want to type in a one or a two or a 100
    00:17:33,230or something like that.
    00:17:37,442The Step is, what increment do you want to move in?
    00:17:42,519If I click the Edit arrow here, this up or this down arrow,
    00:17:47,608do I want it to go up by ones, by tens, or smaller?
    00:17:52,131And I usually set this pretty small, like 0.01
    00:17:55,088so I have more control over it.
    00:17:57,194And then, there's options if you want to limit
    00:17:59,192the minimum and the maximum.
    00:18:01,068Now, I want to limit the minimum to zero,
    00:18:05,903but I don't want to limit the max.
    00:18:07,900I want to make this clock go as fast
    00:18:10,223as you could possibly want it to.
    00:18:12,058And then, you can set a default value,
    00:18:13,570so the default value will be one, and we hit OK.
    00:18:17,485So now, in our clock object,
    00:18:19,012you have a User Data tab with our data set up.
    00:18:23,061And you can see we have a slider.
    00:18:25,045It will go down to zero and no further.
    00:18:28,164It starts at one, and it goes up,
    00:18:30,608and you can just scrub it up like this,
    00:18:32,309you can hold Shift and go quicker,
    00:18:34,536or you can actually come in and type in the value.
    00:18:37,750And now you can use this to start to control
    00:18:41,827some of the Expresso.
    00:18:43,204So if we leave this at one for now,
    00:18:46,025we'll double-click the Expresso tab to bring this back up.
    00:18:48,699So now, we need a way to get access to this User Data.
    00:18:53,864So the way you do that is,
    00:18:55,254we click and drag the entire clock null
    00:18:59,239into the Expresso window.
    00:19:01,438And that User Data we're gonna use
    00:19:05,401to basically multiply with the time.
    00:19:08,964So if we multiply one times time,
    00:19:11,448then our second hand will run in real time.
    00:19:14,904If we make it larger, it will go faster.
    00:19:18,485The User Data is found in the outputs of the clock,
    00:19:22,779because it's a value that we're getting
    00:19:25,182to use somewhere else.
    00:19:26,600So if you click on this red box
    00:19:28,004and you go all the way down to the bottom,
    00:19:29,813you can actually see the User Data for that object,
    00:19:32,473and there is our Time Multiplier.
    00:19:36,253So now, we have two outputs, Time and the Time Multiplier
    00:19:41,072from our User Data.
    00:19:43,448And we want to multiply those two together
    00:19:46,472to control the second hand.
    00:19:50,581So now we need to think about
    00:19:53,479how fast that second hand needs to go each second,
    00:19:59,676so that it's actually moving
    00:20:00,743the correct distance in real time.
    00:20:03,929So here's where I had to think about this for a little bit.
    00:20:07,304A circle, again, is 360 degrees.
    00:20:10,463There are 60 seconds on the clock,
    00:20:14,662so if you divide each,
    00:20:17,038if you divide 360 by 60 seconds,
    00:20:19,265that means each second is six degrees.
    00:20:23,356So if this Time Multiplier is set to one,
    00:20:28,500then I want this second hand to move six degrees
    00:20:32,510each second, and that will be real time.
    00:20:35,034So what I need to first do,
    00:20:38,302is multiply this Time Multiplier times six
    00:20:42,865because I want to work in degrees
    00:20:45,362when I'm creating this Expresso.
    00:20:46,955It's gonna make it easier for me to think
    00:20:48,764and do the math I need to do.
    00:20:50,629So if I want to multiply this times six,
    00:20:52,613we're gonna need to use a Math node.
    00:20:55,150So if we right-click
    00:20:57,567and do New Node,
    00:21:02,589Expresso, Calculate, this is where all of the
    00:21:06,369math-based nodes are, and you come down to Math.
    00:21:10,493So now you have a Math node, all right,
    00:21:12,815and the Math node does addition, subtraction,
    00:21:15,826multiplication, and division,
    00:21:18,188and it has this other mode called Modulo,
    00:21:20,780which is really interesting, and we're gonna
    00:21:23,535talk about Modulo a little later in the tutorial.
    00:21:25,911So I want to multiply these two numbers together,
    00:21:30,663so if I click on the Add Node and come down here
    00:21:34,092to the Attributes, I can change the function to Multiply.
    00:21:38,426And then I can just drag the outputs of these two nodes
    00:21:41,356to the inputs of this node.
    00:21:45,000So now we're multiplying one times the time.
    00:21:48,944And actually, before we do that,
    00:21:51,895I want to multiply this by six
    00:21:55,639so we can convert this into degrees
    00:21:57,543that we're gonna be using.
    00:21:59,289So let me move this time out of the way for a second.
    00:22:02,295So if you have a Math node and you only have one input,
    00:22:07,492and I want to multiply this input times six,
    00:22:10,517you have two options.
    00:22:11,354One is, you can create a new node,
    00:22:16,889in General, you can find it, call it Constant.
    00:22:20,413A Constant will just return
    00:22:23,207any number you tell it, and that's all it does.
    00:22:26,152But you don't actually have to do that.
    00:22:27,554You can click on the Math node and go to Parameter.
    00:22:31,700And if you only have one of the inputs hooked up,
    00:22:35,627then the other one can be typed in,
    00:22:38,611down here in the Parameter.
    00:22:39,664So I'm just gonna type in six.
    00:22:42,000So now, the output of this is gonna be
    00:22:44,498whatever our time multiplier is times six.
    00:22:47,245So right now it's six.
    00:22:49,850So I want to convert that
    00:22:52,321into degrees, all right?
    00:22:56,453Because I want to basically take the number of seconds
    00:22:59,206that have elapsed, so at one second,
    00:23:03,189I want that second hand to have moved six degrees,
    00:23:06,294and that's it.
    00:23:07,307So the first thing I need to do,
    00:23:09,291because now we know this is expecting radians,
    00:23:11,492but we want to work in degrees because it's easier.
    00:23:15,380I'm gonna convert the output of this into degrees.
    00:23:19,174So the way we do that is,
    00:23:21,806with a new node, Expresso, Calculate, Degree.
    00:23:26,640And the Degree node actually has two modes,
    00:23:29,502radians to degrees, and degrees to radians.
    00:23:34,740So what we're gonna have to end up doing
    00:23:37,481is converting what we're working with here,
    00:23:40,923which is gonna be degrees, and at the end
    00:23:43,691we're gonna have to convert it to radians.
    00:23:46,688And I'm gonna use this Result node
    00:23:48,215to kinda check our math as we go along.
    00:23:51,602So right now, we are multiplying
    00:23:58,597we're multiplying our Time Multiplier times six.
    00:24:04,091So the result is six.
    00:24:05,940So six degrees per second.
    00:24:07,898Now, we need to multiply this result times time.
    00:24:13,298So I'm going to copy this node.
    00:24:17,064And a quick way to do it is to just hold Command
    00:24:19,090and drag it.
    00:24:21,371And so now,
    00:24:25,030I can connect the output of the time
    00:24:27,230and the output of this multiply here,
    00:24:31,241and let's look at the result of that.
    00:24:33,940So now, every second
    00:24:37,541we are multiplying times six.
    00:24:40,335So we're at 48 frames, which is two seconds,
    00:24:43,467and this is 12.
    00:24:44,602If I move 72 frames, this is now 18.
    00:24:48,585So we are now successfully making this number go up
    00:24:52,364by six every second.
    00:24:54,052So now, if we convert that degree,
    00:24:57,238because this is in degrees,
    00:24:58,494if we convert that degree into radians.
    00:25:01,555So again, here's a Degree node.
    00:25:03,388It's set to, right now it's set to radians to degree,
    00:25:05,751and we want degree to radian.
    00:25:08,437So 18 degrees, convert that to radians,
    00:25:12,704and pump that into the rotation of the second hand.
    00:25:15,930All right, so now let's hit play and see what happens.
    00:25:18,171All right, so you can see it's moving,
    00:25:21,304one little tick every second.
    00:25:24,044One, one thousand, two, one thousand, three, one thousand.
    00:25:26,893So that is working exactly as we wanted.
    00:25:29,498And just to test and make sure that
    00:25:34,660our User Data is working, we can now click on the clock,
    00:25:38,140change this to 10, and so now,
    00:25:42,111it's moving 10 seconds every second.
    00:25:46,308So now I've got the second hand wired up.
    00:25:48,576It should be pretty easy
    00:25:51,384to wire up the minute and the hour hand.
    00:25:56,326What I'm gonna do is,
    00:25:59,431I'm basically gonna branch off,
    00:26:05,317I'm gonna branch off from this Multiply node here.
    00:26:08,746So if you think about,
    00:26:10,987the second hand is moving six degrees every second,
    00:26:15,280if we're going in real time.
    00:26:20,626How many times slower does the minute hand move
    00:26:24,568than the second hand?
    00:26:26,107Well, it moves 60 times slower, right?
    00:26:29,321This has to move 360 degrees for this to move six degrees.
    00:26:35,652So what I want to do is
    00:26:40,928make a new Multiply node down here.
    00:26:49,633What I'm gonna do is,
    00:26:51,037I'm gonna take this
    00:26:53,063I'm gonna take this Multiply node here,
    00:26:54,305and let me get a Result node, because now,
    00:26:56,736as you can see, it can get pretty confusing.
    00:26:59,975And I want to make sure I don't lead you guys
    00:27:02,661down the wrong path.
    00:27:05,591So this right here, this is basically the degrees
    00:27:09,925that our second hand is moving.
    00:27:11,667So if we divide that by 60,
    00:27:15,649then that would be the number of degrees
    00:27:18,025that the minute hand needs to move.
    00:27:22,017So this Multiply node can actually come over here,
    00:27:26,484and I generally try to organize things left to right
    00:27:29,631in order, because you can see that this is already
    00:27:32,343starting to get a little bit confusing.
    00:27:35,057And there's a few ways to organize yourself in Expresso.
    00:27:38,136One way, which might be wise right now,
    00:27:41,388is to get an Expresso node in the General section
    00:27:45,655called Remark, and all a Remark does,
    00:27:49,529it lets you type in a comment
    00:27:53,416in the Properties here.
    00:27:54,810And you can just type in "second hand."
    00:27:58,442And it's just like a little sticky note for yourself.
    00:28:01,115And then the other thing you can do is say, okay,
    00:28:05,973which nodes are specifically for the second hand?
    00:28:08,901Let's say these two are clearly for the second hand.
    00:28:11,824So I'm gonna label this Remark and these two nodes.
    00:28:14,571I'm gonna give them a different color.
    00:28:17,581So all I did was click this Title Color box
    00:28:19,539and make them all green.
    00:28:20,994So it's just a little bit easier to see that way.
    00:28:27,460And one other thing you can do is come to the Basic tab
    00:28:29,553here and change the name of these Expresso nodes.
    00:28:31,983So I could call this Branch here,
    00:28:35,925and so I'm kind of leaving myself a little hint.
    00:28:39,719As I get moving, I can click on these and see, okay,
    00:28:43,310this is where I'm supposed to branch.
    00:28:45,200You can also create Remarks,
    00:28:47,671and they only show up when you click on the node,
    00:28:49,548but they can be helpful.
    00:28:53,368So now what we need to do is divide the result
    00:28:55,866of this node here by 60.
    00:28:58,620So I'm gonna take this Math node
    00:29:00,132and I'm going to change it from multiply to divide.
    00:29:03,615I'm going to take the input and connect it
    00:29:06,464to the output of this, and then I don't need a second input.
    00:29:09,976I can just come to Parameter and type 60.
    00:29:12,593So it's dividing the output of this by 60.
    00:29:16,130And let's use the Result node here to see,
    00:29:18,574and it sure is working.
    00:29:21,193And now we need to do the exact same thing
    00:29:25,176that we did with the second hand, with the minute hand.
    00:29:29,806So I'm actually gonna copy this Degree node here
    00:29:33,168because this is already set up
    00:29:34,694to convert degrees to radians.
    00:29:39,253And then I need to grab the minute hand, pull it down here,
    00:29:48,002and grab the Rotation Bank,
    00:29:51,516pipe it in.
    00:29:52,893And now the minute hand is wired up, too.
    00:29:58,051And you can see that, as this makes a full revolution,
    00:30:01,940the minute hand just moves one tick.
    00:30:08,001So just using some simple math here,
    00:30:09,796we've got the second hand and we've got the minute hand
    00:30:12,321all dialed in.
    00:30:14,602And I'm gonna make these two, the minute hand
    00:30:16,862and this Degree node, I'm gonna make them different colors.
    00:30:19,765And actually, this is also part of the minute hand.
    00:30:24,112So I'm going to make them all a different color.
    00:30:29,026So now, the only one we have left is the hour hand.
    00:30:33,814And obviously, that's gonna work the same way.
    00:30:36,298So let's pull the hour hand down here.
    00:30:39,418And let's grab the
    00:30:41,995Rotation Bank.
    00:30:44,641Let's copy this Degree node and pipe that in.
    00:30:51,916If we say that
    00:30:54,810a minute hand moves 60 times slower than a second hand,
    00:30:59,117then the hour hand clearly moves 60 times slower
    00:31:01,723than the minute hand.
    00:31:03,883So really, all we need to do is double up
    00:31:06,299on this Divide node here.
    00:31:08,299So let's copy that and
    00:31:11,004bring it over here.
    00:31:13,732We'll spread these out a little bit.
    00:31:16,999Trying to create something that will make sense
    00:31:18,632when I look at this later.
    00:31:20,414So I'm gonna take the output from this Divide node,
    00:31:23,682put it into this Divide node.
    00:31:27,259And this Divide is already set to divide by 60.
    00:31:30,351So then we pipe output of that into this degrees to radians
    00:31:35,144into the hour hand.
    00:31:37,047And let's change the color of these.
    00:31:42,299Let's not do green because we've already done green.
    00:31:45,215Cool, so now, let's check this.
    00:31:49,522If we run this clock,
    00:31:52,857it's gonna be almost impossible to see
    00:31:54,517the hour hand move at this speed.
    00:31:56,704So I'm gonna type in 100.
    00:31:59,580So now the second hand is moving
    00:32:02,482it's moving really, really fast.
    00:32:04,845You can see the minute hand clearly moving.
    00:32:06,992But in a 144-frame project,
    00:32:11,015this minute hand only moves 10 minutes.
    00:32:12,662So the hour hand still is not moving very fast.
    00:32:14,944So why don't we change this to 1,000.
    00:32:21,910All right, and you can see that this is not working right,
    00:32:24,407which means I've done my math wrong.
    00:32:28,188And the reason for that
    00:32:29,781is because
    00:32:33,183it's late and I'm a little stupid.
    00:32:35,518Yeah, this Divide node should not be set to 60.
    00:32:39,056When a minute hand moves all the way around a clock,
    00:32:42,271the hour hand does not move six degrees.
    00:32:44,552The hour hand actually moves one-twelfth of the way around.
    00:32:48,143So as the minute hand does a full circle,
    00:32:51,465the hour hand does one-twelfth of a circle.
    00:32:57,621So what we really need to do
    00:32:59,754is divide, instead of by 60, we need to divide by 12.
    00:33:04,372So now let's look at that.
    00:33:06,005All right, so now we're at one o'clock.
    00:33:07,841It goes all the way around and we're almost there.
    00:33:10,905Let me make this project longer.
    00:33:13,646It's gonna be hard to check our clock otherwise.
    00:33:17,291All right, so we're at one o'clock.
    00:33:19,236Minute hand goes all the way around,
    00:33:21,274and we're at two o'clock.
    00:33:22,772All right, so now this clock is wired up to run forever,
    00:33:27,165all by itself.
    00:33:30,050That is the basics of Expresso, right there.
    00:33:34,222You pull objects from your Object Manager into the Expresso.
    00:33:38,568You pick which inputs you want to work on.
    00:33:41,120And then, you can use other nodes and user controls
    00:33:44,644that you make to affect things and to
    00:33:48,437create one control, do some math with it,
    00:33:51,758and work on three objects,
    00:33:54,688and make them all run at different speeds.
    00:33:58,131So if all you wanted to do was learn some basics of Expresso
    00:34:03,342you should stop watching this tutorial right now.
    00:34:05,597If you want to see a little bit
    00:34:07,635of how you can do some advanced stuff in Expresso,
    00:34:11,227then keep watching because what I'm going to attempt to do
    00:34:14,696is recreate the rig that I created,
    00:34:17,207and this was kinda tricky.
    00:34:18,652I decided, wouldn't it be cool if I could make
    00:34:21,230the second hand actually tick, like a real clock?
    00:34:25,807And so I'm gonna show you guys how I did that.
    00:34:29,236So the first thing I need to do is set this back,
    00:34:31,410the Time Multiplier back to one.
    00:34:36,135Let's go into the Expresso, and let's think about this
    00:34:38,066for a second.
    00:34:42,521Right now the second hand moves at the right speed.
    00:34:48,191And I knew that
    00:34:50,419it was gonna be tricky to get it to tick,
    00:34:55,022so the first thing I wanted to do was figure out
    00:34:56,953how can I make this, not move smoothly around,
    00:35:01,408but basically just jump one second,
    00:35:05,621every second, jump instantly to the next tick mark
    00:35:08,361on the clock.
    00:35:13,505I'm gonna pull up another Result node here
    00:35:15,408so we can monitor this as we go through it.
    00:35:21,322We're gonna be working on the second hand up here.
    00:35:27,789Right now, if you look at the output of this Multiply node,
    00:35:32,621this is telling us the degrees
    00:35:34,662that the second hand are moving.
    00:35:37,212And what I actually need is, basically,
    00:35:41,937for this to stay zero all the way
    00:35:46,392until we get to frame 24, and then become six instantly.
    00:35:53,899What I basically needed was a way to round this number,
    00:35:58,867in increments of six.
    00:36:00,635Now, there is no way to round a number in increments of six.
    00:36:04,713You can round a number in increments of one.
    00:36:09,046So what I thought might work is if I take this number here,
    00:36:14,258divide it by six, so now I'm working in increments of one.
    00:36:19,604I round that number and then I multiply the result
    00:36:23,492times six, it might do what I wanted.
    00:36:30,580I wish I could explain
    00:36:34,320how I came up with that.
    00:36:35,934I just basically bashed my head against my desk
    00:36:40,038until it came out.
    00:36:41,293And sometimes that's the only way.
    00:36:43,224I wish I had better news for you guys.
    00:36:45,829All right, so let's try that.
    00:36:46,977So what we're gonna do is, we're gonna create
    00:36:48,800a new Calculate Math node.
    00:36:53,552And we are going to set that to Divide.
    00:36:59,101So we're gonna pipe in the output of this
    00:37:03,299into the top, and then input two is gonna be six.
    00:37:07,714So we're dividing by six.
    00:37:09,726So let's look at the result of that now,
    00:37:11,858and just make sure it's doing what we think.
    00:37:14,046So now, it starts at zero.
    00:37:16,084At frame 24, instead of being six, it's now one.
    00:37:20,594At frame 48, instead of being 12, it's now two.
    00:37:25,685And you can see that, now, we've got
    00:37:28,613in between one and two, you get all these decimal points.
    00:37:31,934If we could round this number, basically chop those off,
    00:37:37,051then we would have a number
    00:37:38,671that's only changing every 24 frames.
    00:37:42,573So what I was looking for and I'd never used this before,
    00:37:45,766I was looking for a node that would round
    00:37:47,778the number for me, and maybe I didn't look hard enough,
    00:37:51,260but I couldn't find an obvious one.
    00:37:52,988But what I did find, in this Adapter section here,
    00:37:57,403is this Universal node.
    00:38:00,981And it takes an input and it spits out an output,
    00:38:03,951and I thought maybe this is what I'm looking for,
    00:38:06,098and maybe this will convert whatever you put into it
    00:38:10,458into whatever the node is set to.
    00:38:13,577So I changed the Data Type from Real to Integer.
    00:38:18,532So that way, integers don't have decimal points.
    00:38:23,878So let's pipe the output of this
    00:38:25,984into this Universal adapter,
    00:38:28,400and then pipe that into the Result, and let's check it.
    00:38:32,640So we go to the beginning, and we have zero.
    00:38:35,413And then we get to frame 24, and it changes to one.
    00:38:39,923And in between, it stays put.
    00:38:42,609So now, every 24 frames, it switches.
    00:38:48,064So that made me very happy.
    00:38:49,171I did a little dance and clapped my hands a couple times.
    00:38:52,235The next thing we need to do is take this
    00:38:54,071and multiply it by six.
    00:38:55,746So we divided by six, got rid of the decimals,
    00:38:59,312multiply it back by six to get back to our original number,
    00:39:02,606and by doing that, we've basically cut out
    00:39:05,022all those intermediate numbers.
    00:39:07,102So we're gonna make a new node, Expresso, Calculate,
    00:39:10,436Math, and we want to multiply this time.
    00:39:16,457So we'll take the output of this Universal Adapter,
    00:39:19,211pipe it in the input, set the other input to six.
    00:39:26,151So now, let's look at the result, just to check,
    00:39:28,757but I think this is gonna work.
    00:39:29,701So at frame zero the result is zero.
    00:39:32,820And as we scrub through,
    00:39:34,845it stays zero until frame 24, and it jumps to six.
    00:39:39,489So now, every second, we are jumping six degrees.
    00:39:42,689It's exactly what we want.
    00:39:44,215All right, so what I'm gonna do is take
    00:39:48,238these two nodes here.
    00:39:51,532Now, you can see that right now,
    00:39:55,055the output, way back here, is being piped into this.
    00:39:59,835And so what's cool is, we did all this extra work over here
    00:40:02,832to try stuff out and see what the result's gonna be.
    00:40:06,369However, we still have our original setup working.
    00:40:09,434And that's one of the great things about Expresso
    00:40:11,405is that you can try different ideas and pipe things up
    00:40:16,319and then look at the result and see if it's working.
    00:40:18,263And if it is, then you can just swap over
    00:40:21,935and you've got a new setup.
    00:40:23,893So now, let's play this.
    00:40:27,416And there you go.
    00:40:28,253You see now, we have the second hand, and it is ticking
    00:40:31,008every second to another tick mark.
    00:40:34,234Now that's pretty cool, and you could stop right there.
    00:40:36,529But I wanted to figure out, how do we
    00:40:39,743get this to actually tick like a real clock?
    00:40:46,034So this is where I got a little bit fancy.
    00:40:50,016I thought about, what needs to happen
    00:40:52,527in order to make the second hand tick?
    00:40:55,160Well, basically what we've got now is
    00:40:59,885every second we're adding six to the number of degrees.
    00:41:04,557Now, in between those seconds, we need to slowly add
    00:41:11,739between zero and six degrees, and basically cycle
    00:41:16,599between zero and six degrees,
    00:41:19,461and be able to control how fast we go
    00:41:21,972from zero to six degrees.
    00:41:26,374And that probably made no sense when I just explained it,
    00:41:29,492but watch what I'm talking about.
    00:41:32,624What I want to do is, basically
    00:41:37,783the output of this here,
    00:41:40,252and I want to look at the result of that.
    00:41:41,967So right now,
    00:41:43,411and actually, what I'm gonna do
    00:41:45,491to make this a little bit easier,
    00:41:46,854I'm gonna keep this Result node.
    00:41:47,961I'm gonna make a copy of it,
    00:41:49,460and I'm gonna pipe into this.
    00:41:53,929So what you can see is that the output back here,
    00:41:58,843this is before we did all this trickery
    00:42:00,787to remove the in-between numbers.
    00:42:03,460This is showing us the original number,
    00:42:06,230and then when it gets to 12,
    00:42:08,766boom, this one switches to 12, too.
    00:42:11,736So what I realized was that, if you took
    00:42:14,276this number here and subtracted this number here,
    00:42:18,769it would always give you the number of degrees
    00:42:22,240in between the real value
    00:42:25,670and the, sort of, staccato value.
    00:42:28,707I'm not sure what you would call that, syncopated maybe.
    00:42:32,878And so that number that it would give you
    00:42:35,876would basically cycle between zero and six,
    00:42:41,195and then it would loop over and over again.
    00:42:44,813And I said, well what if I could take that
    00:42:48,013looping zero to six, that we're getting
    00:42:50,915by subtracting this result from this result,
    00:42:54,007and map that
    00:42:56,761in a way where we could control the speed of that number,
    00:42:59,259and then add the result back to this.
    00:43:03,511So, again, I'm sure that made no sense.
    00:43:06,198But let's just do it and see what happens.
    00:43:09,276So what I need to do is create another Math node
    00:43:12,894to subtract this from this,
    00:43:15,230sorry, subtract this from this.
    00:43:17,296So New node, Expresso, Calculate, Math.
    00:43:21,832And this is gonna be a Subtract node.
    00:43:24,572So I want to subtract.
    00:43:28,568I want to take this number and subtract this number.
    00:43:34,239And now you can see, we're starting to get
    00:43:36,089noodles all over the place,
    00:43:37,614and sometimes that's unavoidable.
    00:43:40,557I can try to keep this a little more manageable here,
    00:43:43,946but I'm not gonna worry about it for this.
    00:43:45,188In the rig that I actually posted,
    00:43:46,727I cleaned it up a little bit.
    00:43:48,401So let's look at the result of this
    00:43:50,075and see what we're getting, okay?
    00:43:52,087So you can see, at zero, both of these numbers are the same.
    00:43:56,839So the result we're getting is zero.
    00:43:59,364As we increase in time,
    00:44:02,347and we get closer to one second,
    00:44:04,453we approach six and then we jump back to zero.
    00:44:09,772So we're just looping
    00:44:11,663by subtracting the original number
    00:44:13,121from this truncated number.
    00:44:16,793We're going between zero and six
    00:44:18,629over and over and over again.
    00:44:20,789So what can we do with that?
    00:44:22,355Well, there is a very cool node in Expresso,
    00:44:27,107and if you use Expresso a lot,
    00:44:28,930you're gonna use this over and over
    00:44:30,145and over and over again, and it's called the Range Mapper.
    00:44:33,304So you go to Calculate and find the Range Mapper.
    00:44:37,603What the Range Mapper does,
    00:44:39,372and there's an expression in After Effects very much
    00:44:41,384like this, which I'll talk about in a later tutorial,
    00:44:44,624what the Range Mapper does is it takes a number
    00:44:48,026in the input and it outputs another number,
    00:44:50,925and it gives you options how to map
    00:44:54,097the input number to the output.
    00:44:55,542So for example, if you made a slider that went
    00:44:58,850from zero to 100 percent, you could pipe that
    00:45:01,820into the input here, and then the output
    00:45:04,709could be set to go from one million to two million.
    00:45:08,597So zero percent would be one million,
    00:45:11,338100 percent would be two million.
    00:45:13,160So it takes a range of input numbers,
    00:45:16,616and it maps them to a range of output numbers.
    00:45:19,668So what I want to do is map my zero to six here,
    00:45:25,810so I'm gonna pipe that into the input.
    00:45:28,213I want to map this zero to six to a different zero to six,
    00:45:32,616and I'll show you exactly what I mean by that.
    00:45:34,842I'm gonna make another Result node here,
    00:45:37,232and I'm gonna pipe it like this.
    00:45:39,014And in the Range Mapper you have to set a few things.
    00:45:41,566So the type of data is Real, that's correct.
    00:45:44,117We're using real numbers.
    00:45:45,413The input range and output range are user defined
    00:45:47,533right now.
    00:45:49,099So if we go into Parameter,
    00:45:51,627the input lower and upper,
    00:45:54,381we're looking for numbers zero to six,
    00:45:56,919and we're outputting numbers zero to six.
    00:46:00,916So by default, our input and our output are the same.
    00:46:04,777So if I step through this, you'll see,
    00:46:06,667these numbers are identical right now.
    00:46:12,863Just to show you guys an easy example of how this works,
    00:46:15,361if I change this output upper to 20,
    00:46:18,346then now, this number changes,
    00:46:20,007and what it's doing is, it's looking for numbers zero to six
    00:46:24,420and it's sort of spreading out zero to 20
    00:46:27,890along that range of zero to six.
    00:46:29,658It's just mapping a small range of numbers
    00:46:31,454to a larger range of numbers.
    00:46:33,330Now that's not what we want to do here.
    00:46:34,937We actually want the same numbers to come out,
    00:46:37,543zero to six, but we want them to come out
    00:46:39,068at a different speed.
    00:46:41,066And one of the things the Range Mapper lets you do
    00:46:43,739is set up a spline here, and the spline will control
    00:46:48,019the rate at which the input becomes the output.
    00:46:52,407So if I right-click in here, in this spline area,
    00:46:55,797and I go to Spline, Presets, Linear.
    00:46:58,455So a linear spline is the default.
    00:47:00,201This just means there's a one to one relationship.
    00:47:02,829When the input is one, the output will be one.
    00:47:06,988So if we go back, right here,
    00:47:10,444the input of this Range Mapper is five.
    00:47:13,103The output is also five.
    00:47:14,915If I go into this spline now, and I add a point here,
    00:47:19,219and I move this, you can see now,
    00:47:21,825the input is five but the output is 3.22.
    00:47:26,362But if we go to the ending, if we get towards the end,
    00:47:30,195and we never actually hit six
    00:47:31,680because the number turns over.
    00:47:33,530But you can see that it does start to accelerate
    00:47:35,717and it gets closer and closer to the original numbers.
    00:47:39,173So what we could do is use this spline,
    00:47:43,547and basically draw a shape
    00:47:48,748that's gonna add onto our truncated number of degrees
    00:47:53,607a little bit of animation.
    00:47:55,835So if we look at this result now,
    00:47:58,062this should be pretty interesting.
    00:47:59,022So we have our Range Mapper here.
    00:48:01,127And I've basically created a point in the middle
    00:48:03,557and dragged it all the way to the bottom,
    00:48:05,110and this is saying, when the input is zero
    00:48:08,390to probably all the way about four or five,
    00:48:12,332the output is going to remain zero.
    00:48:15,451And then at the very end, it's gonna shoot up
    00:48:17,397and go from zero to six really quickly.
    00:48:20,636And if we step through this frame by frame,
    00:48:24,038you can see the result.
    00:48:26,184The input of this Range Mapper is 1.25.
    00:48:28,439The output is still zero, and it's gonna stay zero
    00:48:33,974until we get very close to the end,
    00:48:35,702and then it's gonna shoot up really quickly.
    00:48:40,211So now we have,
    00:48:43,694this is basically the tick animation,
    00:48:48,784and this is the truncated degree
    00:48:54,117that is basically just jumping six degrees every second.
    00:48:57,438If we added this and this,
    00:49:00,314then we would have a ticking animation.
    00:49:03,621So let me get rid of all these Result nodes,
    00:49:05,287because they're getting a little confusing.
    00:49:07,538Let me add a new Math node.
    00:49:12,599And I'm gonna set it to Add.
    00:49:13,504It's already set to that.
    00:49:14,746All I need to do now is add
    00:49:18,094this Range Mapper to this Multiply node.
    00:49:24,385And now, I'm going to disconnect these two nodes
    00:49:28,584and move them way out here,
    00:49:32,756and pipe the output into this,
    00:49:34,620and let's have a look at what we have.
    00:49:38,331So you can see now, by adding the jerky movement
    00:49:43,030with the sort of sped-up, only at the tail end
    00:49:45,946of the animation tick movement,
    00:49:49,093we now have a ticking clock.
    00:49:53,332What I thought was cool was that I could actually,
    00:49:56,249it's kind of a pain if I want to change that spline,
    00:49:59,650to have to go in here, find the Range Mapper,
    00:50:02,108go to Parameter and change the spline.
    00:50:05,078So I thought, wouldn't it be great if I could make
    00:50:07,399a control right on this clock.
    00:50:10,046It turns out, you can.
    00:50:10,937If you go into User Data and say, Manage User Data,
    00:50:14,069since we already have some, you can just say Manage.
    00:50:17,377And you can see, we have our Time Multiplier here.
    00:50:19,874You can hit Add Data.
    00:50:21,900So we're gonna call this,
    00:50:24,046Second Hand Spline.
    00:50:29,068And actually, I want to show you guys another cool feature
    00:50:32,214before I do that.
    00:50:34,118Let's go back into User Data, Manage User Data.
    00:50:37,182Because I knew I was gonna have multiple controls
    00:50:39,425for the second hand, including whether it's visible or not,
    00:50:42,866whether it ticks or not,
    00:50:45,809things like that, I wanted to basically
    00:50:48,333group all of those settings together.
    00:50:50,224So you can actually add a group
    00:50:53,410and call that group whatever you want.
    00:50:54,908You can call it Second Hand.
    00:50:56,731And then, in that group, you can add data.
    00:50:59,512And you can see, there's a little arrow here.
    00:51:01,078Now the data is underneath this Second Hand group.
    00:51:03,792So we can just call this Spline.
    00:51:06,654The data type is going to be a Spline.
    00:51:09,991And the default value,
    00:51:12,272I can right-click in here and set the default
    00:51:13,946to a Linear Spline, hit OK.
    00:51:16,836So now, in our User Data, we have our Time Multiplier.
    00:51:20,067We also have a little subsection here for Second Hand
    00:51:23,307that you can open up and see the spline.
    00:51:25,832So now, I can actually click on this Range Mapper,
    00:51:31,151and click on this blue box,
    00:51:33,783and you can add inputs to the Range Mapper.
    00:51:35,916So you can actually add an input for the spline
    00:51:38,536on that Range Mapper.
    00:51:41,033And now,
    00:51:43,531this is where Expresso can get a little confusing.
    00:51:47,678The User Data I want to pipe into this
    00:51:49,765is way over here, on this clock.
    00:51:53,072If I go way down here, User Data, Second Hand, Spline,
    00:51:55,450that's what I want to pipe in.
    00:51:57,379I don't really want a noodle going all the way across
    00:52:00,101all these nodes.
    00:52:01,240So in this case, I'm actually just going to
    00:52:04,170drag another copy of my clock object.
    00:52:08,638And you can have multiple copies of objects in Expresso,
    00:52:11,583as long as you're not piping different values
    00:52:14,025into the same inputs.
    00:52:15,699So let's click on the output, User Data, Second Hand, Spline
    00:52:19,412and there's a lot of options under Spline,
    00:52:21,072but we just want the base one, Spline.
    00:52:23,786And I'm just gonna connect the output of the Spline
    00:52:25,757into the input of the Spline here.
    00:52:28,565So now, I can actually adjust the Spline right here,
    00:52:31,630right on the clock object.
    00:52:33,521So if I add a point here,
    00:52:35,437and go like this,
    00:52:36,828and then, what I did for the rig was,
    00:52:39,447I selected those two points, right-clicked,
    00:52:42,241and set the point types to EZEs.
    00:52:44,536And that way, I get bezier handles.
    00:52:47,114And to make this even easier to edit,
    00:52:48,464you can right-click this and hit Show in Separate Window,
    00:52:52,150and now you can actually make this window bigger
    00:52:54,324and drag around and make this Spline do whatever you want.
    00:52:58,172So if we play this, you can see now,
    00:52:59,750you've got a little bit more of a natural movement.
    00:53:03,544And I actually added a few more points
    00:53:07,500to this curve in the rig,
    00:53:10,429so that I could get
    00:53:14,372I could get it to kind of overshoot,
    00:53:19,624and then, kind of correct itself,
    00:53:22,810which is what it's kind of doing now.
    00:53:24,565So you can draw this Spline any way you want,
    00:53:27,805and that's how that second hand's gonna animate.
    00:53:32,274Woo, all right, another long tutorial.
    00:53:34,977So that is the basics of Expresso.
    00:53:39,483There's some other things I did in my rig,
    00:53:41,684but I think with what I've given you guys,
    00:53:44,694you should be able to start playing around
    00:53:46,422and figuring stuff out on your own.
    00:53:48,839Again, I'm gonna put this whole clock rig up
    00:53:51,701with a few more options and bells and whistles
    00:53:54,226and some explanatory remarks in the Expresso Manager.
    00:53:58,425I'm gonna put that up at,
    00:54:00,989and I hope this was helpful.
    00:54:02,206Thank you guys, and I will see you next time.
    00:54:05,580Thanks for watching.
    00:54:06,417I hope you learned something new about Cinema 4D
    00:54:09,171that maybe you've never seen before.
    00:54:11,102Of course, this lesson was just the very basics
    00:54:13,816of what you can do with Expresso, but hopefully
    00:54:16,947now you'll be able to start tinkering
    00:54:18,689with this very powerful node-based system on your own,
    00:54:22,010to do some cool stuff in your own projects.
    00:54:24,157If you have any questions or thoughts, let us know.
    00:54:26,411And don't forget to sign up for a free student account
    00:54:29,192to access project files from the lesson
    00:54:31,136that you just watched, plus a whole bunch
    00:54:33,121of other amazing stuff.
    00:54:34,553Thanks again, I'll see you next time.
    00:54:41,248(jingle music)