 In this video, we're going to take a look at finding the minimum and maximum attribute value, a couple of techniques for that, and then how to remap that so we can actually find the slope of this particular terrain here. All right, so just a couple of cool techniques inside of Houdini, so let's take a look. To start, I went ahead and created a grid here that has 500 rows, 500 columns, dropped down a mountain node, set it to simplex, and just changed the height and the element size. So, to get this started, we need to create an attribute that we can remap, so I'm just going to use the measure node. I'm going to then set it to gradient, and we're going to do the Y component of the point position. And I'm going to set this to the points. All right, so if you actually hit enter on the keyboard, you can see the visualization of that. So, basically, we're going to be getting the slope of this particular terrain, and I want to get the length of each one of those vectors, because the measure node outputs a gradient attribute, and it is a vector. All right, so let's come down here, and I'm going to say f at slope, actually, is equal to the length of v at gradient, like so, so that's all we need to do there. So call this get length, and now all we need to do is drop down an attribute remap node, like so. And what we can do is provide the slope attribute, and then I'm just going to pass it into a new name called slope, so it just overrides itself, and I'm going to compute the range and then output them in max to zero and one, and now we have the ability to remap it. So drop down a color node here, and set this to ramp for attribute, go get that slope value. You can see now we have the ability to map our slope, not too toned, it's kind of cool. So now we can actually see where all of our cliff sides are. Now, one thing I want to do is I want to make this dynamic, because I don't want to have to constantly hit this compute range, so we need to calculate the min and max. So there's two ways that I typically do to do this. So I'm going to use the attribute promote node here, just wire that in, and I'm going to call this my min value, and then I'm going to call this my max value, there we go. So inside of our min value, let's take our slope attribute, it's going to go from point to a detail, because we just want to store just the minimum value, and I'm going to set the promotion method to minimum. I'm going to change the new name and not delete the original, I'm going to call this min slope, there we go. And then we'll do the same thing for the maximum value. So slope, point to detail, we want to get the maximum, there we go. So now we have our two values here, and we're going to change the name, we're not going to delete the original, call this max slope, there we go. So now in our detail attributes here, we have a max and a min slope. So now we can feed that into our attribute remap here, and rather than having to compute this range all the time, we'll just use an expression to get that detail value. So we'll say detail, get it from the incoming geometry, I want to get the min slope and zero for the first index there, then we'll just copy this, and we'll paste it down here, and we'll do the max slope, there we go, that's all we need to do. So now we have those values, so you can just left click on the labels here to see the result value. Now if I were to take a look at my color, and hit escape on the keyboard, you can see now if I were to change the noise at any point here, it dynamically will update that remapping for us. So that's one way to do it, another way that I commonly use to perform this right here is the sort points trick. So you can actually sort your point numbering, so it's going to be kind of hard to see here because we have so many points here, but we can actually sort our point numbering by that particular attribute. So I can say point sort by attribute and slope, and that basically makes it so that point zero has the lowest value, and the last point in this geometry has the highest value. So all you need to do is then drop down our angle node and get those values. So if I run over detail, I'm going to say that my F at min slope is equal to point, the incoming geometry, we want to get the slope value, and we want to get it from point zero. Now for the last point, we're going to need the number of points, so I'm going to say npts for number of points for the variable name, and then we'll say n points to get our vex function here, and then we can just copy this entire line and change this out for the max slope, like so, and we'll say npts minus one. That's the last value. So you can see now we have our min and max slope, and if we actually were to replace the attribute remap node with this guy, you can see we'll get the same results. So just a couple ways to go about it inside of Houdini for your min and max values and attribute remapping. Thanks so much.