From the course: Cinema 4D Weekly

Mesh morphs with fields and volumes - CINEMA 4D Tutorial

From the course: Cinema 4D Weekly

Mesh morphs with fields and volumes

- [Instructor] Hello and welcome to yet another C4D Weekly. In this week's video, I'm going to show you a clever workflow for morphing meshes using volumes and matrix objects. So here's my scene. I have two MoText objects, just a one and a two. And basically what I want to do is morph between the one and have it morph to a two. So how we're going to start doing that is by generating and building up these forms of the one and the two, using matrices and volumes. So let's go ahead and let's grab a matrix object. And what I'm going to do is have the mode set to object. And then I'm just going to drag and drop my number in here. And you're going to notice that this actually only generates a single matrix object here, a single matrices. And why that is, is that we're cloning this onto a generator object, so it doesn't actually recognize all of the polygons and the volume of this actual generator object itself. So what we're going to do is we can either make this editable by hitting the C key, or we can keep it live and throw this in a connect object. So what I can do is just slide this on over, double click, and rename this connect one. And we'll just click and drag and drop this number one MoText object under the connect. And then one other important thing is that to have this not have all this janky edges, we're going to go to the caps and check on create single object. And that's going to fuse the extrusion with the caps, okay? And now what we can do is instead of using the MoText object, we can drag and drop the connect object in there. And now you can see we're cloning a lot more matrices onto our object surface. So instead of using surface, we're going to use volume. And instead of using random volume mode, we're going to use surface as well. And now what we're going to do is just crank up this count until we get our entire form. So you can see that our number one is completely engulfed by the matrices, so this is perfect. Now to be able to get this to morph to the number two, what I'm going to do is maybe around frame 30, I go in and keyframe this object from one to two. So what we're going to do is again use a connect object, 'cause we want to connect the number two. So we'll just drag and drop there, and rename this two. Again, go into the caps, create single object. And now what I can do is on the matrix object, click and set a keyframe at frame 30 for this to use the connect object one. So from this keyframe all the way back to frame zero, it'll be using the one connect object. But then if I drag and drop connect two in there and hit a keyframe. And let me just turn this on, so you can see it. There we go. You can see now we're using number two, so now we have one and two, just by keyframing which connect object we're cloning matrices onto. But now we just have this kind of snap between these two objects, so we need to smooth this out, smooth out that transition. And the way we're going to do that is by clicking on the matrix object and going to MoGraph, Effector, Delay. And the delay effector allows us to smooth out the movement of clones or matrices by using different modes here. And blend is going to help smooth out everything, so now if I hit play, you can see that it morphs. And it's nice and smooth now. We can really crank up the strength of the blend, and we get this really nice transition there. So right now, we just have matrices. And let's actually hide the numbers from view, so all we see are the matrices. And what we're going to do to build geometry off of the matrices is using a volume builder. So let's go ahead and grab our volume builder, and we're going to throw the matrix object in the volume builder. And now you can see all of our giant voxels here. So let's go to our volume builder, and let's bring the voxel size down to, say, one. And now you can see what's happening, is we have a blobby sphere wherever a matrices is, okay? So right now, this looks really blobby, so what we're going to do is just throw in a smooth layer to smooth out the surface of our voxels, okay? And we can maybe increase the distance here and really smooth that out. But now we have some really smooth voxels that are representing our shapes here. So we can just kind of go back and hit play, and you're going to see that this is kind of moving fairly slowly. Now one very important thing to know about volumes is the type matters, okay? So assigned distance field is great for modeling, but if you click and bring up this dropdown menu, we also have fog. Now fog is great for dealing with information coming from effectors or fields, so that's why I'm going to choose fog. And now you can see this is represented by a bunch of dots and not voxels, but you're going to see if I hit play and kind of bring this through here. We still get the same kind of movement. It's a little bit faster, okay? And really where everything's slowing down is due to the smooth layer, so let's just have this go through. And you can see all the little spheres and all that stuff. And there we go. We got that transition, so now we just have a fog volume. And again, if we hit render, nothing's going to show up. But we need to go ahead and to create some meshes out of our volume. We're going to grab a volume mesher, drag and drop that volume builder in that volume mesher. And now you can see what we have. And the resulting mesh is not looking (laughing) all that great at all. And this is because we need to go into the matrix object here. And here's where we can actually adjust the size of those little blobs that are making up the form of our matrices. So you can see if I bring this down too much, we're not actually seeing the volume at all. But now you can see our volume getting back, okay? And we can also adjust the inside voxel fall off, which will help kind of smooth everything out a little bit. And then we just went a little bit too high there. Let's just bring this down to, say, 15. And to smooth this out, let's maybe bring the voxel size to about two, and let's hide the matrices from showing up in the viewport. And now you can see we have this really nice, smooth volume here, okay? And this is actually a mesh, as well, so I can go ahead and place a plastic material on here. Hit render, and there we go. We actually have something rendering in the viewport. And now you can see, is I can scrub through this and have this go from one to two, just by setting those couple of keyframes that are making the object that we're cloning matrices onto go from one number to a second number. And then again we're slowing down that transition by using a delay effector set to blend. So volumes are such a powerful feature added to R20, and it really allows me to repurpose a lot of older workflows that I used to use in the past for, say, morphing splines, to now where I can actually morph an entire object mesh using volume. So I encourage you to explore adapting fields and volumes to your old workflows and see what you come up with. I'll see you next week. So you don't want to wait until next week to learn something new? No problem, here are some other ways to feed your creative brain to keep you busy. You can check out my other courses in the LinkedIn library, visit my website, eyedesyn.com for more tutorials, subscribe to my YouTube channel, and be alerted when I post a brand new tutorial. Join my Facebook page for daily MoGraph inspiration, and keep up to date on all my latest MoGraph creations on Instagram. Thanks so much for watching, and I'll see you here again next week.

Contents