 Welcome back. Okay. So in this lecture, we are going to take a look at cleaning up the peak that we just did in the last lecture So we're going to make it so as the peels basically get into You know where the stem and the bottom of the pumpkin is the the amount of offset or the amount of peak Basically falls away to almost nothing. All right, and that's kind of how it really works in a pumpkin. Currently It's just a little bit too intense. So let's jump back into Houdini and take a look Okay, cool. So we're making pretty good progress here So I want to go and clean up this stuff right here. That is definitely not a realistic pumpkin look So what we need to do is we need to back all the way up to our profile up here Okay, so here we have our points that make up our profile and What I need to do is I need to Put in some sort of gradient value. So as it reaches the two endpoints here. All right We basically need to Multiply or subtract I should say, you know, it's value from our peak Okay, so the way I'm going to do it and there's lots of ways to do this I'm going to drop down a wrangle node because I'm a huge fan of vex and I'm going to do a gradient value. So I'm going to say float Gradient, okay is equal to our current point number. All right, so at PT num stores a current point number All right, so basically this means that as we're looping through all the points We're getting zero one two inside of this variable right here And I'm going to divide that by the total number of points. So NPT Endpoints, there you go And the endpoints basically contains the number of points in this so in this case it'd be 18 because we started zero and go to 17 so in total we have 18 points All right, so I'm going to subtract one from that all right and Put parentheses around this guy And a semicolon at the end and you can see that I typed in the wrong Function there. I need to not make that of an attribute. All right. This needs to be a function There we go. All right, so our gradient value currently isn't pumping anything out. We can prove that by Doing that so we turn it into an attribute All right, and currently we're getting to zero and that's because both these guys are integers And we're trying to pack that into a float value over here. So let's put an integer value here Like so I'm I'm sorry. I meant floats. I wanted to cast this to a float I don't know what happened there a total brain fart And there you go. Now we get a value from zero to one Very cool. So we don't need to actually store this on the geometry We're going to just put it into the color just so we can visualize it throughout the entire network here So to do that, I'm going to say at CD, which is our color All right is a which is also a vector 3 stores 3 float values We want to say that that is equal to a ch ramp or a ramp channel I'm going to call this our falloff And we're going to pump in that gradient Variable right there Very cool. So currently it's all black and that's because we haven't actually created this spare parameter yet All right, so I'm going to come up here and hit this little spare parameter button and I get a nice Ramp value, which is why this is a ramp channel Okay, so with this value I can go in here and control that falloff So if you look over here in the scene view as I'm doing this I'm determining where That black color is where that transition from black to white is and so if I add Another value over here put that guy up one put this guy in zero. I can now control where The peak falls off with this ramp And I think that's gonna be pretty good Cool thing about it. This is all procedural so we can change it later on so I'm gonna make a little more space there by holding shift on the keyboard and Moving all those nodes up. All right, and so I'm gonna come down to the bottom here Let's see come all the way to the connectivity and you can see that our vertex colors are Point colors here are surviving all the way through. They're not getting deleted or anything We can come up here and just constantly adjust that value both on the top and the bottom Cool. All right, so what we need to do when we get down to this peak node I need to make sure that the peak gets multiplied by this Ramp value that we've created and to do that I'm actually gonna make it easier on myself and I'm going to just create my own custom peak So we're gonna say custom peak right here Because the peak node Honestly is really just taking the normal value and displacing the point by it's normal so we can do that inside of a wrangle node Really easily we can say at P which stands for the position of every point in here in 3d space All right, so that's a vector 3 as well. Now we're gonna say that that is equal to or plus equals to our current normal times our current CD color so CD dot red There we go And you can see currently right off the bat. We don't get anything We actually get just this really crazy look And that's because we're not taking into our account our group over here So I need to hit this little drop down and Select the inner points and there we go. Look at that. That's pretty cool shape in and of itself right there So what we need to do is give ourselves some sort of Slider control right so this slider in the peak node is just a slider So we can make one of those also over here so I can multiply this normal value by a Float channel like so we'll call this Global peak something like that sounds good to me There we go hit control enter on the keyboard to commit the code Hit the little spare parameter and now we have our own slider Look at that And we're currently getting the same peak value up here Which is odd and that's because our color somehow getting lost up here and That is because I need to just select that guy All right, so if the loop hasn't actually gone through and cash You can always hit this reset cash pass or just select the bottom node and Then it'll update the mesh. So now it includes the vertex colors I always forget about that and there we go. Look at that. We now have control over the peak with our custom peak node and the The insides here are getting nicely multiplied with that falloff value So I can come back up and adjust that even more make it a little bit more apparent All right, and again, I need to select the bottom one here. So what I need to do. Let's just wire this in Okay, this will become a little bit more Apparent this way. So let me just select this guy and select this guy And then we'll go back up and adjust our falloff up here There we go. So you can see now we are getting Really cool Look here and I also need to make sure that we get rid of the peak here There we go. That's what I was looking for That is way better. That's way more like a realistic pumpkin. So now let's go back up again and adjust this stuff So there you go. So now you can adjust it. So falls off nicely You know usually it's kind of smooth on the top there You know, we're gonna cut out the the top here in just a second or in the next lecture Then on the bottom it does kind of look like that usually It does smooth out though Yeah Now it's starting to look like a real pumpkin How cool is that? All right, so the last thing I really want to do. Let's just override those colors So let's give this more of a pumpkin color. Just have some fun now We'll do something like an orange-ish color like so make that really bright Very cool All right, so I'm gonna close the lecture out there and in the next lecture We're gonna fuse all this together Do some more vertex color work and then we're gonna cap these guys off and start working on the top part All right. Thanks much