Getting Started with Houdini Engine: Fractured Dynamic Object

Share this video
  • Duration: 13:30
  • Views: 3101
  • Made with Release: 17
  • Works with Release: 17 and greater

Learn how to create a Houdini Digital Asset that takes any Cinema 4D object input, fracture it based on a parameter, and then apply rigid body dynamics.

The demolition man is here and he wants to brake things. That’s why we are going to learn how to create a Houdini Digital Asset that takes any Cinema 4D object input, fracture it based on a parameter, and then apply rigid body dynamics to drop it to the floor and, of course, smash it.
Smashing!

Less...

Transcript

- What's more fun than making things? Well, for me, it's breaking things. Let's create an asset that destroys stuff. So for that, let's switch to Houdini. In Houdini, let's tab and type 'box, ' and drop a box. And I'm going to do a couple of things. With the box selected, I'm going to go up here, okay, and select the rigid body. This is a shelf, and these are the shelf tools. The shelf tools do some pre-processing and add nodes for us, and they're quite convenient. I'm going to click on the RBD Fractured Object. And it's going to ask me a question, and I'm going to click on this button RBD Fractured Object. Excellent. You saw a change in the name. Actually, it's not the change of a name, it's an added node. Now there are two shortcuts you need to learn. One is the L for layout, and it kind of lays things out nicely. And one is the H for home, and it actually zooms in and we can see all our nodes. So there are no nodes missing outside this view. And you can see that this AutoDOPNetwork has been added. I think it stands for dynamics operator network or something like that. But anyway, let's move on. The next thing I want to do is select the box. I'll go here to my gizmo just make sure that this little button is selected there. Go to the green over here, click and drag, and raise it up. Now if I press play, you will see that the cube is going to fall, and that's not very interesting. But as you can see, we've added dynamics. Let's do something else. Again, in shelf tools, rigid bodies, let's add a ground plane. Lovely. And let's press play again, and the cube falls, and it bounces. Now you can see it's a bit fast. So let me rewind here, and we need to see this in the real time, so go down here and click on the little watch. Now it's going to play in its proper frame rate. Lovely. No breakage yet. If you want to zoom in and out, you press space bar and right mouse button, and you can press space bar and middle mouse button to pan, and press space bar and left mouse button to tumble. But anyway, you can find these on tutorials. Good. So our cube is falling, but it's not breaking. But I want to break it. How do I do that? Well, let's go back here. Press L, layout, and H. And we need to add something to this setup in order to see our cube break into pieces. And let's dive into the box. Double click. And here, I'm going to press space bar and right mouse button to zoom in, and middle mouse button to pan. And what I'm going to do is I'm going to add a couple of things. I'm going to tab and type 'scatter. ' Press enter. Now put the scatter over here. Now what I'm going to do, space bar, right mouse button to zoom out. Select this and put it in here. Now if I select this, you will see that we have points scattered on our cube. Good. And the next thing I want to do is fracture my object. So I'm going to tab, type 'fracture,' and somewhere here is the Voronoi Fracture. Fantastic. Add it here. I'm going to make some more space by dragging this up and dragging this left, pressing H and L to get things organized, although that didn't work exactly as I want it. Just move things around. And what you have to do in this case is define space bar, right mouse, middle mouse. Good. I want to get these points, and I want to insert them in the second little input, and then I'm going to drag this and put it in the first, and take the output and put it there so we can rid of that. And you can see the blue little button here. That's activated now. That's why we can only see the points. So what I'm going to do is space bar, middle mouse to go down. Let me see. Okay, this is where I want to see. And there you go. If I press space bar and the right mouse button, you can see I've got a kind of a fractured cube here. And if I press play, you will see the cube is going to start falling. You can see that there are very, very small fragments. I'm just going to show you in a bit how to change that number. It's falling and it's crumbling. Fantastic. So press stop. Rewind. And let's go to the scatter node. Move this down so we can see the attributes. And one of the parameters in the options is Force Total Count. This is the number of points created. So the setup is quite simple. We get a cube. We scatter points in the cube, and Voronoi Fracture uses those scattered points to create the Voronoi fracturing. So if I make these, let's say 30, then my cube's going to be much simpler and much faster in its calculation. There you go. Excellent. So step one has been done. But what if I want, instead of cube, to input any object? Remember what we did last time? We have to add. Let's tab and merge, object merge. Put it here. I can get rid of the cube, select it and delete it. Or another thing, you can go here and you can move it left and right, and it will disconnect from everything, and I can delete it or leave it there. It doesn't make a difference. I'm going to get my object merge and put this into the scatter and put this into the first input of the Voronoi Fracture. Now again, we can't see anything, but what I'm going to do, and this is essential, is with my object merge selected, let me get rid of the boxes in the way and I hit object merge. Just change transform into this object. Just leave it as it is. So I'm going to go up now, and I want to test this. I want to see if this is going to work properly. And for that reason, I'm going to tab and type 'sphere,' for example. I'm going to use this sphere. I'm going to raise it up. I'm going to use it by going into the box. Now it's called 'box,' and I don't want that. I'm going to call this 'fractured object,' and press enter so we know what we're dealing with. I'm going to dive in here, and I'm going to go all the way up. Click on this. And I'm going to go, click on this little button. It's going to bring up this vertical menu. I'm going to find my sphere. Select the sphere and press accept. And let me go up. I just need to make sure my sphere, by double-clicking, is rather primitive but a polygon mesh object. Let me go up. Couple of steps. Good. And let me rewind and press play. Let's see what happens. And my sphere breaks. And of course I have two instances of the sphere, the actual sphere and the merged object in here. That's why we have these two. I can just turn it off, and everything is as we would expect it to be. Fantastic. I'm going to use this now so the sphere is a dummy object I'm not going to use in the end, but I'm going to promote this parameter so that I can input any object from Cinema 4D. Now there are a couple of things when you're creating digital assets you need to take into consideration. Let me delete this to begin with. Press enter. And what I need to do is go up and find my AutoDOPNetwork. Double click, go in. Press space bar and right mouse button. And let's go and check a few things out. I'm going to click on a few nodes, and you can see that these nodes have all these links. Now as you can see here, this is an absolute link. It's a slash OBJ slash fractured object and so forth. The way Houdini works is it uses hierarchies. It's like a folder system in your operating system. And in order for a digital asset to work, all these references need to be in relative space. So what you need to do, and this is something unfortunately that there's no easy way of doing. You have to select the OBJ, just the OBJ, and press slash and type. Delete it. Delete the slash and type 'dot dot slash dot dot.' So where you see OBJ, you have to replace it with dot dot slash dot dot, press enter. And let's move and see what else we have here. Nothing there. Nothing there. Ground plane, there is path here, dot dot slash dot dot. Press enter. Let's press space bar, move around. Nothing here. Nothing here. Gravity, nope. Excellent. So I think we're covered with the AutoDOPNetwork. Now let's see if this is going to work. The good thing is that we can always go back and correct things if there's a problem. Let's check the ground plane. Click on this. You can see again there's an absolute path, dot dot slash dot dot. Press enter. Just make sure it's correct dot dot slash dot dot slash, and everything else stays the same. Click here. Go up again, and let's see if we need anything else here. We're going to go and select one by one. No path. No path. No path. And DOPinput. Oh. There you go, DOPimport, sorry. Dot dot slash dot dot, enter, and go here and say delete this, dot dot slash dot dot, enter. Fantastic. I think we are good to go now. And how do we do this now with all these nodes? Well, we select all these three nodes, and then we click on the subnet. So click on the subnet. Let's call this 'fracture with input.' Press enter. Then right click to create digital asset. And let's leave it as it is. Change the path. Add a name, 'simple fracture 01A.' Accept. Accept again. Good. We got our window. Sometimes you may be in this window. Don't be afraid, click on parameters. Click on the transform, make it invisible. Click on the subnet, make it invisible. Now let's see which parameters we want to expose. Let's dive into this. Let's go to our fractured object, and let's move up. Click on the input, drag it in here. Let's call this 'my object.' Excellent. Press enter to accept it. And what else can we put here? The scatter. We can promote this parameter to define how big or small our fractures are going to be. Drag this over here. Force total count, and let's call this 'fracture number.' Okay, that's not correct. But anyway, you understand. You can always name things the way you want. And what else do we need here? How many fractures? We have the input. And let's leave everything as is. Let's accept this, and let's go to Cinema 4D and see what happens. Back in Cinema 4D Pipeline, load asset, simple fracture, open. Let me create a cube. Let me raise it up. Zoom out. Select the asset. Drop the cube in the input. Make sure the cube is invisible, and you can see a second output has been generated. Let me change my display, and you can see that the cube is fractured. Let me press play. And there you go. You have a fractured cube. So we can get rid of the cube. We can get rid of the outputs if we want. And if we want to recreate it, just select the asset and say update generators. Let's add a more complex object, a MoText. I'm going to raise it. Select the MoText and type Maxon. Let's find a nice thick font, Impact. And we can make it bigger and we can make it thicker. And then we're going to select the asset and drop the MoText object in here. Make this invisible. Render to see what happens. Fantastic. Rewind, press play, and we have text that breaks upon impact. So there you go, your first destruction asset with a parametric input, and you can input any object you want in Cinema 4D.
Resume Auto-Scroll?