 Howdy guys IndiePixel here and in this particular video what I wanted to do was talk about our next shape That we are going to create and that's the parabola now the parabola by itself isn't actually you know such a complex Set of math or anything like that But what I'm trying to do throughout all these shapes and stuff like that show you you know the math behind things like the nodes like in substance designer or The shapes and stuff like that that you find in a lot of image Editing applications and what we can do is we can apply that same math to 3d shapes as well inside of Houdini and you'll find that once you start to utilize These particular shapes and you start to blend noises in with them You're actually starting to produce kind of the basic functionality of what substance designer does right and we're doing that Here inside of Houdini, so it's really important to you know learn all these kind of staple math Functions and stuff like that so without further ado Let's go and drop down a geometry container over here, and I'm just going to call this the parabola Video all right, and we're going to jump inside and delete that I'm just going to hide all the other objects so we can only see what's inside of this geometry node itself, okay, and To get started what I'm going to do is drop down a circle and we're going to switch that circle over to a polygon Okay, we're going to make it sit on the zx plane, so it's nice and flat, but you'll notice that if you have your Backface calling turned on by default the circles actually Reversed and you can turn this or toggle this on and off by going to the optimized tab, so you hit D on the keyboard That's how I brought up this window here hit D on the keyboard, and you can say remove back faces or not All right. I usually like to keep it on Just so I know when my geometry is reversed and now you if you've watched any of the videos I go back and forth with that, you know But it's good practice to leave it on just so you know if your geometry is reversed so with this in place I'm just going to drop down a reverse node like so and What we're going to do now is drop down a poly extrude because I need divisions inside of this circle Alright, and I need them to radiate out from the center All right, and so to do this what I'm going to do is I'm going to copy the radius x here this parameter just by right-clicking on it and pasting it right there and Then what I want to do is I also want to paste it into the inset value and what that does is it brings it all the way into the center Cool So now we can easily add divisions in a circular fashion All right, so this is perfect Okay, so The last thing I want to do is just drop down a fuse node And the reason being is if we turn on our point numbers at this point You can see that we have a bunch of numbers all sitting in the center there And that's just because when we inside it all the points From each of these edges here are meeting up at the center. So we just want to fuse that So that way we don't have all those extra points now. We have just a single point point 12 Okay, let's add a couple more divisions to to the circle And let's turn off our point numbers Cool. So what we can do now is we can drop down that attribute wrangle node so I'm just gonna hit tab on the keyboard here and let's do an attribute wrangle again, you could do a point wrangle as well and I am going to then jump inside of this particular node and hit alt e on the keyboard And this is going to bring up the script editor for that particular wrangle node And the first thing I want to do is I want to produce a gradient from the center All the way out to the edge. So I want it to be completely black At the edge and I want it to be completely white the center now This is relatively easy to do the first thing that we need to do is find the position of the center of this particular object So I'm going to call this local variables center And what we're going to do is utilize that distance method And we're going to compare the current point position that we're running over because remember we're running over all the points So for every single point here, I'm going to test its distance from the center All right, so we'll say api and And I actually got a little bit ahead of myself. I actually wanted to do the get bb box. I just wanted to finish the video Anyways, we want to get the center Okay, and then what we're going to do is we're going to create a float called gradient this local variable called gradient And then we're going to use the the distance Function there, okay, and we're going to compare The current position with center and that's a vector All right, so we can compare it and what this distance function is going to do is it's going to return a float distance Basically, okay, and that will basically give us a gradient that we can utilize All right, so if we were to say at CD equals zero Like so now we get black and then if we did at CD equals gradient You'll see that we now have a gradient that goes from white to black Okay, and we can also flip it just just by doing a one minus like so so I have a nice fall off and That by itself you might think that that is a parabola It looks very similar to the parabola shape that you see inside of substance design it But if we were to add that to the position that why so let's say at p Dot y plus equals our one minus gradient here You get a cone and that is not exactly what I want, but Ta-da, we have a cone just like so all right So if you needed a cone shape that is literally how you do it super easy All right, but what we want to do is we want to create this nice art shape more of a parabola shape Okay, so how do we do that? So let's first do a little bit of cleanup here I'm going to actually pump the gradient Actually, what I'm going to do is just build in that one minus because I want that fall off basically like so So I can get rid of the one minus here on the gradient or on the color value. So now we have a inverted Cone all right, so we should probably do a minus equals and Actually, we might not need that minus equals there We need the plus Equals there we go All right, so now that we have that value all we really need to do is Take this gradient to a power. So let's do a pow And we'll just take it to The power of two and hit apply you'll notice that now we're getting this kind of cool shape It's it's a parabola, but we are getting half the parabola on one side and half the parabola on the other side All right, what we really want to do is subtract this right here All right, and we still get that same overall shape and That is because we are doing this one minus here so we don't necessarily need to do that and right off the bat you can see now We get not that inverted parabola. We get the proper parabola now, but it's now below the plane All right, and what we really want to do is we want to adjust the height of this Okay, so what I'm going to do is create another float value and just call this height and we're going to hook it up to a float channel called height Like so all right, and we'll just it apply to that and What we can do now is produce that parameter over here and just give it a value Just so it's not zero right off the bat and all we need to do is just multiply that by the power That we're doing All right, so hit apply and that now is affecting the overall height Perfect, and then what we want to do is we want to get it back above the plane based off of that height All right, so let's subtract the height from it in this case And that should be correct and that gets it back on to the plane All right, so let it apply and accept and now we have a parabola shape that we can actually adjust and We need to simply just invert our Color gradient for visualization purposes. All right, and that my friends is how we do a parabola All right, there's lots of stuff you can do from this point on in terms of creating more curved shapes and stuff like that I always highly recommend Wikipedia or some of the math references at Khan Academy They always had to do a great job of explaining you know math functions and stuff like that so These videos that I'm making around these shapes are more about how we create the shapes and noises that we see in things like substance designer because one of my goals is to utilize all those particular functions Inside of Houdini and specifically for the Houdini engine so I can have you know those that kind of power inside of Unity and inside of unreal so These are the kind of those basic core components that that everyone should know when you start working with Procedural modeling and the Houdini engine itself. All right, so That is what I had for you guys today. Thanks so much. I'll see you and talk to you in a bit. Bye