 Howdy guys, IndiePixel here. And in this video, I wanted to cover the latest and greatest sweep node that comes with Houdini 18. And the reason why I'm doing this is because, well, I made the procedural racetrack course up on Udemy a few months ago. And a lot of things have changed since that course with regards to the sweep node specifically. And so I've had a lot of questions of individuals asking me how to use the new sweep node. And so I thought might as well just make a really quick video and show you guys some of the basics and how to get used to it and understand its new functionality, which is really slick. It has lots of new features that really just remove a lot of the steps we used to have to do. So let's go and start out by dropping down a geometry node here. And I'm just going to call this my rope generator. We're going to make just a really simple rope generator. So to get this started, let's just focus on the basics first. So I'm just going to drop down a line, just a simple line. Currently just has two points. And then I'm going to go ahead and drop down a sweep node. And then we're just going to wire in the line. This is basically going to be our path. And we're going to wire it into the first input. Now the inputs for the sweep node have basically been swapped. So the first input here is for your path. The second input is for your cross sections. Or as before, or in previous versions of Houdini, it was the other way around. So you put in the cross section here in the path and the second input. And the reason why they have it in the first input is because the sweep node basically allows you now to change the surface shape type. So if you don't need to provide any other cross section, or let's just say you're doing something really simple like a tube or just a box, the surface shape has a bunch of options built into it. So we can select a round tube. And it automatically just makes a round tube for us. We can come up here and select the square tube. And that makes a square tube for us. So if you've watched any of the other tutorials or courses that I've put out, you'll remember that we actually had to go through and do quite a bit of work where we had to define our, in this case, we would create a grid. And we would have to set it to 2 by 2. And then we'd drop down the sweep node and feed in those two options there. Now we don't have to do that. Now we just change the surface shape. And for the last one here, we have the ribbon option. So if you just need a ribbon shape, so beforehand you would drop down some sort of curve and then align to make a ribbon shape. But it's built into it now. So let's take a look. Let's set this to the round tube here first. Now our next options here, our next parameters that we have are the columns and the radius. So this allows me to increase the amount of columns for my tube. And it works the same way for the square tube. So this can increase or decrease your columns there. All right, and then we also have the radius. So this allows me to control that radius. So really cool, really fast. And I actually think the sweep node does run faster. It feels faster. Maybe it's just because it feels new. We could come in and we can reverse it. If you remember from past versions of the sweep node in Houdini, a lot of times your geometry would come out reversed. And so now there's just an option to allow you to reverse it here, which again removes another node. Literally just in two nodes, we already have a tube. All right, so then we also have the stretch around turns. Now this basically replaces the functionality where it would automatically scale the corner profiles or cross sections so that it would fit. So basically as the shape was coming around a particular turn, the volume would be preserved. All right, so that's what this does here. The cool thing too is that they also built in the end caps. All right, so if we come down to the end caps here, I can go and select single polygon now and it'll cap it off with me. You can also cap it off with the grid. In this case, we get this more pill-like version. All right, and you can change the cap divisions. You can change the scale of that. You can change the roundness of it. Really cool stuff. Let's do single side polygon, which I don't think actually works for this particular one. Let's put it onto the square tube. Yeah, we're just gonna leave it there. But really cool thing about this, now we have a single polygon. And we can go and put it into a group. So again, this removes a whole nother step where we used to have to drop down the polyfill node. All right, so you just drop down this guy and select single polygon. So now we don't have to do that anymore. It's all built in. And now that we have this option to put it into a group, all right, you can see now, if we select our attribute list and group list here, we can see that those two caps are in this group. So you can go and then drop down the split node or a blast node, and you can select it from that list. So you can get just the caps if you need it. Pretty cool. All right, so let's take a look at some more of this stuff. I'm actually going to keep the end caps off for this particular project here. All right, and then we have apply scale along curve. All right, this allows us to apply scale, but currently I don't have any cross section. So in order to take advantage of this particular curve here, we need more points like that. All right, and so let's just do something like this. That's pretty cool. All right, so that allows us to control the scale. Beforehand, we would put in a value based off of the resampled values. So in this case, if I actually had this guy like that, I would do a resample. This is all what we would have to do before hooting the 18. That would give me a bunch of new points, and then I would pump out the Curve U value, which gave me a value from zero to one. Or we would do it in a wrangle node as well, and then apply that to the p scale. Now we just have the curve or the scale ramp available to us right off the bat. Just need to make sure that we add some points to our profile or our path, I should say. And then we have our rotation down here. All right, this allows us to control the pitch yaw roll. So if I put in some roll, you can see I can turn the whole object. We can twist all this stuff. And we can do a full twist based off the length of the curve. All right, and you have options here too to control that. Really cool stuff. So you also can come down here and control the yaw and the pitch individually. All right, so you can come down here and control the yaw there. Or you can do it based off of the length of the curve as well. Same for the pitch. And change it based off the length of the curve there. So lots of power in all of this. So what I wanna do now is I wanna move on over. So there's lots more other things here that we can talk about when it comes to the construction of this. All right, but usually this stuff comes into play when you actually provide something like a curve, not just a straight line. All right, currently we have just a straight line, which is really basic. So let's move on to the UVs and attributes over here. All right, and I'm actually going to turn off the scale along curve just for this particular demonstration. So let's go to the UVs and attributes tab here. And I'm gonna hit five on the keyboard. All right, currently we don't have any UVs for this particular node. Well, the cool thing is, is we can just check this compute UVs. And voila, we get some UVs. And by default what it's gonna do is it's going to actually normalize our UVs to the zero to one space inside of your UV view over here. And that's all coming from these particular options down here, okay? And so if you don't want that, and a lot of times I really don't, there are cases where you would want to have it normalized like that. So what I'm gonna do is I'm actually going to turn off normalize computed use there. And I'm gonna come down to the UV seams. And you'll notice that these two toggles here allow us to snap the U to the nearest tile boundary or the V to the nearest tile boundary. And that is what's actually snapping it. So if I uncheck these, we're gonna get the actual size. Now if you recall beforehand, we had to use the UV texture node to do all that. And we'd have to take the arc length, spline right here, and then we'd have to actually measure the length. You know, it was a lot of work beforehand. And that's why I really, really love this new version that I came up with because it just really speeds things up. So if I come down here and drop down a labs UV visualize node and just set my grid time to one, you can see we have perfect UVs. And if I change the length of my line, they scale appropriately. And if we were to switch back over to our UV view, you can see it's scaling perfectly. All right, and if I were to change something like the radius over here, look at that, super cool. All right, and let's check it out over here. So you can see it's scaling perfectly as well. Awesome. All right, so let's have a little fun with this now and take a look at some practical use case of this. So I'm gonna delete the UV visualize node there. And what I wanna do for this first sweep node here, let's go and instead of producing the quadrilaterals, this time let's just do the rows. This will give me basically a disk for each one of those points on the line. All right, so really useful. You don't always have to just produce some geometry for all this stuff. All right, so with those particular pieces, let's actually, and you know what? Now that I'm thinking about it, let's just do the columns here. Yeah, because what I wanna do is make a rope with this just by using sweep nodes, really, all UV and everything. So just to show you the power of this new node, we can make a piece of rope literally in like three nodes basically. And so let's go now and let's do some twists. So I'm gonna apply a full twist here. All right, that's looking pretty good too. Yeah, so that's gonna basically be each profile or path for our rope. So then what I wanna do is I wanna feed those particular curves into another sweep node like so. All right, notice I'm not having to use anything else other than just sweep nodes for all this stuff. And this time I'm gonna do a round cube and boom, rope, it's so awesome that way. All right, you can control the cross sections of this and the radius of all this stuff. You can then control the amount of strands that you have and the overall radius of that as well. Look at that, so now we have a rope. And we can come down here and do our scale as well. And I think I'm just gonna keep it, let's just do something like it's a little skinnier in the middle there. That's pretty cool. And then let's come into our second sweep node and do another radius like so. And there we go. And we can also control the twisting of it with this guy. You know, we should probably also in the middle here. So I lied, we're gonna use four nodes to make this rope. Let's put in a resample node to resample our individual strands here. And I'm going to set this to subdivision curves. And yeah, I think this will work out nicely for us. There we go. So we got something that's a little bit smoother now. How cool is that? So hopefully that helps out. Let's go and finish this up by making some UVs and then maybe let's put in a different curve instead of a line for this. So let's go down to our last sweep node here and let's go to UVs and attributes. I'm gonna compute the UVs. So let's just save this. I'm just gonna save it to my desktop here. I'll let you guys have this file. So we'll just call this sweep or sweep rope like so. So let's switch back over to that UV view. And you'll notice that we're getting UVs, but what's happening is because this first sweep node was actually producing UVs, it's trying to use that data as well. So if I turn that off, we get our UVs back, right? Or you can come into the sweep node down here and say override any existing UVs, which is another way to do that. So if you remember, I'm gonna keep it on length weighted and we're gonna turn off normalize. And this is just because I want the UV to actually match the dimensions of my rope. All right, so there we go. So now we have UVs for each of our rope strands. So if I were to put down that UV visualize node again and just take a look, let's actually put that grid tiling into one and there you go. We now have a rope. It's pretty cool. So I'm gonna actually close this off. Let's just really quickly make a curve. So I'm gonna go into my top view here and let's just make a really quick curve. Let's drop down the curve node like so and let's hit enter on the keyboard so we can start drawing and let's just make some rope like curve. There we go. Then let's do a resample on that just so we make it nice and clean. All right, and let's just put it to one and let's do subdivision curves. That was a little bit too harsh on the length there. There we go. Cool. So now we can just feed that into that first input over here and we'll take a look. Look at that. We have a rope. Pretty awesome stuff. When you come down here, we can control the twisting from the first node. If you wanna get more twists in there, pretty cool. All right, and so the second input, just remember the second input is for your own custom profile. All right, so far to put in some circle here that would basically replicate the same thing. All right, so let's just pump that guy in there and you can see we get the same results. All right, so hopefully that clears things up for you guys and that was a fun little exercise in learning how to use the new sweep node in Houdini 18. Thanks so much.