Modeling and Animating Toothbrush Bristles: Animate the Toothbrush with Mouse Motion Capture

Photo of Vic Garcia

Instructor Vic Garcia

Share this video
  • Duration: 14:07
  • Views: 1442
  • Made with Release: 16
  • Works with Release: 16 and greater

Animate the toothbrush with Mouse Capture using Cappuccino.

In this final lesson, we will add the set of teeth into the scene and finish things off by using Cappuccino to animate the toothbrush and fine tune the bristle dynamics.

Less...

Transcript

- In this final lesson we'll animate the toothbrush brushing across a set of teeth. We'll use the assistance of Cappuccino to animate the toothbrush, also fine-tuning the hair dynamic parameters to achieve the final result. Okay, so let's go up to the object manager, I'm going to go ahead and right-click on the toothbrush group. We'll go down select children, grab everything and put it inside the toothbrush_base layer. Let's further go in to organize things I'm going to go ahead and delete the hair growth layer and I'm also going to delete both the lights in the scene. Go up to file, merge, I'm going to import the T. C4D file. Right away you'll see that we have a set of teeth in the scene and our background has turned blue. And it's blue because we have a couple sky objects in the scene and we also have a couple of lights. Let me turn these on so you can see them in the object manager. Here's the sky objects and the lights, we'll use these a little later on when we do a final render, let me go ahead and hide these again. We also have a collider layer in here, let's turn this on. As you can see, I've already pre-modeled a collider object. This collider object will interact with the bristles, the beauty of this low res.mesh as a collider object is that it's going to help Cinema 4D calculate the dynamics a little faster. It's a lot better to apply a collider tech to a low res.object like this than instead of applying it to the gums and to the teeth which has a high poly count. The other benefit of having this collider object as a separate object is that if the bristles are penetrating through the teeth or the gum area, we can always adjust the points on this collider object to try to deflect those bristles away from the teeth or the gums. Let's go ahead and go into our teeth group, select the collider and let's go under the basic tab. Let's turn on x-ray so we can see through the object, you can see it there now. Okay so that's a lot easier to look at. Let's pull back and let's select the toothbrush group and to animate this a little better, let's move thispivot point. Right now it's at the base, let's move it here in the center somewhere, somewhere where a hand would actually hold the toothbrush. So let's click on this icon here which is enable axis. This will allow us to move the pivot point. Let's move it somewhere around this area there. That looks good. Let me go ahead and disable the enable axis. Go ahead and move this toothbrush down a little bit and inside the mouth, and back of those front teeth. Move a little closer. You go to frame zero control click to set a keyframe. Let's go to frame 90, let's move this toothbrush out, right around there, control click and set a keyframe of frame 90. I'm going to go up to the collider object right-click on it, go down to hair tags. I'm going to add a hair collider tag. I'm going to go down to the tag options, I'm going to change the friction to be set to about 25. I want these hairs to have a little more friction as they drag across that collider object. And I'm going to set the bounce to about five. We don't want these hairs bouncing around, we want them to continue having friction as they oll across the surface of the collider object. Okay, so let's go ahead and go in a little closer. Let's select the hair object so we can see the guides and let's go ahead and play this animation. You can see the hairs are colliding, that looks good. I'm going to stop this and I'm actually going to hide the collider. Let's click on the top traffic light twice till it's red that way we can hide the collider. Let's play this through one more time. Let's see what this looks like. Okay, that's looking nice. You can see the guides are going to the rest rate. They're bouncing up really quick. That's nice. That looks really good. Okay, so that was pretty simple. The animations is simple too. So let's just say your client request to have the toothbrush come along the side of the teeth and he or she wants to see the toothbrush have a circular movement and brush in a circular pattern. You can obviously manually keyframe that movement, but it'll probably take some time. So instead of doing that, we can use one of my favorite tools that records mouse movements in the viewport and that tool is called Cappuccino. Let's bring Cappuccino up. Let me go ahead and press shift C to bring up the commander, then type in Cappuccino. Double click on that. Let's bring this dialogue box up. The way this works once we press start real-time and we start moving the object in the viewport, Cappuccino will record one keyframe per frame. So we're going to have a ton of keyframes when we're done with it, but it'll capture all the data it's seen in the viewport. You can use either mouse or stylus, I'm going to use my mouse for this. So let's select the toothbrush group. Let me go into the coordinate tab and I'm going to select everything in here and right-click go to animation and delete track. That will get rid of the animation. Let me go ahead and pull this back. I'm going to rotate the toothbrush minus 90 degrees. I'm going to press F2 to go to the top view. I'm going to rotate this around and just bring it closer to the teeth. I'm going to use the move tool, I'm going to object coordinate mode. Let's go up here. I don't want to get too far deep in the mouth. I just want to barely touch teeth. Similar to what you would do when you're brushing your teeth, you don't want to be way in here. That will probably agitate your gums if you do that, so right around there. I just want to come in and start brushing right here, okay. It's switched to the perspective view, press F1. I'm going to use the rotate tool to rotate this toothbrush at an angle. That looks pretty good. Okay, so I'm going to use Capuccino to record the position keyframes first and then I'm going to do the rotation keyframes. So let's deselect rotation and scale. Let's make sure that we are at frame zero. Let's grab the move tool and let's go ahead and press start real-time. And as soon as I start moving this toothbrush, it'll start recording. So this is going to be our first pass. Let's just see what happens when I start brushing. Let's start coming down a little more, it's almost done, there's only 90 keyframes. So let's see what this looks like. You can see there's definitely interaction happening. We're getting a nice movement from the toothbrush. That looks really nice. The one thing is that I forgot to start back here. So let's delete what we just did, we should get rid of the keyframes, there we go. Let's try that again. I'm going to start down here and then go in and start making those circular movements. Go back to frame zero. Let's go ahead and click on start real-time and let's come in with the toothbrush and now we'll start creating the circular movement. I'm going to work my way down the molars, work my way back up just slowly. Okay let's see what this looks like. Again, we have some nice interaction, that looks really nice. I like the movement, too. Let me go ahead and record the rotation now. Let's deselect the position, click on rotation. You can also deselect start at current time, that way if we do mess up it will return back to frame zero. So we can deselect this for now we'll manually go back to frame zero. Let's grab the rotatable tool. And I'm just going to slightly rotate this, just like this as we go through the animation, so we can get some subtle rotation. I'm going to do that. Let's go ahead and press start real-time. So we come in let's start rotating this as it goes in. Let me go ahead and slightly rotate this as we go further. You can see it slightly rotate I'm going to go ahead and rotate down. Right, so it's really subtle. Let's see what we have now. Let's go in. Some of these movements might be a little abrupt, a little jarring, but we can fix that and I'll show you how to do that. So there's one of the rotations. All right, so we want to make this look as natural as possible. All right let's go ahead and stop this. I'm going to select the hair object and go down to dynamics. I'm going to disable dynamics. I want to see how fast this looks when we actually play it without the dynamics. All right, so we're getting some nice movement. I'm liking that. We can further add another layer of rotation, what we can do is we can right-click on the toothbrush group. Let's go to Cinema 4D tags and let's add a vibrate tag and let's go down to enable rotation. Let's zero out everything except for banking. Let's bring this up to about 20 degrees and let's see what happens when we play this back. You can see now we're getting some backing. You can see it working here on the side on the z-axis. And that's really nice to have multiple layers of rotation. All right, so let's go ahead and select the hair object. Let's go ahead and enable dynamics. Let's go ahead and run through this and see what this looks like with rotation and position keyframes. We're having some nice interaction there with the teeth. That looks really nice. Okay, let's go ahead and do one more thing. As I said, that rotation's a little jarring. So what we can do to smooth out all these keyframes? Let's go ahead and turn off Cappuccino. I'm going to go to window, timeline. Let me go ahead and dock this timeline here at the bottom and move this down and move it back up. Here are all the keyframes that Cappuccino created. I'm going to open these up. I'm going to press control spacebar to see all the keyframes. Let's select the toothbrush group. Then let's go in the timeline and functions and let's bring up key reducer. Let's pull this to the side. Now this is a really nice tool. When we dial the reduction foray up, about 50%, you'll see that the keyframes start to decimate. So now we have half the amount keyframes in the scene. And let's see what this looks like now when we play it. It's going to smooth things out a bit. So the movement shouldn't be as jarring now when it rotates. That looks a lot better. Let's turn off dynamics again. We'll select the hair and let's disable dynamics so you can see this preview a little faster. There we go. That looks a lot better. I'm happy with that. You can also go back in here and select all the keyframes and pull some of these handles, one of the handles, slightly. Let's try that again, like so. That will further smooth out the tangents. Let's play this one more time. That looks great, super happy with that. Okay, let's go ahead and stop the player. Let me go ahead and close the reduction tool and we can go ahead and collapse the timeline. And let's go ahead and render this. I'm going to also turn off this other traffic light for the collider and let's do a render. Okay, our dynamics are off. Let's try this again. Let's go ahead and select the hair object, enable dynamics and let's play this through. Before we do that, we can also cache the hair so we can help Cinema 4D play this a little faster. So let's turn go into the cache tab, enable dynamics cache and let's calculate. It shouldn't take too long, it's only 90 frames. This is looking really nice. All right, so now dynamics are cached. Let's go ahead and play this through. Let's stop it right there and let's see what this looks like when we render it. That's some nice shadows. That looks great. I added some subsurface scattering to the teeth and we have some nice collisions here with our bristles. Let's do another render. I'm really happy with the results. Of course you can further tweak the dynamics until you're happy with the results on your end, but this looks great, very nice. All right, let's go ahead and save this out. We are done. Let me go up to file and save incremental. I've gone ahead and rendered the sequence. You can see the animation in it's fully-rendered glory. Cappuccino makes it easy for us to capture animation using simple hand movements with the mouse or stylus. And Cinema 4D's hair tools allow us to quickly get great looking bristle simulations. I hope this lesson was really helpful for you and I hope it helps you with your projects.
Resume Auto-Scroll?