 Howdy guys, IndiePixel here and today I wanted to make a video about utilizing the performance monitor here inside of Houdini Now I got a question today on the IndiePixel discord channel about how this actually works because it's not you know Overly obvious when you first start out So I wanted to walk through and make just a really quick video about how this works It's actually quite simple, but very useful if you want to go and Monitor the performance of your notes and just see which notes are taking up the most time Okay, so let's get things started here. So I'm going to create a new Geometry node here inside of the network view here and Just to test this out I'm going to create a line and a grid and I just want to basically snap the line to the grid And we're going to do a little bit of a comparison between the ray node and the intersect node All right, so we have this grid here and I want to go get this line set up so that it is pointing forward in Z All right, and we want a couple more points because we're going to be snapping this to that grid there And I just want to push it up above the grid a little bit So we have something to a little bit of room to snap to and then I'm going to drop down a mountain node here Just to displace the grid a little bit just to give it a little bit more noise so we can actually see the snapping happening All right, maybe we go and up the the res here so we can just go and Create a relative channel reference here So we just have to move this one slider to increase the resolution of our grid there very cool And now we've got this line sitting right on top of it. Let me actually move it back a little bit So we're going to move it back in Z here Very cool. And now what I want to do is go and snap this in a couple different ways All right, so I'm going to drop down the ray node. All right So this is the built-in node that allows you to snap two other pieces of geometry super useful All right, so I'm going to go and dive into the parameters for this particular node And the thing I want to change is the direction that the razor cast Currently it's set to the normals and so it's not snapping to the grid at all because we don't have any normals on this And this line so I'm just going to provide it a vector straight up So I'm going to put a negative 10 for that and like like that we get our line snap to The grid very cool All right, so the other way we can go about doing this is to utilize the intersect function inside of an attribute wrangle All right, and so for this to work I'm going to pass the line node into that first input there and The mountain node or the result of the mountain node into the second input and in here What I want to do is create a couple of vector variables So I'm going to call this out pause and we're going to do out UPW because the intersect function outputs Some data and we're going to output it into these particular variables So the next thing we're going to do is we're going to say int hit is equal to intersect like so And we are going to intersect with Geometry one or the geometry coming into this second input there. Okay, we want to use At P as the position and we want to set up our ray cast direction just like we did inside of the ray node So this is going to be 0 negative 10 and 0 and then we want to output the results of that into that out pause and out UVW Like so and we want UVW there we go All right So hit control and enter on the keyboard to commit the code and now you can see we have no snapping And so all we need to do is write one more check here So we need to say that if hit is greater than or equal to zero because the hit or the intersects function returns negative one if it doesn't hit anything and it returns the primitive number if it does hit some sort of geometry or Primitive so we can say that if the hit variable is greater than or equal to zero That means we hit something so I'm going to put in those little guys there So we can enter in our code and we're just going to say that at P is now equal to our out pause because we're outputting the hit Position into this out pause variable And like that we now have our line snapping using the intersect function Now what I want to do is I want to go and profile these two I want to see the difference in speed between this vex function and this built-in ray node So I'm going to come up to the performance monitor up here. All right, and what I'm going to do is I'm going to kick everything off by Hitting the record button and what that does is it creates a new profile for you And this profile basically contains all the data that is being stored for performance So if while this is running here, you can see it's blinking red if I start to move the viewport around you can see that It's actually managing or displaying I should say the current performance of my viewport. All right So it's telling me that it's waiting for the GPU. That's taking 0.842 milliseconds All right, so pretty cool stuff good useful information What I want to do is I actually want to take a look at the performance of these nodes And so what I'm going to do is I'm going to select the mountain node hit P on the keyboard So I can access the parameters for it without having to go over to this little guy And I'm going to start moving the value around and you'll notice that we get this new nodes drop down And it's got access to this geo node and you can see that our attribute wrangle is taking about 0.094 milliseconds there. All righty now if I turn the display flag onto the race up and then Move the mountain node a little bit more. You can see that our race up is now taking 0.029 so it's a little bit faster than this intersect function All right, so that's how we go about using the performance monitor here inside of Houdini Hopefully that is helpful for you guys and clears things up with how to use this particular pain Thanks much