Glank: Sound Effector in Practice: Popcorn Ball

Photo of Joseph Herman

Instructor Joseph Herman

Share this video
  • Duration: 10:27
  • Views: 1949
  • Made with Release: 17
  • Works with Release: 17 and greater

In this video, we’ll learn the secret of using a displacement deformer and Xpresso to make a round sphere protrude in different areas with the sound effector.

The displacement deformer, in conjunction with Xpresso was used to make a perfectly round sphere protrude out in various places. This causes the object to bounce and pop about on a convex tray with the help of rigid body dynamics.

Music and found object instruments by Paul Rudolph.

show less

Transcript

- Now let's take a look at the popcorn ball. I've named it that because it kind of looks like a piece of popcorn popping around on an iron pan. What it is is it's a sphere that gets displaced to the levels of the music and thanks to dynamic simulations, reacts to this concave surface. Let's take a look up here and see what we have. First of all, we have this sphere here and I've put it in this subdivision surface. Let's quickly turn on Display Gouraud Shading with lines just to take a look at the geometry. I'll turn off the subdivision surfaces and that's basically our polygons on the sphere which is basically a parametric object. And the type of the sphere is set to hexahedron, which gives us this particular layout of polygons. When put inside the subdivision surface, you'll notice that the surface get subdivided resulting in a lot more polygons. Under that is the geometry for the tray, this thing here. This is the surface that the ball will bounce around on as it gets displaced by the music. Now under that is another subdivision surface, this one, and there's some geometry in there called Tray Low-Res. For this tutorial, I'm going to use this geometry for the dynamic simulation because it's lower resolution than this tray. For example, here's the tray's geometry and it takes just a little bit longer to calculate the dynamics which slows it down a little bit in the viewport. Let me hide that and let's just take a look at this tray here. You can see that the low res tray has a lot fewer polygons and it only has one side. The thing is is that it's going to remain hidden, so you won't be able to see it. But that's the surface that we'll be doing the dynamic simulation on. The tray will remain visible and will look like it's the one doing the dynamics. I could have done the dynamics on the tray itself, it just took a little longer to calculate and slowed things down in the viewport. You can do it any way you want. Okay, let's turn off the display of the lines. And the first thing I think I'll do is I'll click on the sphere and add a displacer deformer to the sphere. For those of you who don't know what the displacer dformer does, I'll just quickly demonstrate it in a new file. Make a new file and then I'll just quickly make a plane, add the displacer deformer to it and let me display the Gouraud Shading with lines here. And on the displacer deformer, you can use grayscale values to displace geometry in your scene. Unlike a displacement map where you won't see the object actually getting displaced, the displacement deformer actually shows you the geometry being displaced. So you can use an image here or you can use a noise shader. I've applied a noise shader to it and you can see that this object is being displaced based on the noise. If I go to the object tab and I raise it more, you can see that this object gets more and more displaced. I can put it in a subdivision surface object which will smooth it out and that's generally what the displacement deformer does. Let's switch back to our other file. We want to use the displacement deformer on this sphere and have the displacement be driven by the sound effector. Let's now create a sound effector. There it is. In our displacer deformer, for the shading, let's choose noise and let's just bump up that contrast of that noise a bit to 44%. There. In the sound effector, I want to use the fully mixed song. We're going to use this full mix here and then click Open and now what we need to do is we need to get the sound effector to drive the displacement on the displacer deformer. Before we do, let's right click on the sphere and make a rigid body tag, then let's right click on the tray and make a collider body tag. If I were to just hit play right now, you notice that the sphere just takes off and pops out of the frame. That's because this collider body tag is not recognizing the concavity of this surface here. In order for it to behave properly, in the collision tab we're going to set the shape to be static mesh. Let's rewind now and now let's play and you'll see that the object comes to a rest inside of the concave tray so it behaves properly. Now let's make the Xpresso to enable the sound effector to drive the displacement one this sphere. We'll put the Xpresso on a null. So let's create a null, then right click on it, Cinema 4D tags, Xpresso. We'll drag the sound effector in, pass it out with the object port. Then we'll make a sample node and pass the sound effector into the effector port. Then for the output port, I'll choose strength, so I'll be passing out the strength of the effector. Next, I'll want to create a range mapper here. New node, Xpresso, calculate, range mapper. Now, if we quickly take a look at the displacer deformer, we'll see that there's a strength field here and this strength amount determines how much displacement is going to happen on the object that the deformer is displacing. On the range mapper, we want to change the output range to a percent. But the nice thing about the strength on the displacer deformer is that it allows for values that are greater than 100%. That's what I want to do here. I want to remap the values from 0 to 1, to 0 to 350. This will allow us to get greater amounts of displacement on the sphere. Now, that's drag the displacer deformer in. And for its input port, we'll go to object properties and we'll choose strength. Now, let's connect the strength of the sound effector which is going to be a value from 0 to 1 into the range mapper, and from the range mapper, the remap value from 0 to 350% into the strength amount of the displacer deformer. Let's see how this looks. Before I do, I just want to hide the axis of the displacer object just as long as it's active we don't need to see it. Now, I'll rewind and hit play and see what happens. ♪ [music] ♪ I think it looks good, except there's a little bit too much slipping and sliding in the tray. That is to say, it's a bit too slippery for my liking. I'll click on the collider body tag of the tray and let's up the friction amount to 80% here. I'll also do it on the rigid body tag on the sphere. Now I'll rewind again. ♪ [music] ♪ That looks good. The displacement is making the object move around and the curved edges of the tray make it gravitate back to the center of the tray. You can increase the strength of the displacer deformer for greater amounts of displacement on the sphere, just be careful that if you do it too much, the sphere might pop out of the tray. That just about does it for the popcorn ball.
Resume Auto-Scroll?