From the course: Houdini 15.5: Dynamics and Simulation

Create wires from arm geo - Houdini Tutorial

From the course: Houdini 15.5: Dynamics and Simulation

Start my 1-month free trial

Create wires from arm geo

- [Instructor] Now that we have our tentacles working in the wire simulation, what we want to do is we want to add the arms into this wire simulation as well. So let's go now over to the third main section of our network, the arms, and let's go into this geometry node. You can see there's a bunch of different things we've provided for you here, because some of the steps we're just going to have taken care of so you can focus just on the simulation. We have our arm geometry; now with the tentacles we started with wires, and we're going to end up doing some polywiring over those to create the geometry, but often you'll be in a situation where the geometry is more complicated, and isn't just sort of a simple tube around a wire, like let's look at this, we have this little bit more complicated geometry with this little sort of ruffle frill that's based on what a jellyfish arm would look like. So let's say we're in a situation like this, but we want to generate wires from this geometry to then simulate and then use back to deform this geometry with those simulation results. We're going to go see that process here. So first, I'm going to lay down a bound node. Connect that to arm one, and that's basically just going to give me a bounding box around that arm. I'm going to go to wire frame mode so we can see that clearly. Let's pull up the parameters, and what I'm going to do now is I'm going to change the divisions on this. Let's turn this on, and by default it's 333, but I'm going to make it 222. And what we want to do to be able to create a wire, is basically, let's look at this. We want the top point here, and we want the bottom point there, because if we get these two points we can then recreate a wire that's the exact same position and location as that original arm. So let me look at that, that looks like we've got .10 down there in the middle at the bottom, and with the top we have .16. So I'm going to blast, lay down a blast after the bound, I'm going to type 10 and 16, those are our points. Delete non-selected, delete unused groups, and then look at that. Now we have this one line, just from these nodes, that's in the same place as the original arm. So now what we want to do is we want more than two points on this of course, because we want to have more points for the wire simulation to simulate, so I'm going to make a resample, put that down, turn on maximum segments, and make that 49, so now this is 50 points. Let me drag this extra stuff down here a little bit to give us some more room. Now I know I actually want this reversed, so I'm going to lay down a sort node, connect that, reverse the points, so now from zero to 49 at the top, now just as we can see in the viewport, that point order has been reversed, and I'm going to lay down a transform and you'll see why we do that in a minute. So now what we want to do is we want to copy this out so there's three of them around the interior of the jellyfish. We're going to have three of these arms inside here. So if we look at this little tree we've provided for you here, let's go to this object merge, and you can see that we are merging in this subdivided version of the jellyfish body, post simulations, so there we go, looking good. And now we're doing a couple things here just to blast out a few of those primitives, to create some points on them, and create some normals, so now that we have just these three points, that if we template what we brought in originally, are extracted from the initial geometry and have those normals pointing down. We're going to copy these wires to those points, and that's going to be the source for our wires for our arms. So now I'm going to lay down a copy SOP, lay this transform one to the left input and put the attribute transfer of this tree over here into the right input, and let's look at that. Ah, and you can see that we have some orientation issues here, those aren't quite pointing in the right direction, because we don't have our normals and up vectors and everything set totally properly on our points coming into our copy SOP, so under my transform here, that's why we had this set up, because this sometimes an easy way, just say, okay, let's rotate these negative 90 degrees, and there we go, boom, we have them in the right place. So it can be an easy way, just to get things, especially if everything's pointing in the right direction, just working smoothly. So now we have our wires pointed in the right direction, there, and what we want to do is we're going to feed this into this other tree that I've prebuilt for you, and all this is is a couple for each networks that put those roots down for you in the groups, and make the you map attributes, and add some noise, and also add the target stiffness and damping, similar to what we did with the jellyfish wires. So I'm going to feed my copy into there, let's look at the out wire here. Alright, so now if we zoom out, let's frame this up so it's nice and neat with that copy one, play this back. You can see that these wires are moving, relative to the jellyfish body. In fact, let me turn off the parameters, and I'm going to template the jellyfish body coming in. You can see that these arm wires are following that body because they're connected to points that are derived from that, and there's also some noise being applied to them, even though we're going to be adding noise in the dynamic simulation, it's good especially on curvy, flowy, organic things like this to start with some noise on them already, which will help the dynamics even create a better, prettier result in the end. So now we have our arm wires ready to go, and let's continue on getting the arms into the mix of our jellyfish simulation.

Contents