 All right, so let's get some things all set up here. So first things first, what I want to do is drop down a geo node, because we are going to build the graph inside of this. So let's move it off to the side so we can just focus on this guy. And I'm going to give it a name of low poly tree video. All right, just because I've already created the HDA, so I'll have to make a different version of the HDA. All right, so what I want to do, because we're working with Vex, I'm going to split my pane top and bottom and change this over to the geometry spreadsheet, because I want to be able to see all the attributes that I have that we're creating. And I want to be able to just come over here and debug all the values. All right, so I'm going to jump inside of this low poly tree video geometry node here and delete that file node. All right, so the first thing that we want to do is build up the trunk of the tree. Okay, so I'm going to hit tab on the keyboard here and just drop down a line node. All right, so this line node is going to be that kind of bone of the trunk. All right, it's going to define how the trunk is going to be built. All right, so I'm going to basically make it a little taller. This will be our height parameter right here and this is going to be how many points we actually have. All right, so if you don't have the display for the points turned on, just go over here and turn these guys on. We're going to be using this stuff quite a bit throughout this little video series here. Okay, so what I want to do from this point, now that we've got that all set up, is I want to come in here and just randomize the normals because currently we don't have any normals, right? But I want to randomize them because I want to give the shape of the tree a little bit of noise. All right, now you could do this in a couple of different ways. Okay, so let's do the really quick and dirty way. I'm going to drop down a point trigger node here. All right, so you can see that this is a good way to put some noise onto the actual points themselves, but it gets out of control really fast, all right? And I don't really have a lot of parameters to choose from, like different noise types or the overall magnitude of the noise or the amplitude, all right? Oh, we're the scale of the noise, really. I mean, we do have the scale right here. So what I want to do is I want to set up a little bit more of an advanced system for this. Okay, so what I first need to do is I'm going to drop down an attribute randomize node here, like so, and I'm just going to pipe that in and we're going to call this our random normals. Okay, let's make some more room here. And what I want to do is I want to affect the normal value. Currently it's by default doing the color value, so it's creating a random color value. So all I need to do is type in capital N there for random normal, okay? So the min and max are actually set up appropriately, but what I want to do is I actually want to remove any y value, so we don't want that. I just want this on the x and z plane, all right? And you'll notice that they're all pointing in a positive direction. All right, they're all pointing in that positive direction, the x and y positive. So we also want to get some negative value on there. So I'm going to do a negative one for the x and z as well. And you can see right off the bat, we now have just random normals in all directions there. So a really quick way to do that. Now you can do that inside of x as well, but using the node here is a lot faster than writing the code, all right? We're going to write quite a bit of x throughout this particular series. So I try to look for ways to just speed up the creation of basic parameters here with these nodes. All right, so the next thing I want to do now that we have that is drop down a mountain node, like so, there we go. And this mountain node is going to utilize those normals that we created, all right? That's why we created them for the particular purpose. All right, I just wanted to give it some normals to actually push and pull the points in a particular direction. And the nice thing about this now is that I have different types of noises that I can use. All right, so I can really start to mess around with the different looks. Now, I don't really want the first point to be offset. The rest of the points are fine, all right? And I also want to kind of like mask out the noise from bottom to top. So I want more noise on the top and less noise on the bottom, okay? So let's go and create a attribute wrangle node for that. So I'm going to place an attribute wrangle node here. So let's do attribute wrangle, pipe that in like so and put that into the mountain node. And we are going to create a mask. And so to do this, what I want to do is I first want to create a gradient value. All right, so let's put this particular node on first. So I want to create a gradient value. All right, we've seen that before. So what I'm going to do is I'm going to say F for float. All right, so that's the type that we're creating. And then the at symbol, it's just telling Houdini that we're creating an attribute. And we're going to call this the gradient. And that gradient is going to be equal to the at pt num divided by our at num pt, the number of points. All right, we need to make sure that we cast this to a float as well. So I'm just going to do that like so because those two values come in as integers. All right, and in order to get a float value, we have to cast them to a float. So we're casting an integer to a float. All right. So now if we take a look at our gradient value here, you can see that we get a value from zero to point nine. Well, that's not exactly what we want. We want it to go from zero to one. So we need to subtract one from the number of points and then put parentheses around this like so. All right, so now we get a value from zero to one. And that's just because the value inside of num pt is the total number of points, okay? So if we look at our point numbers here, we actually have 10 points, but the first point number is a value of zero. All right, so when we get up to nine, we're gonna get point nine if we don't subtract one because we have to divide the current point number. All right, so when we get to the last point in this list here, in this series of points here, if we were to divide 10 or nine by 10, we get point nine, right? But if we were to divide number of points minus one, which would be nine, we get one because the last point here is one. It's just because it's a zero-based indexed, all right? So that's why we have to do that. So now we have a gradient value and we can confirm that right here. Again, you can always come in and you can do the CD. Let's do something like r is equal to at gradient like so. And that will allow you to visualize it. Sorry, we need to put the, there we go. Like so. And it's not actually doing it. We need to actually initialize the color value first. So at CD is equal to zero. That'll just initialize it to black and there we go. So now we have the proper display. So you can see it's black down here. And then as it gets to the top, it becomes more red. All right, we could also have done something like this where we don't put it into the red. We just make it full white. There we go. Cool. All right, so those are the first steps. What we wanna do now is because the mountain node is using the normals, all these random normals here as the value to basically displace it, we can actually take the current gradient and the current normal. We can say at n, that's the normal, all right. And we can say times equals at gradient like so. And did I spelled that right? Nope, there we go. All right, and you'll notice that when we do that, the first point in the list or in this line now goes back to its original position because it's zero. All right, very cool. So that basically now kind of tapers off or attenuates the noise as it gets to the top of the trunk. Now we could take this even further. All right, so let's get rid of the color display. It's just there for debug and visualization. We could take this one step further now and we can actually apply a gradient or a ramp to allow us to further give more artistic control over where and when the actual noise is most intense, all right. So in order to do that, it's really easy. All we need to do is start typing out CH ramp like so. All right, we're gonna cut and paste this value into the second parameter of this CH ramp function. All right, so what we're gonna do is we're gonna do noise fall off like so. That's the name of the ramp, all right. So that's what you'll see as the label for the ramp. And then I'm gonna pump in the gradient as the driving value that's driving the ramp here. All right, so by default, basically everything gets zeroed out, which is perfect. Let's just go and create that spare parameter and there we go. So now we have a way to control where the noise actually gets placed. So I'm just gonna put a little bit more noise at the top there like so. And you can overpower these too. So we can take that, you can select one of these positions on the ramp here and just use the increment ladder and you can overpower it. So it'll just increase the noise even more. But I tend to leave that just normalized, zero to one because we can go back into the noise over here in the mountain node and we can change the height up here. All right, very cool. Now we can get even a better look to all this as well. So we can come up here right before the line or we can go into the line two in and of itself and we can just add more points. Like I said, so we can really see our noise here. So let's get rid of those point numbers. Cool. And let's go down and go back into the noise and change the element size now and maybe change the scale. All right, so you can play around with all these different values here. Do maybe just a purlin. Start playing around with maybe the roughness value. All right, so we can go through and create lots of different parameters for all this that we're messing around with the parameters. So I just wanted to show that you also have control over the noise right there. Okay, so I'm just going to reduce the amount of points back down to, let's do like 15. That's pretty good. I think that's what I ended up using. All right, so with that, we are now ready to finish up the trunk here. Okay, so what I'm going to do is create a circle and I'm going to switch it over to a polygon. Like so, let's turn it on like that. And we're going to put it on the X or ZX plane. And what I want to do is drop down a sweep node now. Okay. All right, so let's wire that into the cross section there and then we're going to put the path for the trunk into the bone or the backbone there. And now we have the circle swept along the line. Now you can see that by default, we don't have any sort of like taper up to the top. So what we can do is we can come back into our attribute wrangle node over here. Okay. And we can do a nice little trick here. Now the sweep node is looking for a particular value called the pscale. All right. And that's what this little checkbox does. It says transform using attributes. If you have this turned on, it's going to be looking for a couple of built-in parameters and that those parameters are pscale. And up, you can see in the help here, trans the ROT or rotation, orient and pivot. All right. So those are all built-in values that this sweep node is actually looking for. So what we can do is we can come in here and utilize that gradient value that we've created. All right. And we can create another ramp. Okay. So what I'm going to do is I'm going to say at pscale, right? Cause it's a built-in attribute. All right. So I'm going to say at pscale equals ch ramp. And we're going to call this the trunk shape. And then I'm going to pump in that gradient. All right. So we have one gradient that is controlling the noise falloff. And this other gradient is going to be controlling the trunk shape. All right. So with that, and you can see now that I've clicked out of here and let the code compile our circle now has the value of zero for the pscale. And that's just because we haven't created the spare parameter for this ch ramp. So I'm going to hit this create spare parameter and there you go. So we can flip it. All right. So if you want this, it really depends on how you want to visualize your particular curve or your ramp. So you can flip it. So if we were to put in a negative value here right before that ch ramp declaration it would actually actually, sorry, you can't do that. Get to put it in front of the gradient value here. So if we just do a negative, it flips it for us like so. Alrighty. So what I want to do is keep it like that. But I am going to just flip my ramp as well. All right. And now what I want to do is have control over the trunk size. And that's going to be controlled from the circle. It's a lot easier to control it there. So I can just do something like that. Cool. All right. Let's go now back into the sweep node here into the output. And what I'm going to do is just say skin with auto closure. And now you'll notice that whenever you do that without creating any sort of normals for this particular line that follow the path of the line our geometry comes in inverted. So all we need to do is easy fix here. All we need to do is come into the polyframe node. So I'm going to drop down a polyframe node here. Like so. And what I'm going to do is just turn off normal name. And in the tangent name, I'm going to feed in the normal. And with that, you'll notice that we get, let's put it to points, first edge. Sorry, two edges. And you'll notice that we start to get some geometry but now our circles all messed up. So what we need to do is just put this to a different orientation. And there we go. Now you'll notice that our geometry isn't flipped anymore. So all we need to do to get it to render appropriately is fix those normals. And we can do that really easily with a normal node. So I'm just going to type out normal. There we go. Drop that down, feed it in, and there we go. Perfect. And we can turn that off. And now we have our trunk. Very cool. So I'm going to leave you guys there in this video. And in the next video, we're going to take care of placing branches onto the tree in a specific spot. Okay? Thanks so much.