From the course: Motion Graphics

Morph between shapes

From the course: Motion Graphics

Start my 1-month free trial

Morph between shapes

- [Instructor] Welcome to Motion Graphics Weekly, where you up your MoGraph knowledge one week at a time. I'm EJ Hassenfratz. Let's get our learn on. Morphing between shapes may sound like a very daunting task, but utilizing some of the powerful tools in the Cinema 4D MoGraph module makes it a piece of cake. Let's find out how in this video. So let's just set the scene here first. I'm basically wanting to morph between this big bottle to the smaller bottle into the can. And you can see that basically how I created these pieces of bottle and can geometry is by utilizing a spline with just a simple lathe nurb or lathe object. And you can see half of my spline here making up my bottle shape on the can, the medium-sized bottle, and the large bottle. So let's go ahead and delete these extra two bottles and just start with this first big bottle and then we'll morph down to the small bottle down to the can, okay? So let's start by just removing these splines from this lathe object, so I'll just name this Morph, and you can see we have our big bottle, bottle, and can splines. So what we want to do is morph between these splines, turn the big bottle into the bottle spline and the bottle spline into the can. So the strategy will be to have one spline that will then morph into all three of these splines and basically take on the shape of each of these objects. So to create this morph spline, I'm going to build it by using what's called a matrix object, and you can find it in the MoGraph menu here. Now, using the matrix object, I can clone matrices or placeholder points that don't render onto objects. So if I go to the Object tab, go to the Object Mode, I can define an object to clone matrices on top of. And I'll just drag and drop my big bottle spline on here and you can see if I zoom in here these little cubes, and they are the matrices. And if I hit Render, you're going to see that they don't actually render, there's no cubes that show up in our viewport render view here, but they're basically placeholders. And you can see I can have all these little options here to adjust the amount of those matrices, so I can crank this all the way up, and what you're going to see is that these are not distributed evenly. So I need to go to the distribution, and rather than use Count, I'm going to use Even, and this will be allowing us to have these little matrices spaced evenly throughout the extent and length of our spline. So this is all well and good, but how do I utilize this matrix object and these matrices to create a spline? So one object that's going to help us basically connect the dots and connect all these matrices and generate a spline for us will be a tracer object. You can also find this in the MoGraph menu, all the way down here, and you can see it's actually a little cube with a little tracer spline behind it and I'll add that to my scene. And since I had my matrix object selected while I created the tracer, it's automatically going to load up my matrix object into the tracer. And what I want this to do is to be able to connect all of those matrices. So connect all objects. Now what I'm going to do is go ahead and hide the visibility of all of my splines in my scene, and let me just go ahead and crank down the count here and you're going to notice that even though I have my spline objects hidden, we have this new tracer object spline that is created by connecting all of these little matrices together and basically creating and generating a spline. So now what we can do is kind of clean this up and fix the default settings on our tracer object, 'cause right now the type is sent to linear. If I make the count of my matrix object small enough, you're going to see how this is a very chunky spline. We want this to be nice and smooth, and if I click on one of my default splines here, you can see that the default is a Bezier type of spline, and then we have intermediate points set to adaptive. On the tracer object, though, our type is sent to linear, meaning there's linear interpolation, linear splines connecting each of our matrices, and we'll want to change this to Bezier just like our default splines here and then there's no intermediate points, meaning there's no smoothing between points until we choose that adaptive, and you can see that if we bring the angle down to five it's going to smooth everything out here. So now we can go and crank back up the matrix count, so we have more matrices, more definition of our actual spline, and you can nicely see this profile of the big bottle shape. So now we just need a way for these matrices to jump and conform to these other spline shapes. And so the way we're going to do that is by utilizing what is called a spline effector. If I go to my MoGraph menu, go to Effector, go all the way down to Spline, and drag that in, what the spline effector allows us to do is move clones or these matrices onto another spline that we define. So you can see we have this spline field here, so if I want to morph my big bottle spline into the bottle spline, I'll just drag and drop this bottle into the spline field here, and you'll see that my matrices just jumped onto the bottle spline and formed that little profile. So if I go and adjust the strength of this spline effector, you can see that we're essentially morphing between these two shapes, which is really great. So what I can do now is since my tracer is the spline that is being generated, I'm going to drag and drop this underneath our lathe object and essentially create the geometry of our bottle. So again, I'll go to my spline effector and adjust this and see that we're kind of morphing between these two shapes using the base of a spline and then just placing a lathe on top of it. This is kind of a very linear transition, it's kind of boring, just adjusting the strength here. So instead of using this strength slider, I'm going to utilize a falloff. And I'll use a linear falloff, have the orientation face in positive Y, and you can see if I adjust the falloff height here and just move this falloff through the object, you can see we have this little morphing action happening and it looks a lot more interesting than it did before, so then all I need to do to animate this is to animate our little falloff here on our spline effector. So let's go to frame 10, and I'll set a keyframe for the Y position, and maybe go ahead 15 frames to frame 25, and then move this up in the Y, and set another keyframe. So now I have this animating from the big bottle to the small bottle. Now all I have to do to be able to have this bottle morph into the can is to first maybe it's going to help us to rename what this spline effector's doing, so I'll rename this Big Bottle, and then an arrow, to Small Bottle, and then what I'm going to do is duplicate this spline effector by command click and dragging and I'll rename this Small Bottle to Can, and make sure I apply this to our matrix objects effectors list by dragging and dropping it in there and making sure that the big bottle small bottle morph spline is in there first, because it's going to execute sequentially, in order. And then all I need to do is go into the second spline effector's Effector tab, change that spline we're morphing into from the bottle to the can, and you'll see now that we're actually morphing into the can. So these are actually animating, both of the spline effectors are animating at the same time, so we're actually morphing from the big bottle to the can. So what I'll do to offset these two spline effectors' falloffs moving upwards is to just offset them in the timeline. So I'll just move this small bottle to can spline effector track about 10 frames down, and now if I scrub through my timeline, you'll see that I have the big bottle and then that first spline effector's passing through, morphing that into the small bottle, and then my second spline effector will pass through and morph that small bottle into that can. So if I go ahead and readjust my project length to 90 frames and hit Play, you'll see we have these really nice spline morphs using the tracer, being lathed, and our matrix object matrices being morphed from one spline to another using spline effectors. So one last thing to make this look a lot more interesting and more fun is to apply a delay effector to our matrix object, and you can see that with the default mode set to blend, we're kind of smoothing out those transitions, but one mode that I think really adds a lot of fun and energy to this morph is using the spring mode. Now watch what happens, we get this really nice springy, boingy, really energetic animation and we have this really cool morph animation with very minimal effort utilizing the MoGraph module. Now, this workflow can be applied to any spline shape using any kind of generator object as well, so anything other than a lathe nurb, so I really urge you to have fun, experiment, and see what kind of cool morphs you can come up with. Don't want to wait until next week to learn something new? No problem. Here are other ways to feed your creative brain to keep you busy in the meantime. You can check out my other courses in the library, visit my website, eyedesyn.com, for more tutorials, subscribe to my YouTube channel to be alerted when I post a new video, join my Facebook page for daily MoGraph inspiration, and keep up to date on all my latest MoGraph creations on Instagram. Thanks for watching, and I'll see you here again next week.

Contents