 Hey everyone, it's EJ from iDesign.com, and today we are going to be talking about spline morphing in Cinema 4D. And if you go to my Tumblr page, it's iDesign.tumblr.com. I have all these cell shader little tests and stuff like that I'm working on, but I'm going to be focusing on this guy right here, the Yes Seattle guy. So I'm going to be doing spline morphing, and if you're familiar with spline morphing in After Effects, it can be a very tedious process because you have to make sure all of your spline points kind of line up. Your spline paths start at the same point on the object so relative to each mask or spline path. It's just a very tedious process. But I'm going to show you about how to do this very easily in Cinema 4D with a way that I came up with where you don't have to worry about figuring out spline points or making sure that each of your objects have the same amount of spline points on them so that they morph easily. Basically the way I came up with it is that you can just design your splines any way you want to regardless of matching spline point numbers or anything like that. So let's jump into Cinema 4D. And let's just set the scene right now. I have a capsule that is highly subdivided in the height segment. So I've got a lot of height segments so it can wrap around the Y spline with the spline wrap. Now on the spline wrap, one thing that's nice about Cinema 4D and one of the many uses for Cinema 4D is kind of an extension of After Effects is spline wrap and the ability to kind of bend an object around a spline. And you can see how easy it is to just choose a spline and wrap an object around it with this capsule. And another nice thing about the spline wrap and one thing that allows you to get a really nice spline look is the ability to scale your object along a spline. You can see how some of my spline is thicker than others so it kind of creates this nice stroke. And if I render this with my cell shader texture here, we get this really nice 2D look. And it looks kind of like Graffiti-esque or something like that. It looks very 80s, I guess you could say. But in the spline editor here, under size, we can adjust the size or the thickness of our spline by making points on the spline curve and just adjusting it. So we're adjusting the thickness of the spline. And this spline kind of represents the one end of the spline to the other end of the spline. So you can see right here is the very end of the spline at the end of the Y. So I can make that really tiny or make it really fat. And it's all just adding points. You can command and click to add points along the spline. And then it just adjusts to your heart's content. And this is one thing, like I said, spline wrap and the ability to adjust the thickness of a stroke along the spline. That's something you don't have in After Effects. And it would be nice to have in After Effects. But again, using Cinema 4D as an extension of After Effects and just making something like this with your spline wrap and rendering it with either a cell shader texture, just a flat, luminant texture. This could be a really nice element inside of your 2D composition in After Effects. So again, I have my spline wrap wrapped around my Y spline here right there. And then I have an S spline as well right here. And so what we're going to do is I want to have this stroke, this capsule that's spline wrapped. I want it to morph from this Y spline to this S spline. And the way we're going to do that is using a method of creating an intermediary object that's going to create another spline for us and that intermediary spline is going to actually do the morphing for us. So again, I mentioned that we don't have to pay attention to the number of spline points on each object we're morphing from and into. So you can see if I select my Y spline, go to Structure. You see I have 8 points here. And if I go to my S spline, you'll see that I have 6 points. So they don't match up. That's fine. So to get this intermediary kind of thing that's going to have that same number of spline points from one to the other, what we're going to do is create a new spline. And we're going to do this by using a matrix object to kind of plot the new points of our spline. And so let's do that. So I'm going to take this matrix object. I'm going to name this Y matrix. And I'm going to make these matrices kind of get cloned onto this Y spline. So let me turn off my stroke going on here. And so on my Y matrix, I'm going to go from grid array mode to object mode. And the object I want to clone onto is the Y spline. You'll see that we now have matrices cloned along our Y spline here. So I want to bring the count up a little bit more to say 30 or so. I want to turn the loop off. Because you'll see when I turn off the loop that we then have a matrix right at the end of our spline as well as the beginning. So I'm going to turn off loops. Now we now have that matrix right there. And let's see. That's loop off. And we can do smooth rotation if we want to. And that's good for that matrix object. So what I'm going to do is just duplicate this matrix object. And I'm going to name this S matrix. So this is going to be mapping matrices onto the S spline. So I'm just going to drag and drop the S spline into here. And you'll see that we now have the matrices along the S spline. So basically what we need to do is then create a new spline using this set of matrices here. And to do that, let me turn off my one spline here. We're going to use a tracer object. So I'm going to go into my mograph, get a tracer. And what I'm going to do is it's already automatically tracing the Y matrix object since I had it selected. And what I'm going to do is instead of tracing paths, I'm going to connect all objects. And you'll see we have an issue here. Nothing really happens first. You'll notice if I bring this tracer object down in my hierarchy, it shows up. Now why does it do that? Well, in Cinema 4D, in your object manager, Cinema 4D kind of executes commands from top to bottom. So what happened is that we had our tracer first. And it wanted to trace something, but nothing was executed yet. So what we needed to do is place our tracer at the bottom of our object stack. And so what happens is our matrices are generated and then it gets traced. So that's why there was a little bit of lag there. So keep that in mind, the object hierarchy here and just how Cinema 4D executes objects, especially when dealing with generator objects such as matrix objects or tracers. So that's out of the way. You can see that we have these linear points. They're not very smooth here. And that's because our type of interpolation here is linear. We're going to change this to something smooth, say, B spline. And that'll smooth out all of our points here. And then we'll change the intermediary points from none to, say, uniform. And then we can just kind of adjust this way we want to. And now you'll see that everything's nice and smoothed out. So now what we want to do is use this tracer as the thing we're going to use for spline wrap. So instead of that Y spline, I'll bring in this tracer object and turn these guys back on. So now we have our tracer tracing this Y matrix. And we're then stroking that new path that the tracer created. So now what we need to do is have our Y matrix matrices jump to the positions of these matrices on this S matrix object. So how are we going to do that? So the thing we're going to use is an inheritance effector. And if you know how to use an inheritance effector, if you don't, be sure to check on my blog. I have a bunch of tutorials going over the inheritance effector. It's super powerful and you should use it a ton. It's one of my favorite effectors. It's pretty awesome. So what we're going to do is use this inheritance effector to say, hey, have all of these matrix objects, this Y matrix objects, all of these matrices here, jump and inherit the position of the matrices on this S matrix object. So we can do that by just making sure we have our inheritance effector applied to our Y matrix and then going into our inheritance effector and say we need to choose which object we want to inherit. So right away we see we have two inheritance modes. One is direct and one is animation. So direct is just directly inheriting position scale rotation. You can see all the parameters down here that you can inherit. Or you can inherit the animation of another object. And we don't want to inherit any animation. We just want to directly inherit the position scale rotation. But really we only need to inherit the position because we're only moving things by their position, not scaling anything down or anything like that. So what we then need to do is choose which object we want this Y matrix object matrices to inherit. And that is the S matrix. So I'll drop that, drag that in there and we'll see that nothing happens at all. So what's going on? Well I'll tell you what's going on. And our issue is that with just by default we're just having this matrix object inherit the position of this S matrix object. And if I go to my coordinates you'll see that both objects are at 0, 0, 0 and X, Y and Z. So that's why nothing happened is that by default it's wanting our Y matrix object to inherit the position of the S matrix and since they share the same position no bueno, no movement. So what we're going to need to do is say hey, don't inherit the position of the Y matrix object as a whole but inherit the position. Tell the individual matrices on this matrix object to inherit the individual matrices on this S matrix object. And the option that's going to do that is this Morph motion object. So if I click that on you'll see immediately we now have our matrix objects all of our matrices jump from one to the other. So you'll see that kind of we needed to click off and update there and you'll see that if I adjust the strength of my inheritance effector we're now getting our stroke tracing the tracer that's tracing the Y matrix object or Y matrices then jumping to the S matrices as the strength goes up. So without the inheritance effector we got our normal Y object and then as the inheritance effector is now telling all those Y matrices to inherit the position of the S matrix object matrices we are now getting that nice morphing. So to make this a little bit more interesting you could just keyframe the strength or what I like to do is change the inheritance effector falloff from infinite to linear and then just change the orientation to plus Y and you'll see that I can just keyframe our inheritance falloff so that's exactly what I'm going to do I'm going to go and hit a keyframe for the X position just drag this guy over hit another keyframe and I'm just going to duplicate this keyframe by holding command and then I'm going to duplicate that original position so it's just basically going to ping pong back and forth so if I hit play you'll see we have our inheritance effector falloff go from left to right and then right to left and we have our Y morphing to our S so what I'm going to do is hide the matrices here by just hiding these matrix objects and you'll see that it's a little bit rough it doesn't look all that interesting but the magic happens when you add some delay effectors so these delay effectors are going to really make this move really super sexy looking so I'm going to go to mograph effector delay and by default it is set to blend and that's fine let's make sure it got applied after our inheritance effector cool and let's hit play so now everything's kind of smoothed out because we have this blend mode set on our added to our matrices so that's just blending all the movement between one and the other matrix objects so what if we wanted to make this even more interesting make this nice little bouncy motion well it's as easy as just adding a second delay effector so this will be delay blend and then I'm going to go and add a second delay effector and this is going to be set to spring mode we're going to get this nice springy motion but what I'm going to do is actually go into my go to my y matrix object go to effectors and bring my springy one first so this is delay spring so I'm going to have this one first so it's going to add the spring and then it's just going to smooth everything out with the delay set to blend so I'm going to bring this strength and then everything's blended together and you can have a lot of fun just playing with the strengths on both of these to get the kind of effects that you want yeah that doesn't look very good but you can have a lot of fun with just the amount of springiness and all that good stuff to get the kind of morphing that you want to have with your text cool so that's basically it and so what you want to do is when you're planning on doing multiple words or something like that you got to make sure and in my main example here I have it broken down into basically three pieces so the S and the Y the E-A-H and then the E-A-T-T-L-E for Seattle and then the underline that becomes the cross to the T and you got to keep in mind that when you're building your text is that alright if I have say just a I need to cross the T's that's definitely got to be a separate element and then with this cursive font I definitely need the capital letters to be separate or maybe you don't depending on the letters but I had to make sure that alright I have three elements in the Seattle I need to then do something with this extra piece and I just added a little underline but you could just have it kind of disappear altogether this little extra part if you wanted to so again this is my main scene and basically I just did the same exact workflow for the Y to the other objects here so you can see I have the all my matrix objects here set to each spline piece here so I have the the underline part the Y the E-A-H the E-A-T-T-L-E and the S and just all same thing got two delay effectors and then actually to get this nice kind of like random bouncy kind of movement like kind of undulating all I did was add a random effector to everything let me jump back into my other scene so to finish this off to complete the look I'm going to go and just add some kind of wiggliness to the actual text and to do that I'm just going to bring in a random effector I'm going to get up there just apply it to my random effector or apply it to my matrix object here and I will apply it before the springs and actually before the inheritance and I'm just going to set this very low value say 5 in the X, Y and Z and I will just have some animated turbulence and let's see what that looks like so see it's a little bit there let's see maybe we need to apply it after the inheritance so after the inheritance is where you want to put this guy so you can see we have this really big jiggling going on let's adjust the scale a little bit bigger so it's a little bit smoothed out let's bring the animation speed down and we can even adjust the Y and Z points here then bring the speed down even more maybe so you can have you can really experiment with just adding some noise to your object as well and getting the kind of like undulating kind of movement that you want so let's bring let's make this a little bit longer so you can kind of see we have this nice random undulation going on and that is just due to just adding some random noise here that's looking pretty good so that's complete in the look right there if you have any questions on this let me know I'd be anxious to see what you guys come up with this technique there might be some of you that are asking oh you could why didn't you do this with with a most spline and the reason why is that you can't the one thing I found that's nice about the tracer object is to get this nice smooth blend where if I slow this down you can see I'm really not getting any kinking in my spline and that's due to the fact that in a tracer object you can change the type of interpolation so a B spline interpolation is very smooth there is no option like that to smooth out the spline in a mo spline object so that's I messed around with it and figured that wasn't the best way to go but depending on what you're working on a most spline might work so the most spline you would just let me just do that really quick but again it's not the best way is you would just go create two most splines boom boom and this would be most spline y and most spline s and then what I would do is add an inheritance actually first I need to set up both of these to spline mode and just like we did with the matrices make sure we set our source spline so for the most spline y bring the y spline in there to make this width a little bit bigger just for the viewport and then most spline s drag that in there make that a little bit thicker too just for the viewport and then what we would do is have the stroke or have that spline wrap wrap around the y most spline here and we can just hide this guy and so what we're going to do is use the inheritance effector to morph from the y to the s and the one thing I found was weird was that I don't know if it's a bug or what but if I apply an inheritance effector to the most spline y and say okay inherit the most spline s you'll see the morph motion option doesn't show up but if I then apply the inheritance effector to the s most spline as well I'll go back in there and then all of a sudden I can morph between the two but immediately you'll see that we have this little issue here that you have to mess around with and kind of adjust your spline interpolation and all this stuff to even get the thing to match up correctly but if I change the falloff here to linear and adjust this so you can really see where this really falls apart if you want to use a linear falloff with this kind of effect you get all this kinking going on and that even occurs if you add a delay effector to it too I mean it doesn't look too too bad if you just adjust the spline strength I mean that doesn't look very bad at all but then you can't you're very limited to your movement you just have to morph with this strength which might be exactly what you want so this is an alternate method to doing the spline morphing but you have to keep in mind different things and this gets more complicated more complex words if this is just one letter if you had many letters you'd have to then adjust each individual things you see how herky jerk that is but another method if you want to try that as well that's it that's how you morph splines in Cinema 4D again show me what you do with it see if you figure out something cool to morph splines in between one another like to see what you come up with but as always thanks for watching and I'll see you in the next tutorial later guys