 All right, so let's take a look at how we're going to generate our UVs from all the profiles that we just copied for our base pumpkin All right, so let's jump back into Houdini and get started So what we want to do to get our UVs all created So I'm gonna hit 5 on the keyboard to go to the UV view. All right And so what I want to do is for each one of those profiles All right, so if I come back up to the copy note here for each one of these profiles here that we copied in this Circular fashion. I need to move the UVs over All right by a certain increment Okay, and I want to keep that number between the zero to one in the x direction on the UV view, okay, and so to do that we need to employ a little bit of a vex. All right, but nothing crazy What we can do is we can come in here. All right, we can go and output the Copy number. All right, so what happens there is on a per primitive basis with this little guy checked right here All right on a per primitive basis We get this copy num attribute over here in the geometry spreadsheet now If you don't have the geometry spreadsheet open Just hit the little plus button over here by any of these plus buttons right here and go to new pain tab type And what you can do is open up the geometry spreadsheet All right now I've just adjusted the the panels and stuff so they fit like this is what I'm used to using as I'm working Okay, so now that I've got that copy number what I need to do is I need to say okay for every point in each profile All right, I want to move it over by some increment using this value right here. Okay, cool So with that in mind, let's do a for each primitive Okay, this works because For each one of those profiles that we copied we have a single primitive. All right, just a single curve Cool, so what we can do is we can loop through all those guys using up for each Primitive loop. Okay, so let's turn on the single pass for this final guy here. This allows us to go through each Copy individually so you can see the results That we're getting and what I want to do let's actually do it up here What I want to do is I want to drop down an attribute promote Node this allows me to take an attribute from one class or one component type in this case primitives All right, and promote it to another type so I can promote this to a point type So the original class is primitive right. This is where it currently sits and the original name is copy num All right. I want to copy that to my point Class so now I have this copy num attribute in the point class How cool is that? This means that when I roll through each one of these primitives here I know which copy number it is So if I move this guy now you can see that the copy num changes over here in the spreadsheet How cool is that? Gives you lots of control over your data All right, so in order to move the UVs We're going to drop down a wrangle node here and I need to take the current point number All right, so we're going to call this our move UVs Okay, and I just want to move them over shove them over in the extraction over here Okay, let me actually just pull this down here so we can see it a little bit better All right, so I just want to move them over in the extraction and that's easy enough You know you can say v at UV dot x right that gives us access to the UVs plus equals 1 like so and you can see that Nothing actually happened up here and that is because in our UV texture node Sorry about that. I still have the attribute class set to vertex. Let's put it on the points. There we go So you can see that our line now moved over All the way to 1 if I did 0.5 All right Maybe right in the middle of the the UV view All right, so we can manually manipulate our UVs All right, just like a point in 3d space. It was just a point in 2d space Okay, and we're literally just moving just the one component. So just the x-axis All right, so how do we get this value? So I want to take the current copy number and I want to divide it by the total number of copies that we have so I'm going to say that I at copy num Like so because we can pull off The current copy number that's coming into this wrangle node right here All right, and this wrangle node is running over all the points. Okay, so in this current iteration Inside of this whole for loop right here. It's running over all the points. So think of this as like a loop So this is a loop right here, and then this guy is also looping over all the points So for each one of these points I can pull off what its current copy number is by using this particular syntax the I at Syntax meaning that we're going to grab an attribute that is of integer type Okay, which the copy number attribute is and then what I want to do is I want to go and divide that by some value So in this case, I want to get the total number of copies from our copy node up here All right, so this total number right here And so what I can do is I can come in here and I can say ci for an integer channel And give it a name. I can say this is called total copies like so And then hit control enter on the keyboard to commit your code All right, and then because I declared this as an integer channel It now becomes a spare parameter that the wrangle node can can create And so what I can do is I can hit this create spare parameters button over here Very cool And so now I can link this up just like any other Parameter so I can just copy the parameter here by right clicking it and saying copy parameter And I can come into this total copies and say paste relative reference like so And there we go. All right, so now if I were to look at my UVs over here You can see that we're not moving at all And let's take a look here And that's because we actually don't need to put the i in front of the copy num Because the attribute's already declared. We don't need to redeclare it. So I'm going to hit control enter And there you go. So now as I move through each one of those copies. I'm moving the UVs To where they should be All right, so let's take a look at this One more thing here. So I have 15 copies. So if I were to put this guy to copy 14 Like so let's say 14 You can see we don't have 15 because it starts at zero. Let's take a look at the UVs. It's not hitting One on the x-direction. Okay, and that's because we need to come in here All right and subtract one from our number or total number of copies There you go. Boom perfect. So now if I were to go and turn this off a single pass Like so we get all those UVs Layed out appropriately the cool thing about this is when I feed this into the skin node now It'll make proper UVs for us that works inside of our game engines or for whatever in all of our 3d packages and stuff I now have UVs and when I go and update the number of copies Our UVs updated as well Super cool All right, so we now have our start there Okay, one thing that I want to show you guys so right after here. Let's drop down a UV Visualize so I'm using the node from the game dev tools here This will allow me to visualize my UVs I'm going to set the grid tiling to one so I can take a look at this Now you'll notice that they're a little stretched on the Extraction that's because we're fitting it all into that zero to one range So I'm going to drop down a UV transform node like so And we can scale this out until we're happy with it and we could expose this parameter to our hda So we can let artists decide how they want their UVs Or how far they want them stretched out in the extraction So there you go pretty cool So now we have UVs All right, we'll take care of all this stuff as we get through the rest of This first section All right, so we'll get rid of all that stretching up there. We'll make this nice and clean and perfect But that is the basics of creating UVs For something like this without using, you know the UV protect node. This is all just manually created there Okay, I'm going to close out the lecture there and I'll see you guys in the next