Exploring Houdini Vellum Simulations: Creating a wobbly lights rig. | Eric Ebling | Skillshare
Search

Playback Speed


1.0x


  • 0.5x
  • 0.75x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 1.75x
  • 2x

Exploring Houdini Vellum Simulations: Creating a wobbly lights rig.

teacher avatar Eric Ebling, Award winning Visual Effects Artist

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

    • 1.

      Introduction to the Vellum Course

      0:51

    • 2.

      Lecture 1: The Initial Setup

      23:45

    • 3.

      Lecture 2: Finishing the basic Setup

      24:54

    • 4.

      Lecture 3: Rendering the Vellum

      31:16

    • 5.

      Lecture 4: Adding Fade and Flicker

      23:32

    • 6.

      Lecture 5: Velocity and Rivets

      10:10

    • 7.

      Lecture 6: Adding Lightning

      26:16

    • 8.

      Lecture 7: Rendering the Lightning

      8:27

    • 9.

      Lecture 8: Creating Ground Lightning

      22:49

    • 10.

      Closing Remarks.!

      2:01

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

11

Students

--

Projects

About This Class

 

 Hello and welcome to my Houdini Vellum simulation class.! We will be learning all about Vellum in this class by hands on learning. You will see every step that goes into creating a Vellum setup from scratch, and follow along to recreate the scene file in your own session of Houdini.

 If you have zero prior experience to using Houdini, you should consider checking out some more basic lectures on Houdini. I have many free videos available on my youtube channel @EblingFX you could start with. I will show you every step I take in this class, but I will not explain extremely basic things like what a transform node does or what a wrangle node is. You should have a basic knowledge of Houdini to proceed with this class.

 You will need a computer and a version of Houdini installed, preferably at least v18+. You can download the latest version of Apprentice for free from SideFX, so this should not be an issue for anyone interested in taking this class.

 The lessons are numbered, 1 through 8, and you should watch them in order to follow the class correctly.

  • Lecture 1: The Initial Setup - We will get the basic geometry setup and do some grouping that will be necessary for the Vellum setup.
  • Lecture 2: Finishing the basic Setup - We will convert the geometry to vellum and add some constraints, including breakable glue constraints for some interesting behavior. 
  • Lecture 3: Rendering the Vellum - We will look at rendering the geometry as lights.
  • Lecture 4: Adding Fade and Flicker - We will creatively use our breaking Glue constraints to automate a flickering effect on our lighting.
  • Lecture 5: Velocity and Rivets - We will have a quick discussion about creating clean velocity and how you can use Rivets to parent real lights to our simulated geometry.
  • Lecture 6: Adding Lightning - We will add some procedural lighting bolts to our dethatching light geometry.
  • Lecture 7: Rendering the Lightning - We will render our lightning effect.
  • Lecture 8: Creating Ground Lightning - We will see how to quickly add ground based lightning to the setup.

 Once you have completed this class, you will have a solid knowledge of using Vellum in Houdini and how to use multiple constraints to be able to control Vellum however you need to for your own FX shots.

Meet Your Teacher

Teacher Profile Image

Eric Ebling

Award winning Visual Effects Artist

Teacher
Level: All Levels

Class Ratings

Expectations Met?
    Exceeded!
  • 0%
  • Yes
  • 0%
  • Somewhat
  • 0%
  • Not really
  • 0%

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.

Transcripts

1. Introduction to the Vellum Course: Let's start this video off with an example of what our final output is going to look like. We're going to set up this scene file from scratch. In this class, we are going to cover a bunch of different vellum concepts. We'll be looking at a number of different constraint types, including glue constraints and how we can break them apart during the course of a simulation, and we'll be using another type of constraints to create rigid body like dynamics. On our light geometry that detaches from our vellum string. I'll be showing you tricks all along the way to do things with wrangles, VCs, and vops. Including how to create these electricity type effects that you see. A total of eight video lectures within this class to show how to set up a system like this. We'll be covering quite a bit of information in a short period of time. If you're interested in learning how to do a Valum setup like this, come check out the class. 2. Lecture 1: The Initial Setup: All right, so, let's get started setting up this scene file. If you don't have a Houdini session open, open one up right now. You can see I am using version 20.0 0.590. That is the latest version of Houdini at the time of this recording. If you're using a version before this, don't worry about it. Everything that's going to be shown here has been with vellum for many versions, and you shouldn't have any problems using an old version. As well, if you're watching this video in the future a few months or even years after it was recorded, everything should still work as long as side effects has not changed vellum significantly. So what we're going to do as you saw in our little preview, We're going to create a wire that is basically going to have a bunch of lights strung on it. So first thing we're going to do is hit the tab key. Drop down a geometry node. We can label it anything we want. We'll call it Velum string lights. Dive into it. Double click it or hit n or to dive in. We're going to have to create a start and an end point for our line. We can do that easily by just creating some points. We can do a point generate node here. They used to have another point node, which doesn't seem accessible anymore. So this is how we'll do it now. Number of points, we only need one. If you middle click, you'll see we have one point. Now to move this point into position, we can put down a transform node. So hit tab and type transform and now wire it in. And let's just translate it to y to say 0.35. And z, we can do 0.5. And now we can alt and the left click drag it over to create a copy, and we're going to want to keep it at the same height. But let's just change the z value to negative z 0.5. It might be hard for you to see on screen, but now we have two points, and if I enable our point numbering, you can see them easier. Zero and zero. That's because they're separated right now. So let's drop down a merge to merge them together. We want both these points to be considered part of the same geometry. So we can merge them. And now you can see we have a zero and a one. So that'll be the source of our wire that we're going to create, this line that's going to be our vellum string. Let's do something now. That's just go to give our string a little more interest. We're going to animate one of these points here. We can just pick transform two. It doesn't really matter. Hold Alt and left click the translate value. So we're going to key frame it here at frame one. Now, just move to say frame 40 is fine. Come over here and enable this icon. That way, we'll have our transform handle here, so we can see when we move it. And we can just move it anywhere you want. You don't have to copy these values exactly. But once you haven't moved to where you want, click Alt and left click again, so we can set another keyframe. You can see the turn green, so that means we set a key frame. Now move the time slider again anywhere you want, say frame 60 eight's fine. And we can move it down and over. And maybe a little forward. Now Alton left click again. And then we can go to say frame 80. And just move it up and over again. Now we have this little bit of movement here. This might not even be movement that we want in the end. But for now, we're just going to put a little bit of movement in there so we can use this later on. And we can look at some examples of how to pin vellum to moving points just so you can see how the constraint works. As a matter of fact, let's drop down a time shift node now. So hit tab and find time shift. Wire it in here. And let's just rename this to freeze points. And for now, we can delete this channel. So right click and say delete channels. And that'll freeze our point motion on frame one. Now you can see they don't move. If we disable it, now our 0.1 does move. You might have to look closely on the video to see it, but you'll be able to easily see it in your own scene file. Let's also hit our Z key, and we'll make it round. You can choose any of these icons that you wish. But a lot of times, it's a good idea to change nodes that you know you're going to need to change values on, that'll make them stand out better than just the default node shape. You could do all your time shifts as the spherical shape, and then they would stand out. Can also change the color on these nodes, so they'll stand out better. If you hit the C key, then we could make it red. Now if we disable it, you'll see it's a bright red color. And if you were digging through a network with hundreds of nodes, it would make it much easier to find a node like this. You'd be much easier to spot a red circle than just a regular shaped node. So now we can create our line. There's going to be multiple ways we can do this. If you've ever watched any of my Utomi courses, you'll know that I point out usually that there's multiple ways to do anything in Houdini. So I'll show you the easiest method right now. Hit tab and type ad. We can just wire that in. And all you have to do is go over to the Polygon tab click by group, and you see we get our Poly line here between our two points. If you middle click, you can see now we have a primitive and a polygon. That's one of the simplest and fastest ways to make a line between two points and Hudini. But let me just show you another method just so that you know there are other methods. In this specific case, if you just wanted to create a line between two points, we could use our connect adjacent pieces node and just wire it in. Let's visualize it by clicking the display flag there. Now, we can go up here and just say adjacent points. Search radius. We know they're spread out by a unit of one. So let's just increase this. If you decrease it enough, you'll see the line disappears. Max search points. We can just set that to two, since we know we only have two points. Middle click again. You see we get the exact same output, two, one, two, one, two, one, 21 over here. So that's just another way of getting a line made in Houdini. And if you like VX encoding, and you should like VX encoding, if you want to be a professional hudini artist. I'll show you a way that we can actually do this with VX. So hit Tab type WR A and drop down an attribute wrangle. Connected into the first input. We always want to be working on that first input geometry when we're just working on one source of geometry. Now, you can just type add Prim. If you don't use much x, a very handy thing will pop up here for you. It'll tell you basically what the function does that you're typing in. So it says adds a primitive to the geometry. It gives you a little bit of a usage scenario here. It says It add primt Geo handle, string type. If you look down at the very bottom, it'll give you a description of Geo handle. It tells you what it's looking for. But unfortunately, it gets cut off on my screen here, and you can't seem to scroll this menu down. A that means here is the Geo handle that's the geometry we want to work on, and that's going to be input one or the geometry that it's currently plugged into the node into that first input. So in x, and in most coding, the indexes start at zero, so we'll type zero, and then. And then the type will be poly line, so type polyline in parentheses because it's a string. We have to spell it correctly here. And then we do coma, and we want it between 0.0 and 0.1. So now, you see, we get a line. However, if you middle click the node, Now, look what we have. We have 22, 42. These other nodes only gave us 2121, two, one, two, one. So what's happening here? We're getting 22, four, two. We're getting two primitives and two polygons. You might be a little confused as why that's happening, but it's actually generating two lines. And the reason is because an attribute wrangle node is going to work on all of the input points that are going into the node. So if we visualize up here, we have zero and one, So what happens when we run our code? Think of it as a four loop. It's going to loop over every single point in that input. So on 0.0, it says add Prim, and it says, we're going to add it to our input geometry. We're going to add a poly line, and we're going to add it between 0.0 and 0.1. So it creates a line. Then it goes to 0.1, and it says, again, let's add a primitive, and it runs the exact same code again. That's why we're going to get two instead of the one. So if you did want to do it this way with a wrangle, a very simple way of getting it to just work on one point is to go up here to the group area and just type zero. Now it's only going to run this code on 0.0 that's coming into the node. And if you middle click, we're back to the 2121 output. So just be aware if you're going to use wrangles, it's going to work on every single point that's coming into the node. Now, there's also another option, and I might as well show you while we're here. You can left drag this over to create a copy, remove this group zero. And now just change this to detail mode. And if you middle click, now you're going to see 2121 again. Why is it like this? Well, when you run over detail, it's saying right here, detail only once. This code is only going to run one time. And it will just create one poly line between 0.0 and one as the code says. Now, that seems like quite a bit of information for just creating a line. But I just want to show you the versatility of Hudini and the options that you have and show you that there are many, many ways to do the same thing in Hudini. But for sake of simplicity, let's delete all of these. We're just going to stick with our ad node. Alright, so now we need a more high resolution version of this line. Right now, we only have two points. It would not behave like a wire or have any flexibility if we tried to send this. It would just be a straight line, which can be seen obviously if we hit the bypass flag here on our time shift node. You can see this is a line here moving. There'd be no way of bending this if we send it with no segments to this line. Let's re enable this. So now, I'll just drop down a resample node and plug it in. Check it out. Automatically it resamples it here for us. You see we have zero through ten so we have 11 points. But let's make some changes here. We don't want to use this maximum segment length. That can actually have a changing number of points, especially when you have moving geometry. Let's see if it actually just does it on us here. You can see the point numbers are changing. It might be hard for you to see this on the screen of the video. But if you try this in the local file, you'll definitely see it. Just look at the points. They're actually changing and re numbering. Right now, it only goes up to ten is the last number. And the moment it starts to move, now it ends at 11. You would not want that during our simulation setup. That could potentially screw up constraints, depending on how we're creating them. So let's just turn off this maximum segment length, and we'll turn on maximum segments. This allows us to hard code exactly how many points we want or how many segments. So just type in 40. Now you see it ends at 40. And even if we have it animated and moving, it's still 40. See how that works there, so that's great. So this will always give us 40 segments, which will give us a stable point count, which is exactly what we're going to want. So let's just rewind this. And we can turn off this bypass flag. So we re enable our freeze. So we'll just have our static line again. And now we're going to want to get our end points, and we're going to put those into a group so that we'll be able to use those later on when we're setting up our vellum. Again, in Hudini, there's going to be many ways to do this. I'm going to show you one way, and then I'll probably show you another way so that you just know the different options that you have. We'll start with VX because I like VX, and it's simple. So type if parentheses, and we'll type neighbor count. And you'll see it pop up and tells us what it's expecting. It wants just geometry and an int point numb. And all it's going to do is tell us how many points are connected to that point number. So it's going to look at every point in our line and just tell us how many points are connected to that point, which is why it's called the neighbor count because that's your neighbor point. So let's type zero for our geometry and at PT num, so it'll run over each point, and that's exactly what we want. And now we just want to check for ones that are equal to one. So now do a curly brace and a closed curly brace. And now for visual reference, you can always use a color to see something visually to make sure your code's working correctly. So do at C lower se D equals curly brace, 10, zero, and that'll create a red color. And that might be hard for you to see on screen, but let me disable our point numbers here. And if you look at the end points, you can see it's red, and then it fades into white. And if we look at the other end, it's red and fades into white, why is that? Well, because the ends only have one neighbor. There's no points to the right. And there's one neighbor to the left. Same things if we go to the other side, there's nothing to the left, and there's one neighbor point to the right. Every single other point has a neighbor on the left and on the right. So it would return two neighbors. If you want to confirm that, you could change this to equals two. Now, every point's going to be red except for the ns. You can see that they're still white. But that's not what we want. We want to isolate these ns, and our real intention is not to color them, but to add them to a group. And you can do that invex easily by just typing at group underscore, and we'll call it ns that will be our group name, and we'll say equals one. Now, if you want to confirm that this worked, you can always go up to your geometry spreadsheet, and you can see group ns, 0.0 has a value of one. So that means it's in the group. And if you scroll down 0.40 has a value of one, so that is in the group. And no other points are in the ends group. That'll make it easy to isolate these end points and access them later on when we're setting up our velum. If you're unfamiliar with X, I have more lectures on U to me and also on U tube and CFI that explains a lot of this more basic stuff. This course has meant more for artists that already have some familiarity with X. But if you have no idea what the stuff is, you might want to check those out. You might be confused why there's a double equals up here and only a single equals down here. When you're in a conditional, if statement like this, if we were to use a single equal sign, it would be trying to assign the value and not do a comparison. A double equals looks for equality. That's what it's searching for. Not an assignment. When we're down here, and we want to make our CD value equal to red, we use a single equals to assign the red value. I hope that clears up any of that confusion if there was any. We can comment out our color line now, our CD line. Only had that in there to visualize it so you can do the double forward slash. And this is a good trick you can use when you're just trying to see if your x is working correctly. Now, if you really hate x and writing code altogether, I'll show you an alternate way of doing this. You can type group, wire it in, visualize it. Let's sell it points. And you can just type in at zero and 40 here. Now, again, it might be hard for you to see this on screen. But if you look closely, that endpoint is highlighted, and this endpoint is highlighted, which means they're in the group. If you wanted visual confirmation again with a color, we could do that. You can drop down a color node, wire it in. We didn't name the group ends yet. So it'll be called group one, and you can just set it to group one and then create a red color. And you'll see we get the exact same functionality. We get red on the ends. However, if you change your resample node, then this would fail. So if we increase this now to 46 segments, now look what happens. Our end point now moved because this is still looking for 0.40, which is now moved over here, so it's no longer on the end. So that wouldn't work out for you. It wouldn't be all that procedural. However, if you still didn't like x and wanted to go this route, you could easily go up to our resample node. You could right click the segments, select this copy parameter, go back now to our group, and go to the base group and remove this 40, and then right click and say paste relative references, You can now see if your middle click, it says 40, and it works. If I go back here and change this to 50, it's still red on the end. It still works, and now it says 50. What's happening is this is a CHS function, that's going to link to a string channel, which is kind of odd that's a string. You would think it'd be an integer or something. But for whatever reason, it's CHS. You could also change this to just a CH function, a channel function, it's still work. You can see it still says 50. And if we change this back to 40, I still is 40 here. So that's an alternate option if you just really hate writing code. But we're going to stick with the Vx example in the class. Now, let's actually drop down another group node, and we're going to were it into our network and create a second group. And let's call these wire points. And let's change this to points. Now we'll just have all the points that are on this wire in a group called wire points. And again, that's just going to help us down the road when we need to access these points. And now let's drop down another wrangle, wire it in. Visualize it with a display flag. Now we're going to create our actual light points or where we want our light geometry to be parented to or constrained two. And we're going to use x for that. So you can type I at PT num, modulus or modulo two, create our closing and n brackets. And we're going to create a group. So we'll do at group underscore. Copy here. That will be very simple to know what we want it to do equals one. That's where we're going to copy our geometry lights two. Now, again, you can confirm this in your geometry spreadsheet. You can see copy here. You see it's alternating zero, one, 01. That's what our modulus or Modulo function is giving us. It's picking every other point for us. If you've never heard of modulus or modulo. I have to me courses with basic information like this. You can also do an Internet search. You can Google this, and you'll find lots of information about the modulus or Modulo function. I'll just tell you quickly, what this does is it returns the remainder of division. So all it does is it looks at the point number, divides it by two. And it returns the remainder. So when it's an even point, it returns zero. When it's an odd point, it has a remainder. So it returns one. If you want to visually confirm this, again, you can use our CD trick. We'll just create a red vector here. And you'll notice all even numbers do not get red. All the odd numbers do get read. And that's because when you divide one of these points by the number two, you sometimes get a remainder, you sometimes don't. We'll look at this. 2/2 is one, two goes into two once with a remainder of zero. When we go into four, 4/2 is two with the remainder of zero. So a remainder of zero is going to evaluate two false in an if statement. It'd be like replacing this with if zero. It would not run the code because zero is false. If statements only going to run the contents of its code block if the statement is a true statement. So any remainder, anything other than zero is going to evaluate as true, and the code will be run. I hope that's not too confusing. It shouldn't be. It's fairly basic stuff. Let's remove this visualization, though. We don't need the color. That was just for our own personal use to make sure everything's working. Now, this code wouldn't work fully correctly if we changed our point count up in our resample node. Let's just go up here and change this to say 43 and look back down here. And actually, let's re enable this color. You'll see now no point on this end, but we do get a point on this end that's red, and we don't want that. That wouldn't be accurate when we want to copy our geometry to every other point. We didn't want any on the end points. We wanted just to be on the inside points. That's why I specifically chose 40 as my number up here. You'd have to modify your code if you used a different segment count just to point that out so you know. Now, let's disable our color again. We can turn off our point numbering here. Now, let's just drop down a box node. We're going to be copying boxes to these points to represent our lights, Let's change our scale to something like 0.017 for our uniform scale, we're going to want a very small box here. You can see that it'll be the size of our box. And now let's drop down a copy to points. You plug the geometry that you want to copy into the left input and the points that we want to copy two on the right, and now let's check it out. Very straightforward and simple. But now let's make sure that we're actually copying to just the points we want to copy two. You can see we're getting a box on every single point, and we don't want that. So if you pick a copy here as our target point, Then it only puts a box at the target point, exactly what we want. These are the points that were read up here, if you recall? Now, let's drop down a group delete node, and wire that in. If you middle click, you'll notice that these copy boxes get a copy here group, which is fine, but it also gets ends and wire points as groups. We don't want those groups on this geometry, so we can select them and delete them, and then check this delete unused groups option. Now you see it only has the copy here group. It could cause problems later on if we had the Wire points group on these boxes when we use it later on in our vellum setup. We want that to only be on our wire later on for our constraints. Now let's create another group. And this will just be called boxes. We'll create it as a point group, and that'll be just so we can identify our box geometry later on. And now let's drop down a transform node. And we're just going to transform these boxes down slightly, so they won't be directly in the wire. That could cause some problems later on when we're setting up constraints and running our SEM. Let's just drop it down negative 0.02 and y. And you can always visualize the line geometry by templating up here. Now you can see where our line exists, and where our boxes are. They're going to hang down a little underneath the wire, and these will be representing our lights. Now, let's zoom out a little bit. And we'll just drop down a merge node. And we're going to merge this line geometry. Let's move that over a little bit here. And now just plug it into the merge and then grab the transform output and merge that to. Now we'll have both our wire and our box geometry combined. That'll make it easy to just pipe it into a velum setup, which we're going to be doing next. But I'm going to cut this video here to try to keep this somewhat short. We're going to pick up in the next lecture and see how to turn this into vellum. 3. Lecture 2: Finishing the basic Setup: All right. We are back, and we're going to now convert this into a vellum simulation. If you close down your file, open it back up. Dive into your network if you need to, and then let's get down here, and we will drop down a vellum configure cloth and plug the output of this merge into the first input, and let's visualize this. Now you'll see it makes a lot of constraints by default, but we're going to modify this slightly. We do want it to be cloth. Our geometry type, let's change it to points group. Let's say only wire points, because right now we only want to create the wire cloth for our string here, our line, or whatever you wish to call it. Let's scroll down a little bit here. Now, pin to animation, pin points, let's say, ns, and we'll keep that at permanent. And say match animation. And now let's just drop down a loin solver. You'll need a solver anytime you're trying to solve a dynamic setup here, and just wire the first to the first, the second to the second and the third to third. Now if you hit play, it's not going to behave as expected. You're going to hit play just for the hell of it, you know? Our wire behaves nicely, but as you can see, our boxes just drop down and don't do anything. They don't have anything to collide with. One thing to note about this cloth, the behavior can change quite a bit if you look at one of the values here, there's going to be a rest length scale. So at one, you'll see it kind of stretches out. Which is fine, but you could adjust that. If you wanted to actually try to find out what the actual rest length is, meaning the distance between each one of these points, there's a couple ways you can do that, but an easy way is to use the convert line node right here. And if we just plug the output of our attribute wrangle, this is just our line or wire. You can see right now we get a compute rest length. So if you then look at your geometry spreadsheet, it's going to be under primitives. Rest length is 0.025. So that is what it is claiming the length is of each one of those sidle segments. So you could use that over here and just type in 0.025. Now if we visualize this and play it back, you'll see it is much less springy. It doesn't drop anywhere near as much. Now, you may or may not like that. That's something you'd have to adjust on your own scene file to your liking. I'll always change no matter what you're doing, it's always going to be a little different. So we'll probably even adjust that ourselves, but that is technically the correct rest length for the distance between these points. Now let's get our boxes in here to actually behave correctly. Let's hit tab and do vellum. Constraint. Now, if you just drag this over, it'll automatically connect it in line, you can see it's connected all three lines correctly. So that's nice once you have it initially set up. You don't have to manually drag all three again. And now we want to work on points, but the group is going to be just boxes. Now, if you visualize this, you can see our boxes have a constraint. There's little cross beams, these little struts almost going across there. We can do a ground position here. Let's give it a ground plane. This will actually make the boxes collide. They would have actually lighted earlier. If you disable this distance, it might be funny. You can hit play, and you'll see them just go crazy because there's nothing trying to control their points. So not something that's that useful, but interesting to look at. Let's re enable these and just hit play, and you'll see they just drop. But they become these nice rigid boxes, even though they're vellum, they behave as if they're an RBD. So now we just need to get our glue constraint to tie these to our little wire here. So again, hit tab that vellum constraint. Slide it right in, it'll automatically connect for you. We're going to do points. Let's change this to glue. You go up here to constraint type and change it to glue. The group, we're going to want it to be the copy here. Remember, that is every other point, and that is exactly where we want these little boxes to get tied to. Now you look, we have a little bit of a problem. They're getting tied to every point, so we can make some modifications to that. Let's scroll down. MAX search points. Let's drop that to say five and constraints per point, let's do four. Now you'll see it only is connecting directly to our little copy here point, and it's connected to each part of the box, which is exactly what we want. There's another way you could do this, though. Like, let's just say you did still have this Domtarch points ten, and you can see it's connecting all over the place. It's connecting to points we don't want. It's connecting even below. What you could do, though, is have this target geometry, and you could change that the points and just say the copy here. Now you're still going to get a little cross action because remember, our entire box has copy here added to it. It's not just the top points, but it does solve the problem of the bridging up here, which you didn't want. You would though have to just reduce that a little bit to now have it correct. It's not going to then bridge across these, whereas, if you then disabled this, you'd be back to this problem. So it can help using a target group, but isn't necessary all the time, if you just set these correctly. If you had a lot of points, though, sometimes it's unavoidable, and you'll have to have a target group or else you won't be able to isolate where you want your connections to happen. But now we have our glue setup. And if we go back down here and check out the simulation minute play, It's going to think for a second here. And then we get this. Now, it's a little sporadic and completely stretches out our wire here, so we're going to have to do some things to it. We definitely don't want it looking like this. One thing we can do, first of all, enable this little icon here. That's our real time toggle. So when we do play back, it'll play back at a 24 frames per second, playback rate. So let's do some changes here. We'll go up here, our solvers. Let's do subsets of three. You'll see that that automatically starts to change things. It's no longer hitting the ground as much and sagging. So these values can drastically change the output of your SIM. We can probably lower this to save something like 15 smoothing iterations. Let's up a little bit. Picking some random numbers here, 17. And now let's play. Now you'll see it actually sags down a little more. That's because we have less constraint iterations. If we bring that back up to 100. Look at that, it already springs back automatically. It's going to make it adhere more to its initial shape basically. But let's just drop it to 50 because that technically should speed up the simulation a little bit. We can do some other changes here to try to get this under control. Let's go over to our forces. And you can see this velocity damping. Let's change that to something like 0.25. And now that's at play. You can see it gets a little smoother. There's still we getting a little bit of erratic jittering here. We can try to go back and forth here. Let's bring this back up to say, 85. See if that helps at all. That helps a little bit, but we're still getting some odd undulations here. A lot of times with these dynamic systems, you're going to be changing these settings a lot to dial in what actually works. But don't be too concerned about this because we're going to be adding a high power wind gust to this, so we're not going to be seeing it in this state. Now what we can do, though, is re enable or actually disable our freeze here, so we can actually see the effects of this thing moving. You can see the end point is moving, and our vellum follows it nicely. That's something that's very useful. You can get some nice wiggle and wobble and imagine if you had a character that you wanted to chain to something, you could have this chain to a post or a rock and this on a character's arms or legs or anything, and it would just tether to it. And that's because up here in our cloth, we did our little pin to animation using our ends here. Now, like I said, we're going to be adding some wind into this. So there's a couple of ways you can do that. There's a built in wind right into this vellum solver. If you look up, you can see that we have built in wind. You could say, let's see, this is the What is this x positive? Yeah, X positive. So you could just say built in win, let's do something like 14 and hit play. And you'll see now it blows this stuff hard. Now, it still has our animation moving on it, which we don't really want. Let's just disable that. That was more to show an example of the pinning to animation. Let's keep it rigid as if this is connected between two posts it play, it W. Let's disable our points here. And you can see we get this interesting simulation of these things just being wobbling in the wind here. But that winds very uniform. Let's dive into our vellum solver, double click it. And you can see those forces. So if you hit tab, type in pop force, you can use particle forces and just plug it right in there. And let's put in the same force of 14. Now, let's go back up though and disable our built in wind. But we will see that it does pretty much the same thing because we have this pop force. But what's interesting about the pop force if you dive back in, you have this built in noise. See the noise have amplitude swirl, so if you increase that to one, let's get some better lighting here, so you get some shadowing. It's not so bad to look at it then. And now rewind and hit play, pop back up here, hit play. You can see a little bit of that noise. However, let's really amplify it. But let's pin this viewport so that when we're inside here, it'll still update, and we'll see the level up here, not what's on the inside because it might not evaluate the same. So pin that. When we dive in, it'll keep our view here. And that way we can adjust this. We can say amplitude. Let's just go crazy with it. A lot of times it's the best thing to do to see your value changes is to go way more than you think you need, and then it makes it very obvious like that. You can easily see that there is now noise. And I actually like that that might not be a crazy value, so that's pretty cool. Let's rewind. You can change all this stuff if you wish, with all these different settings you can tailor to your liking, the swirl size, swirl scale, turbulence. This value will just increase the number of turbulent iterations inside of it to get finer and finer turbulence, but that's typically something you're not going to notice in a sim like this. But feel free to change these around. I'm just going to leave it like this for now. We might have to modify it later. But go back up here. Now let's go back to our glue, and we're going to make these things break off because that'll be much cooler. Let's say this is a simulation in a tornado or a hurricane or something. You want some destruction. So, go to the bottom and you see this breaking. You can enable a breaking threshold. Let's just by default, check it out and see what happens. They might all just snap right off because the threshold is a very low value. And yes, they blow right off, so that's not going to work for our needs. We're going to have to change this. Usually, I do a scaling by value. Let's go big since we did a big number on our noise. This might still be too low. Yeah. Still too low. So now you can start dialing this in. Let's see 0.5 works. Better. You can see some stick around and some get blown away, but that's still too many getting blown off. I like that, but still I don't think it's enough. I want more of these to break off. So let's see if a 0.6 will break them all off. If it doesn't, we can do something about that. So I like that rate. But at the end, I want them all to be broken off. And let's see if they break off. Now, we're going to run this out to about 80 frames. So let's actually set that in our animation parameters here. 80 apply, close it. If we didn't see what icon that is, that's right here, this little global animation options. So, let's dive back in here. Let's animate this. Let's say, we'll go to about 25 and hit your lt and left key and then go to say 40 and crank this up to 30. And we'll rewind and now p, and this snap these off. And, there we go. We get all of them to blow away. So in the end, we'll have none stuck to our little thing there. Now, let's get a nicer view here. Let's say something like like this. Maybe even something more like this. Some blow right by the camera. That's kind of cool. Could cause some motion blur issues or lengthy render times with them blowing right by the camera like that. But we can always drop down a camera. If you hold control and left click, It'll drop a camera down in the view that we had. You're going to want to disable this lock icon here, though, because if it's on, anytime you move, it's going to move the camera with it. Now the cameras locked so you can still toggle around and look everywhere you want, but then just go up here and say, look through camera, CM one, and get that same view again. Sometimes it's easier to position the camera though if you do want to move it to enable this. And now going like this is actually setting the camera and disable it. You'll notice if we leave the camera and go back in, it's now to this new perspective. Let's dive back into our setup. Now, let's see if our collision padding is okay, because sometimes it's going to have a bit of a buffer zone, a gap between the ground and our actual vellum geometry. So as you can see, if this is our ground plane, which it is, that's our zero ground, and that's our vellum. It's kind of high. That's a big bit of buffer there, so we can do something to try to change that. Let's go up here, this advanced default thickness. Let's change that to like 0.005. And we're gonna have to rewind and play back. You can see now, there's a little less of a gap. But look what happens. Look at this one right here. If we go back into three D view, we'll see if we can find it. That one's now collapsed pretty bad. We don't want that to happen. So if you do need to change your thickness to have a more accurate collision, you could add another constraint. You could also just simulate this and then move your ground plane up slightly to reduce that gap. You may or may not even notice it depending on your render angle. But let's just fix that with another constraint. We can drop. Another vellum constraint. Plug it right in here after our glue. Let's go up here. Let's say, Let's do bend across triangles, points, and we'll say boxes. Now we'll have to rewind and hit play again. Playing and now, it doesn't take too long, but there isn't one of those problem boxes. If you look in our side view again, we saw it come through here. None of them have that problem of them collapsing in on themselves, and they're still pretty low to the ground. You could probably even go even lower's to a point oh one rewind and play it back. And now you can see it's basically directly on the ground. So that's one way that you can try to massage the simulation into something that works better for you. Now, one more thing we're going to do, we're going to go back up into our setup to this attribute here, or attribute wrangle, sorry. And let's just add an attribute that's going to help us down the road. We're going to call it parent ID. We're gonna just make that equal to our PT num. All right. So now what that's going to do is create a parent ID attribute. We can check it out here in our geometry spreadsheet. It's going to be on our point level. See parent ID, and L is equal to the point number. Very simple, very basic, but it's going to be great for us in the long run because also this is going to get transferred to our boxes. If we look here, you're going to see that each one of these boxes is now going to have a parent ID. And that's going to be the parent idea of the point that it was copied from that had this copy here attribute. So later on, we can do some extra cool things by having that data on our boxes. Let's go down to a bottom now. And if you middle click, you're going to see we have uns of values and attributes that we really don't want or care about. Now, is it okay to leave them on? Sure. But if you're working in a production environment, you might want to clean up this kind of stuff if you're going to export this geometry. If you have to write it out, having all those extra attributes can actually increase the space that this data takes. So you can do tab, attribute delete. Wire it into this first output here. Let's check it out. Detail attributes. We don't care about any of these really. So just put a star or asterisk. Primitive attributes. We don't care about that. There are no vertex attributes, and now here is a huge list of attributes where we don't really need most of them. So what we can do is delete all of them with the star or asterisk. And then we can pick specific ones to exclude from that by using this little carrot on the six key. And we're gonna want to know which ones we want to keep. So, what do we care about? Let's see. We want our parent ID sure. You're going to have to delete a little gap there, though. What else do we want? That might be the only thing we really need. Let's also keep V. Even though it's very common to recalculate velocity after a SIM, we will keep the built in velocity. Because you can see it did create a nice velocity, but we might actually recalculate that later on. I like that little slingshot action there. Let's disable that. Let's middle click now, and we can see we still have quite a bit of point groups. We can delete some of those. It's a group delete. And we don't care about that. And we probably don't care about stream default source. We can get rid of that. Wire points. Let's keep some of these though, because boxes will be able to isolate our boxes, wire points. We can isolate the wire copy here. I might come in handy. We'll keep it. The good thing about this is we're doing this all post simulation, so it wouldn't matter if we deleted one of these and need it back. All we have to do is come back to this node and then change our values here. Now, if you write this data out to be saved outside of this file, then that's going to be hard written into your data. So if you then did need one of these, you'd have to rewrite out that data. But in our RSN file, for this example, we're not going to worry about any of that. Typically, you would drop down like a cash node or a ROP. You do a ROP output Alembic output if you want to export this data, but we don't care about that at this moment. Now we can drop a delete node. And let's do boxes, points. Let's do delete non selected, and now we have our boxes. Let's just do delete selected, and now we have our wire, and we can do null, drop a null. It's a very common practice in Hui to do a null that starts out with out, and then capital boxes, so we know exactly what we're getting. Left drag to copy it out and just do wire. We can go over to this wire side. Let's look at it. It's a little segmented here so you can do a velum post process, wire into this first attribute here or this first channel. And we can do subdivision, wire that in, and then we can even do a poly wire. Wire in like this. Not going to want to be that big. Maybe even a little thinner than that. You can always change it later. Doesn't really matter. But now we get a nice wire geometry and our out wire and our out boxes. So we're going to stop this video here since it's getting a little long, and then we will continue setting this up in the next lecture. Technically, it's done. You have exactly what we set out to do. We have this cool little system, but I'm going to show you how to set up some cool render parameters for this. And then we're going to go into some extra additional cool stuff we can do to really turn this into more of an effect shot rather than just looking at vellum and how constraints work. 4. Lecture 3: Rendering the Vellum: Alright, now we are to a stage where we can start setting up the shading and lighting for this rig. Remember, we're trying to create a string of wobbling lights. But before we do that, let's look at what we've done so far. So if you close down your scene file, open it back up and dive into your setup. We're just going to go up to the top real quick and overview what we just did. We created a singular point, starts down at the origin, transformed it up, and then we transformed another version of it over to the side and then merged them together, so we got two points. We put a freeze points node down here, which is the time shift, and that allows us to freeze our animation we did up here on this node, which we really just used to show the example of how do you can pin to an animation for a vellum. After that, we just dropped down our add node, which is a simple way of creating a line. I showed you multiple ways you could create it, but we deleted all those extra examples. We then resampled that line, so we got a lot of points. Then we just went in there and created our ends group, then a group to have the entire wire points in a group. Then we dropped down our wangle here and created yet another group. This was our copy here group, which just picked every other point thanks to our modulus function here. You can Google modulus functions if you need a better description of how they work, but I gave you a brief introduction to them. We also then created this parent ID attribute, which is going to help us down the road when we do some more advanced stuff. Then we just copied these boxes to our points using our copy here grouping. We then cleaned up our nodes a little bit here. We deleted some of our unnecessary groups. We then created yet another group node for our boxes, so we'll be able to have our boxes in their own group. We then translated them down slightly so that when we do convert them to vellum, they will not be already inside of our velum line that could cause some problems with our constraints. We then merged our geometry together, so we have our line and our boxes. And because we have the ability to have groups on both sets of geometry, we can then feed as much geometry as we want into our vellum solver, but we can then isolate them and assign different types of constraints based on grouping as we saw with our first cloth node, we drop down here. This is our configure cloth, and we just applied it to our wire points. Then this distance constraint, we just applied to our boxes. And then the glue, we were able to just apply between the copy here points, which gives us a bond between our wire and our boxes. We then created a bend node to fix our little problem about the gap or distance of the thickness of our geometry when it was sliding across the ground, and again, we were able to isolate just the boxes with the grouping. So you can see grouping geometry is very powerful because it gives you access to individual components within your vellum setup. After that, we did more cleanup, where we just deleted things that were unnecessary. Same with groups, we deleted that were unnecessary. And then we got down to here where we separated out our boxes and our wire. So now that we have all of that, let's disable our points. We can then now go into setting up this for lighting. First of all, we'll jump up here. If any of you have done my UME courses, you know, I like to keep this area pretty organized. I usually do grouping of nodes so you can select say your camera. Go over here, create this network box. We're going to label it cameras, even though we only have one. Center it in there. Same thing, select our geometry node here, create another one. These network boxes. And we can call this say effects. I usually like to do color coding, lot of my effect stuff. I'll just make purple. Don't know why, but I do. We can create another geometry node now, and we'll create a network box for it as well. And let's expand this and make it big because there's going to be more than one in here. But now we're going to set up our rendering nodes. So we'll call this say render boxes. And now we can Alt and left drag to copy this and just call this Render wire, and make another copy, Alt and drag it over, and we'll call this ground. Now, we don't have a ground plane yet, so we can create one. We'll do that in a little bit, but let's dive into our render wire it tab type object merge or just the first few letters, and it'll autocomplete for you. Object merge. We'll say into this object. Now let's go find our wire. So click this. We'll go up to our vellum string lights and say out wire. It's very simple when you do these null out nodes with a capital OUT. It makes it very simple to find the nodes that you want, so that's why we usually do that. Now, you can see we have our nice little wire here. Let's dive into our render boxes, we'll do the same. Object merge into this object. Out boxes. Now the reason we're seeing both is because this is on a mode where it shows all geometry, even though it's ghosting the wire. If you want to just see what geometry is within the node you're in, just say hide other objects. And we'll have to unpin it. If we go back to this. You'll see that it's still ghosted. The reason it was showing it even after we changed it to this hit other objects is because we had it pinned up at this object level, so it'll always show what's in this level. But anyways, let's go back into boxes now. Now, to make this interesting, we're going to want to say, make these multiclored. Let's make each one of these represent a light, and we want just random colors on this. So there's many ways you can do that in Houdini. I'll show you a couple. One of the simplest things you can do is drop down and attribute randomize. And let's plug it in here. And you see it defaults to CD color, set value, and you can see we have random colors. Now, the problem is, is this attribute randomize works on each point. So it's going to give you a random color for each point. We don't want that. We want it to appear like each box is its own bulb, which would be emitting just one color of light. So even if you change this to say primitives, that's closer to what you want, but still it's going to make each primitive face have its own random color. And since there's six faces, you know, you've got a top of bottom and four sides, you're going to have six different colors on each box, which is still something you do not want. So we're not going to typically use this. You still could, but I usually like to set this value in a different manner, regardless hit tab and type connectivity, This is a very handy node plug into it. Visualize it. And if you've never seen a connectivity node before, all it's going to do is look at an object like a box and say, Okay, if it's part of one box, assign the same value to the attribute class. That might be difficult to think of. So we can scroll down. You can see this is our little visualizers area. Hit this little plus button here, add a marker, and just call it class class and down here at attribute type class again. Now you can see the output of this class attribute that's being created by connectivity node. What's it giving us? Well, look at that. All zeros, all ones, all twos, all threes. So what that's doing is looking at each box and saying, Okay, you are connected to yourself, you will be box zero. This box is connected to itself. All those points are connected. So it's one, two, three. It makes it so that you can actually grab all points of a singular object, which is very useful at time. So remember the connectivity node if you've never used it before. More than likely you have used it, if you have experience with Houdini, it's very common to use that node. So we can move forward now. L et's disable this viewer here since we don't need to see that. Now, I like to use wrangles. A lot of people don't because they don't like to write code, but you should. I've said that multiple times. So let's drop down a wrangle. I'll show you an alternate method as well if you don't want to write code. But it's very simple. You could just write one line at CD equals brand and just say at class. And you can see, you automatically get all these random colors on this. Why is this working this way? Well, what's the random function do? All it does is return zero to one, and it's going to use our class as its seed value, essentially. So every single one of these boxes is going to have a different value. So you're going to get a different color. Some of the colors might look very similar. Like right here, those look very similar, just so happens to be that that's what the random function is generating. Now, if you wanted to randomize this inherently, there's no way to randomize the random color, but we can easily change this behavior. Just do a multiplier sign here and type CH open bracket. And just type in rand. Or let's do random. Closing bracket. Now, if you hit this plus button, you'll see they all go to one solid color. And the reason is random right now is set to zero. If you've never seen this before, all we're doing is telling this thing to multiply our class value by the value of channel random, which is here, and this was automatically created for us when we click this little plus button. If you didn't have this random created, you can just do that, and it'll automatically create it for you. It just knows that you want that to happen. It's a nice little shortcut. But now you can see when you slide random, you get all different color values. And why is this happening? Because well, think about it, our class value right now, and say this guy is two, but we're multiplying two by 0.21 87. So it's giving you a completely different number, which will change the random number that's spit out by the random function. Same thing when we change it. Now it's two multiplied by 0.286, and you should get the idea. The reason why zero produces every value of the same is because the laws of multiplication, you multiply any number by zero, and it gives you zero. So class zero times zero is zero, class one times zero is zero, and so on and so forth. Class eight times zero is zero. So the random function is going to reproduce the exact same random number on every single box. So just make sure you don't have this set to zero. If you were setting this up as a rig and you want to make sure that another artist doesn't have this on zero, you could go up here to your little Sprocket, go to edit parameter interface, go up here to our random and set this to say 0.001 and hit accept. Now, you'll see the minimum value is 0.001. You can't set it to zero. And that way, you would ensure that no artist would have an error in their file by accidentally setting that to zero. So this is very simple x. This should not be confusing to anybody. If you still don't want to use Vx, I'll show you yet a different way of doing this through a VOP method. If you hit Tab VOP, we can pick an attribute Vp, wire into this first input. Let's visualize it, we'll dive in. We still want to use our class of attribute that we created from the connectivity node, so you can hit tab bind. Binding allows you to bring in custom attributes that aren't in this list of attributes here. We know what's called class. You can now hit tab, type rand, and random you'll see, and we're basically recreating the exact same code, but we're doing it visually instead of having to do it by actually typing code. Now just wire this into CD. Now, this is automatically creating a float value, not a vector. You can see random here gives us the option signature, one D float input, which is exactly what we're inputting, a one dimensional value. It's just a float, and it's spitting out a one D output by default. You can tell it, we want a one D input, but a three D vector output. Now, you see you automatically get color. So it's doing exactly what we did in code. However, you're stuck with this pattern. There's nothing you can do right now to change this color values that it randomly spit out. But we can do exactly what we did with our CH setup that we did so we could have a slider. You can drop down a parameter. And what did we do? We multiplied our class by it, so type tab, Mult, and you'll see multiply, wire it in here. And now just wire the output of parameter into input two. Once again, they're getting all the same value because by default it's spitting out a value of zero. Now this parameter, we're going to have to set up at Sp level. So jump up here, scroll down, we have palm. So you can change it if you want. Now, it's up to you to do this whichever method you like. I don't like this in particular. I like the x route. You get to do everything here and just code and everything at the top level rather than having to dive in, make adjustments here, come up here, make adjustments on top. There's yet even a third way you could set this up. If you still wanted to use this attribute randomize method, we could basically turn these all into singular point representations for each box. You can do that with an assemble node. So drop that down, wear it in between our attribute randomize. Let's visualize this. Just click on this Create packed primitives. If you middle click, now, you'll see you have 20 all around, 20 points, 20 primitives, 20 verts, 20 pack fragments. All this is doing is packing each box into its own container in a sense. And it's represented by a singular point per box. We have 20 boxes. We have 20 points. Now we can go in here. And use this attribute randomize, and you'll see you have an actual full box being colored and not just like the faces like here, if we disable this, you see how they all get random color per face. When it's re enabled, it treats it all as one box. So you could do it that way if you want. You would then typically have to unpack this data afterwards, so you would have to drop unpacked down if you want to bring it back to normal normal boxes, and you would say you want to transfer the attribute of CD. Now you could do it that way if you wish. It's all up to you. As you can see, the easiest of all these methods is the wrangle node, but a lot of artists are apprehensive to jump into Vx and writing code. You shouldn't. You should get used to it because it will make you a much faster Hudini artist. So now let's move on because we have spent way too much time talking about alternate ways of creating random color. I'm going to stick with this wrangle method. I might leave these in the file just so you can see these examples if you wish in the downloadable example hip file. Let's now drop down our trusty null and we'll wire in. And let's just call out Render. I will be a good name. We'll need to create a shader for this. So let's go into material palette. Let's just look for a constant for now. We'll just use that dive over here. We're going to rename this to lighting. And by default, it has this tint with point color enabled. So that will automatically use the color of the box as our color, and we're going to actually use this as an emission source. So now we can go back up to object level. Let's go up to Geometry light and just click this up here on the shelf and hit Enter. You could have also hit tab and created geometry light through here. However, you want to do it. Now, scroll down, and we will look for material. Let's assign our lighting. Geometry object. Let's assign our OBJ render boxes out render. Now we can disable that because it'll always show up and sometimes it gets annoying. But Now let's create a network box for this. Just in case we get more lights in our scene down the road. I like to keep everything organized. Lighting, I usually make yellow because that is what I associate with light color. So now, in order to really render this, we need to have some type of ground plane or else this light isn't going to be casting on a whole lot. So we can dive back into our effect scene. Let's go up to our vellum solver. Let's look over at our solver ground position. It's just at zero, zero, zero, so you can hit tab grid, drop down a actual geometry plane. You can see we now have physical geometry. Let's do null, wire it in, out ground. Now, I'm going to show you a little trick here. Sometimes you don't create the ground at 000, and sometimes you would have different values in here, and if you want to link your ground plane directly to whatever is set here, you can just right click copy parameter, go over to your grid, and where it's a center, right click paste relative reference. So now it's 00, zero, but if you were to ever adjust this and say 0.25, and now if you have to rerun your simulation obviously, but if you look over, our ground plane center also change, so it'll always be tied to it. Now, on the other hand, you might want to link this in reverse. And what I mean by that, instead of linking this ground position to drive your ground plane, you might want your ground plane to drive the position of the ground plane in your solver, so you could just right click delete channels. Now, right click, copy parameters. Go back to your vellum solver, paste relative reference. So now if you ever were to change this, let's say visually, you wanted to be able to just transform your ground plane. So if you wanted to do it this way, on an actual transform node, you would have to link this one to translate because right now it's currently linked to the grid, you could move the grid around. But most of the time, I'd like to keep that in a transform node. So what you would want to do is zero this out so that it's always going to line up with this one's transform, since we're both at zero, zero, zero, and you would right click, copy parameter, go over to this velom solver, pace relative reference. Now you can see it's changed it to the transform node. Now, if we raise this up and look over, it's identical. Something you can do so that you don't have to always try to match. Now, you could even wire this as the collision geometry into the solver right here. If you look, it'll say collision geometry, you could just break this chain and wire this ground in. So if you wanted to have more detailed ground or something with undulating surfaces, you could have something more detailed than the default ground plane that's always going to be a flat ground plane. But for this example, we can just keep it as is, and we'll use this as our render ground. So if we go back out of our network, We can go to this render ground tab OBJ, drop down an object merge into this object. Object merge. We'll go to our Vellum string lights, and you'll see out ground. Now we can just keep the default shader on ground, the default shader on wire, and the render boxes now. We're going to want to assign that light material. So just go to the Render tab and material. Click this little icon, and you'll see lighting under our Mt. Look through our camera one more time. So we can see we have a decent view. This wire is pretty thick to be honest, so let's dive back into our setup. Go down here to Poly Wire. Maybe change that to even 0.01. That's better. At least I like that better. You can leave it at whatever setting you wish. Now, to render this, let's just go to our out. Well it tab and type mantra. We're just going to use standard mantra. We're not going to get into the newer loop stuff. This isn't really a tutorial about lighting and rendering. It's more for the dynamic setup, but we still want to at least render something and see what it looks like. By default, we have camera one in here, so that's great. Let's go over to objects. Remove this asterisk under candidate objects that would just render everything that's visible. I like to do force objects, even though we do wish to render all three objects we have in the scene. I want to explicitly tell it what I want to render. Same with below, this candidate lights. I remove the wild card, enforce the light that I want. Let's go to now rendering pixel samples. For now, let's keep this very low. It's going to probably be gritty, but you know what? F test rendering, it's fine. And now, we'll hit render to play and see what we get. If this is going to take a little bit of time, I'm going to stop this video and we'll kick it back on once this render is complete. Alright, so the render is done. Took a little longer than expected for to kick on, but it's here, and you can see we do have light coming out, but we do need to make a number of adjustments here. It's very dim, and I want these to be much more powerful lights. So let's minimize that. We'll go over to our objects. Let's check out our actual Geo light. If you go up here, you can see intensity, Let's just crank that up to something like six. Sampling quality. For now, we're just going to keep it at one, even though it's not going to look great. We just don't want to spend a lot of time doing test renders. Go back to our out. We can hit render to play again. We'll bring this back up. Now, hopefully, it'll kick back into rendering quicker. The initial render sometimes takes a little while to open up this play window. But again, I'll probably stop this video and we'll pick it back up when the render is done. All right, so now it's done. It didn't take too long, and you can see it's much brighter. You see we have light illuminating our wire and the ground. Now we get zero motion blur, so let's fix that. Let's turn on motion blur. Now, for sake of example, I will click Render right now. Some of you might know what's about to happen. Some of you might not. Again, I'll pick this video back up once the render is done. Okay, it rendered motion blur, but it doesn't look any different from our previous frame. We're toggling back and forth. There's no motion blur. So why did that happen? Well, you have to enable motion blur on a per object level. So if we go back to our OBJ and say render boxes, go up here to our sampling, and it says, Geometry velocity blur, it's default is no velocity blur. You want to change that to velocity blur. We also want to do that for our render wire. Go to our sampling. It's under the render tab. No velocity blur velocity blur. Now we will get a nice motion blur, but let's actually check our velocity vectors. Let's see what they look like sometimes you can get some funky action coming out of a SIM. So let's scrub through this. It appears to be pretty good. A lot of times, it's very common to drop down your own like point velocity node at the very end of your chain. We can see what that gives us. I usually set it to central difference, but this initialization will compute from deformation, so it's just going to take whatever points it has and compute the velocity off of the change per frame. And you can see it gives us something that's very similar if we disable it and look at the vectors, they change very slightly, but they do change. So I'm going to actually leave this enabled. Now, the reason this works is because we have a stable point count, meaning that we have 20 boxes when the simulation starts, and we have 20 boxes when it ends. Nothing dies, nothing gets removed. If we had a changing point count, this point velocity node would not like it, okay? And I'll show you a little trick to work around that later, but let's not get into that right now. Let's just know that we have nice clean velocity now. We can do the same thing for our wires. Let's look at its velocity. You can see it looks looks like it's good null, but let's just drop down. A point Vl node. Wire it in. We'll click central. And let's just for the sake of doing it, drop down our null, since we didn't before, call it out render. You can also force a node to be the rendered node by control and left clicking, this little purple tag here. You can say to display render. When this one's purple, it will be the one that renders no matter what. So even if we were up here, And this is what we're seeing in our display when it comes to render time, this node renders, which is great because if you forgot to change it down to this bottom of the chain and you were depending on this point velocity node to give you clean velocity, it would not render if this was the node that had the render flag enabled. So one good thing about having these null out nodes, you can always enable it to be the render flag node. And no matter what you have up here, it will always render the bottom of the chain. So that's a good thing to keep in mind. Now, let's go back over to our out, and we'll hit render again. And like usual, I'm going to pick this video backup when the renders done. All right. Now you can see a big difference between our last render and our current render. Now we actually have functioning e motion blur. But now let's dig a little deeper into this and say, Okay, you know, we liked simming our cubes, but we don't really like these box shapes. We want to have spheres. You might think, Okay, well, I guess I got to go back into my simulation note up here, and we can go up here and copy spheres instead of boxes, but we don't have to do any of that actually. Let's just go back into our render boxes area. And we can actually swap out the geometry So let's get a little room here. And what we're going to do is actually use an assemble node. So it tab assemble. We'll plug it in after our attribute wrangle. We'll tell it to create packed primitives, and what that's going to give us now is our 20 packed points. Let's tell it to transfer CD, because we want our random color to come along for the ride. Let's also we're at it. Tell it parent ID. We're going to want that. You typically would also want V. However, we are recreating our velocity at the end of the chain so we don't need it. Now let's just drop down a sphere. Move this down a little bit and do a copy to points. We're going to plug our sphere into the left, our cubes into the right. Now, you can see these are obviously way too big, so let's drop this down to say, like 0.2. You can template say this node, and then we can see the radius of our sphere in comparison to our source box. You can see it's just a little big, so you could go a little smaller if you choose. Doesn't really matter. Now that fits more inside the box. Let's go back through our camera view. And now you can just plug this into this point velocity. And as you can see, we now have our spheres with the exact same velocity being calculated. Looks great. We can disable this template mode. Let's go back to frame 22. And if we go to our output, click Render, I'll pick this video back up when the render is complete. And now you can see we have spheres instead of these cubes. So that's a very simple method of being able to swap out the geometry real quick. Let's go back up to our object level. And I'm going to stop this video now because it's getting fairly long. I still have some more tricks to show you, but we will continue that in another video. 5. Lecture 4: Adding Fade and Flicker: Alright, we're going to pick back up where we left off, and let's look at some more interesting ways of controlling these lights. Now it looks pretty cool here. We have randomized color, which is great, but when these light bulbs detach, they're going to just stay completely lit up. Now, I'd like to vary it a little bit, and you should always be trying to think of ways to make your work look a little more interesting. So let's minimize our render view. If you're not in your scene file, open it up and dive into our simulation geometry here and go down to the bottom area. Now, let's think about what we can do here. We want to try to make this as automated as possible. We don't want to be hand keying or manually animating intensity values. So we know that once these things break free, we want to try to vary them. Let's say, vary their intensity so that they maybe fade off. We can do that in many, many ways in Hudini, but one quick and simple way or well, moderately quick and simple that can do after the simulation, meaning we don't have to actually go back in and adjust anything. Sometimes you will be almost done with a shot and a supervisor or a client will want to change something at the last minute. Might not even have time to go back in and resem something, so it's great to know tricks that you can apply to simulated geometry that doesn't have to be resemmed. So that's what I'll show you right now. You can hit tab and drop down and object merge. And what we're going to do is actually use the glue constraints as a trigger object, okay? We know that once these things break free, it's because they lost their glue constraint. So drop down an object merge. We can go into this object one type period period forward slash, which basically brings us to the level we're in right now. It's going to have access to all the nodes that are within this vellum string lights. And we know it's in our velum solver that we're going to want to look. So pick vellum solver. Type DOP should be a DP. Here we go. Dp import constraints. And we can just end it there. Now you can see we have all the constraints, but we only want our glue constraints. So let's drop down a delete node. Wire it in. Let's see what groups we have here. Constraint tag, vellum cloth one, constraint one, two, three, Let's look at two. Let's say delete non selected. And, there we go. We have our glue constraints. Depending on how your setup is and how the ordering of these are up here, you might have to actually pick a different velum constraint value. You can just look through them and see which one are the glue constraints. You'd have to just visually look at it. But that's a simple way of getting our glue constraints out of our simulation geometry. And if you look, they disappear over time. That's great because that's when the geometry breaks free, the glue constraint is why it's breaking free, the glue constraint gets deleted. So now we can do some things like transfer of color. You may or may not be familiar with the power of transfer and color in Hudini. If you've watched any of my other courses that are available on to me, I show many examples of how so many rigs are driven by just the simple transfer of color. So let's do that. Let's drop a color node. And we're going to make these all red. So just set it to 100, and now they're all red. Let's duplicate this by Alton left clicking, and we will wire in our boxes here, and let's make these all black. Now we can do an attribute transfer. Let's wire in our boxes into the first input and our constraint geometry into our second one. You can see now, obviously, the boxes become red, but we have to make some changes here, so just go till it CD, and under conditions, we want to change this threshold. Let's set it to something like 0.2. Now, you see no change, but that's because our box geometries are directly near our constraints here, so they're going to get that red color transfer. If we play through, you'll see the boxes that disconnect quickly turn black. Okay? And that's going to happen once they get 0.2 units away from this constraint. So that should be a good value. You might have to adjust that later on, but for now, that's doing what we want. Let's turn off our velocity vector, even though they look cool, but they can get distracting. But now you might say, Okay, it just pops off, so that doesn't really fade the value down over time, which is true, but there's a simple way we can make this work. So just hit tab and type solver. Drop down a solver sp, and we'll plug this first input in, visualize it. Now, this is a node that when you dive inside it and work around, you're going to want to pin your view up here because sometimes it doesn't update properly when you're working in here. It just makes it easier for you to see your output without having to dive back and forth going up a level and back in. But let's use this input one and this prev frame. Hit tab. Drop down a wrangle, a trusty wrangle that's very useful. Plug this input one into the first input and this pre frame into the second. Now what this is, this right here, this input one. This is our live geometry, this previous frame, as a Prev stands for his previous frame. We're going to be able to sample what happened in the previous frame and add it to the current frame. However, we do have to wire it correctly. I said, wire it into the second input. Now when we go in here, we can just type at CD plus equals, and we're going to sample that data coming into that second input, so we'll use a point function. If you've never used one of these before, you can look at the documentation that pops up here, and it's gonna tell you what we're doing. All we're going to be doing is using the point function to grab point data. And we can tell you we want to sample from the second input, which will actually be the number one because they are indexed from zero, one, two, and three. We know we want the CD, and we're just going to do it at PT num. Now, you'll notice. Let's wire this in. Now, you'll notice. Looks cool, but now it's just all red because it added this value to the box, and that's it. There's nothing telling it to reduce the value to fade it over time. You might also notice this can give you values above one. Really, it doesn't matter in R case, but if you were to look at CD R, look at this, we get a value of three, and that'll keep going up and up and up and up. Doesn't really matter in R case, but if you wanted to clamp that, you could do at CD equals Clamp. And you would just put at CD and say zero to one, Yeah. Let's remove that. So now you see our CD R is one. It still is building up over time, but it's just not allowed to go above one. But now the trick to getting this to work in the manner we wish is to actually multiply the CD value by a number lower than one. So if we do add CD times equals zero point say 65. Now play it out. Look at what happens. Do you see how they're fading? Look down here. When these disconnect and hit the ground, they start to fade slowly over time and they fade down to black. You might be confused as to why that's happening. But what's going on in this wrangle node, inside a solver sop, keep in mind this only works inside a solver sop. If you were to do this up at normal geometry level and try this out with a wrangle, you would not get any of this behavior because a solver sop, when you're inside a solver sop is almost running a simulation. It's in a sense going to save values between frames, whereas, when you're up here with a wrangle, it only works on the data on that specific frame. If you go to frame 22, it does not remember what happened in frame 21. Inside a solver sop, you actually build up values, so it will remember. So when we're doing something like this, this CD plus equals, the reason why we kept getting such high values is because at say frame one, if the value is equal to one, it's going to add that to the previous value of one. When you advance a frame, now you say have a value of two or three, it's going to look at the previous value and add that to the current value, and it keeps storing it and building up over time. That's why you had to clamp it. Technically, we don't have to, but if you want to keep things in the value range of zero to one, you do have to clamp it. And now the reason why this is going to work is because it's going to diminish this value over time. If the value is say one on one frame, and we advance to the next frame, and even if we add the one, but we multiply it down by 0.65, it drops the value. Then on the next frame, it drops it down again because we're multiplying the value by 0.65. Then again, it drops it by 0.65. So it's just going to keep gradually getting lower and lower until it's to zero. If we watch, you can see the rate at which this fades. If you wanted it to fade faster, you would multiply this down by an even smaller number. Why? Because that's going to reduce the amount of red that's going to be added up every frame. You see how now it even already darkened it? And once they detach, look how fast they go to black. Now, that's too quick. So I'm going to keep it up at say a value of 0.65. As you might already expect, if you wanted to fade even slower, you could say, put a value of 0.85. And now when you do this, You can see these boxes stay red for a while even after they've detached. But for our purpose here, 0.65 is good. If you don't know what any of this is, and this is confusing to you, you should honestly watch my earlier courses. They are available on Utomi. One's called Master Houdini Effect. It covers all the basic groundwork you need to know to work in Houdini. And if you had watched that, you would know all this stuff, all these concepts at least you'd be familiar with. And this wouldn't be at all confusing if you had a foundation like that Utomi course provides. Now we can go back up. Now let's drop down, a wrangle node. And we don't really want this to be red. All we want is the zero to one value. So we're going to say, let's create our own FAD attribute, and we will equal that to cd dot x. So all we're going to be storing is the red channel, which will be a zero to one. Now, to visualize that, let's actually set at CD to equal our FAD value. So we can just say at Fade. Now, you see it turns at white, and we just get a simple zero to one or a one to zero fade. It just goes to black But we have stored our value into a fade attribute. So even if we change our CD, which we will be changing it later on, as you know, in our lighting setup, we gave it random color that would have overwritten this value, so we wanted to store it into a fade. That's why we did that. So now let's drop out a little null here, and we will call this. Let's just call this boxes two. I think we already had this as boxes one up here. Where did it go? Here we go out boxes. So this will be out boxes two, our modified boxes. Let's go into our render boxes. You can just change this now to out boxes, two. And the beautiful procedural nature of Hudini, all of this stuff is still valid. Everything still works. We still get our spheres here. You might have to disable your pinned view since we are up at the other level. But now you see we still get everything. And now we can actually use our Fade value. Now, we might have to go up here and let's just see yeah here, it's not going to transfer Fade unless we tell it to. So go in here, find Fade, and now we'll pack that value in with our spheres. Now you can see we have it on our spheres, and we're going to do attribute wrangle. And say, at CD, times equals at fade. Now, you can see they've got a little dimmer. If we back up and play through. You can see now, look at that, they fade down to zero. So they're dying off once they disconnect from our wire. That's one interesting way you can do that, and it's pretty cool. It makes it a little more believable. If a light were to break free from its source of electricity, it would probably fade off. Now, you can do other cool things in this exact wrangle here, like, Okay, we have velocity. You might want to say, Okay, I want to link brightness also to say velocity. So sure, we can just do at CD times equals. You're not going to want to multiply it directly by the V attribute, but we can grab the length of V. And you'll see what it tells us here, the length function returns the magnitude of a vector. So you just type at V. Now, you can see they dimmed a little more. But you can also see they get brighter, the faster they move. Look at how bright they get once they're moving. And when they shoot off, look at how bright that one gets because it's getting launched out. So that's just a way to vary the intensity, and it might look cool. You don't have to do that, but I just want to show you that you can do it. And you might think of, like, well, V, that's velocity. You can only use it for velocity. No, that's not the right way to think about values in Hudini. Don't get caught up in the name of an attribute. Just think of the value. Okay? So like V, we can turn that into a single float value using this length and that returns the magnitude. If you do not know what a magnitude of a vector is, you should Google it and check it out. It's pretty basic math and things that you will use a lot in Hudini. There's a function for calculating the magnitude of a vector, but let's just say it calls it the length. Instead of getting an X Y Z, you get one value, and if you have a very high velocity, you're going to have a large magnitude. It's going to be a large, single number. That allows you to use that single number to just other things like color or height or width or scale or anything. You'd use a velocity length magnitude calculation to change anything you wish. Now, this is pretty cool, but let's make it even more interesting. Let's go back up to our Vellum string lights, and let's see what else we can do in here. Let's drop us another wrangle node. As you can tell, I love wrangles. They are very quick and convenient, and everybody should learn how to use wrangles. Can do something now. Let's say we want this to flicker the value once it disconnects, because that would look cool, like a malfunctioning light would start to flash and flicker and then go off and turn to zero. So how can we do that? Well, again, it's Udini, you could do it a ton of ways, but I'll show you a very simple way. We know we want the flickering to start once it detaches from the wire. So we already calculated this FAD up here. FAD is going to be basically a value of one until it disconnects, so we could just say I That fade is less than one. Let's do some curly braces here, even though we might only do one line of code. Let's do CD equals. Actually, let's do a times equals Rand. And we will do, we'll use a frame. Just do that for now. Now, you'll see we get purple values here, and we actually don't want that. We want this to be all one uniform color, and it's flickering too early. So you can see our fade value must already be below one, which we don't want. So you can always confirm with your geometry spreadsheet, which is fantastic for troubleshooting. And as we can see, it is 0.65, so we kind of have an order of operation problem here. That's very simple to fix, and this is a good example of one of the reasons why I'm showing you this. We can go back up into our solver sp. Like I said, this clamping is something you didn't really have to do, and it's actually causing a little bit of a problem just because where it is. So you can comment it out. You could remove the line if you want, but I'm going to leave it in there. Now when we come out, let's play through this a little bit. You'll see that again, we get these very high red values, which isn't really an issue, but, you know what? Let's go into here and say, at CD, it's going to be the exact same line of code. We're just going to clamp it in a different spot at CD 01. And let's spell it correctly. Or else it will not work at all. Now we go in here. You can see our CD red is just one. Now, let's go down to here. And now you can see it's correct, but we're still getting this shift of color, so we can also explicitly tell this to be a float value. So just encapsulate this and float. And now you can see it's just black and white here, which is exactly what we want. Now, you can see the flickering. It might be a little difficult to see in my video, but you can definitely see it in your scene file. We can exaggerate this also. Let's say multiply this. We can do it actually in or outside of this. Let's just do at 20. Now, you can see that one got much brighter. Now you'll get flickering values that are brighter. But let's say you wanted to vary the amount of the flickering, too. Like, maybe you don't want some of them to flicker so much or you want to change the pattern. We could just insert another connectivity node. So you do it here. We're going to have that class attribute then, and you could multiply this by class, so it randomizes it a little bit. Might have been hard to see that on screen again, but it did change it. You could do the other tricks that we've done by putting, you know, a CH value in here and clicking your little plus here, so you get a slider that CH value of random or something. But we don't really care about going that in depth. You can do it on your own scene file if you wish. Let's look through our camera. So now, one last thing here, let's make a flicker variable here, and we will equal this to just cd dot x again. You can even call this node d Flicker. Sometimes you'll want to rename your nodes just to keep things a little more organized. Especially if you're going to hand this off to another artist, if you're working for yourself. It's not as big a deal, but it can even become confusing for yourself, even scene files you've made, so it is a good idea to rename certain nodes or specifically nodes that are important. That's why sometimes I'll even say, change the color, and you can hit the Z key and even change the icon to something more noticeable. It'll catch your eye. If it's an important node that you need to make adjustments to frequently, that's a good idea. Now we can go back up into our render boxes, and you can see these have our nice color. And once again, you can just multiply CD by flicker. And look at what happens. It all goes black. Why? Because we're not getting the flicker value. We have to make sure that gets piped through and our transfer of attributes, flicker, and there we have it. Now you can see them flickering on the ground, which is very cool. If we do a quick little play blast here. I'll pick this up once it's done. And it's done and we can now hit play. Now, it's hard to see the flickering since there are just small balls flying all over the place, but when you render this, it'll be very noticeable. And I have a little render here. I can show you. I already ran this out, and here's exactly what I'm talking about. So it looks pretty cool and interesting. You know, you get some nice little flickering action, and it looks like they have energy that's randomizing, and it's much more interesting than just having these solid lit balls coming off and rolling around on the ground. So that's very cool. This concludes the main setup. It shows every point I was trying to make with this vellum. I hope you learned something useful watching this course. The biggest takeaways here are how useful it is to create grouping on geometry that you can then all merge down into one node and bring it into your vellum, and then you can do whatever you wish and assign all different types of constraints to different geometry by groups. Another thing that was important to show in this was the ability to do cool things by bringing in those constraints up into sop level and using them to drive values that can then be used directly for your shading. One thing to note, if we go back up here, let's go into our velum. Right here, this multiplying by 20. That will directly influence your lighting intensity. So if it's way too bright, you might want to bring this down. Play around with it and have fun. I will be creating yet another video for this lecture series, but it's going to go into more advanced stuff and creating more of an actual effect shot. We're going to create some cool energy effect to go along with this, okay? So stay tuned for the next video for that one. 6. Lecture 5: Velocity and Rivets: I. Alright, now we're going to get into some more advanced topics, but before we do that, I want to show you one or two things. One of the things I mentioned about having a stable velocity with a changing point count. So I can show you that real quick. We can actually just do that in any one of our nodes. So open up your scene file if you closed it. You can dive into your vellum string lights or any geometry node is fine. And let's just create ourselves a little sphere. Let's visualize it. This is going to be 100% independent from our setup. This is just for an example sake. Let's template, anything else that's in that file. T. Now, let's create a little bit of an animation on this. Plug in to transform. Highlight this, so we get our little icon. You can al and left click to translate and then move a couple frames ahead. Move our sphere. None of these values matter. They're completely arbitrary, do them however you want. Just make sure the thing is moving. We'll move it again. Move it forward, move it over. That should give us plenty of motion just for an example sake. Now, let's do a wrangle. We can plug it in here. And let's changes to primitives, and let's give it a random range of frames that we're going to use to delete these primitives on a random basis. So let's do that Rand val equals Rand and we can do Prim num. And if we look at that, look at our geometry spreadsheet, look at primitives, Rand val. Currently, this doesn't look like a frame number, so this isn't going to work for us. But what we can do is a fit value here. We can do a fit 01. And you can see what it's expecting. It takes the value in the range of zero to one and shifts to the corresponding value in a new range. You can see under usages, it shows you the actual syntax. It wants a value, and then a minimum and a maximum. So our value is going to be this random generated number. And then the minimum and maximum, let's do a value of ten and say 45. I don't even know what our frame range is that we animated, but let's just use this and see what happens. Now you see we have something that looks closer to frame numbers. However, it's a floating point number here. We don't want that. We want an integer. So you can simply cast this to an int by encapsulating this whole thing in parentheses and just put int before it. Now you'll see that we get all those values truncated. It's still technically a float value C because we have a 24.0, so you could also put an i before the rand val. Now you see it's a true integer. That's fine. It would have worked the other way, but for sake of keeping it fully in int here we go. Now we can say, use this value to delete these faces randomly. And how are we going to do that? Very simple. If you say if at frame is greater than or equal to at rand val, then we can just do a remove remove Prim, and we'll do it on zero, which is our incoming geometry. We will want the prim num. And we will want one, so it removes the points as well. Now, if we go look at our sphere. Look at what happens. It's moving because of the animation and the faces are deleting. Pretty cool. Actually, this is a nice little trick if you want to disassemble or disintegrate geometry, you could randomly eat away the faces of geometry very easily. It's so simple if you know just a little bit of X. But the point of this is to show calculating velocity. So hit tab and drop down a point Val. Wire it in? Compute from deformation is fine. I always change to central difference, and now let's display our velocity vectors. You might already be able to tell these are not correct. Look at how they're just going crazy. When it moves in the beginning, before we start deleting faces, it's fine. But look at what happens, once you start getting more faces deleted, values start getting crazy. The directions start going all wonky because it has a changing point count. So a point that it used for calculations now could have changed to a point over here, and it's going to think, Oh, between two frames, it moved from here all the way back here, so you get a crazy velocity vector, which would be very, very bad, but there's a simple way of trying to fix this. Look here where it says, attribute to match. If you say match by attribute ID, Currently, it does nothing because we have no ID attribute. As long as you can create an ID attribute before any faces or points get deleted, it will work just fine. So you could drop another angle. We could drop it right here. And you could just say, at ID equals at PT num. As simple as that. Now we look at our point velocity again, and you can see we have no problem points. You can see once it comes to arrest, you don't have the crazy velocity values. If we disable this, you can see how crazy they get. And what's happening? Well, we're creating an ID attribute. If you look at our points, you can see ID. All it does is correspond directly to the point number. But it's being assigned before any of the faces and points get deleted. So when we start deleting these faces and points, it doesn't matter, the ID still stays the same. And look at what happens. Look, point number now 28 should have an ID of 28 if there wasn't anything deleted, but 0.28 now is technically the original point that was number 248. That's why the calculations get so confused when you try to do a point velocity. That shouldn't be difficult to understand. I hope that makes sense. All we're doing is assigning an ID that's stable because we delete the faces after the ID was created. So it doesn't matter what we do after it was created up here. We can delete them all we want, and we still have those original stable ID numbers. So this is how you would get around a problem if you needed to calculate velocity and had changing point counts. Now, this doesn't work in every case, but this can help. Depending on your setup. Now, let me show you one other concept. We can leave this in here. I'll just put it off to the side. It'll be in the example file that you download just if you want to see it. But remember, this has nothing to do with our network here. Now let's get back to our network and see what we need to do. Now, if we wanted to generate lights that actually get parented to these things instead of the way that we rendered it before, we rendered it using basically geometry lights, which use the actual geometry as a light source, which is fantastic, but the built in mantra render is very slow. If you had access to a hardware render, like a GP render such as Red shift, it renders way faster and smoother. I would absolutely recommend using a GPU renderer if you have access to one. But for sake of example, let me just show you how you could actually parent real lights to these boxes. We can just go to the end here, out boxes. Let's see, if did we pack them anywhere up here? No, we didn't. So let's just go down here. Do an assemble. Branch off from our ad flicker node. Click on this Create Pack primitives, and if we middle click now, you see, we have the 20 points. You should be familiar with a pack an assemble node now. We're just going to make each box represented by a singular point that's in the center of that box. We can drop down a null. And let's just say out packed boxes. Now we go up to our object level here, and let's just create a light. See, it's a rather large light. That's fine. That's just our icon scale. We can change that and make it a little smaller. Go over to misc and just drop that down. That's still very large, but hey, we can drop it down a little more. Don't want to make it too tiny. Now, you can use something called a rivet. So it tab rivet. You can plug that into the light. But now let's see here. It geometry. Let's go find a riot geometry. We're going to want to use our out pack boxes. Point group just hit zero. And now look what happens? It automatically moves over here and is parented to this light, which is great. And you can see it follows it. It stays to it, it sticks to it. Now you have an actual real light. If you wanted to use real lights, you could just click and drag all these things over and you could do 0.1 point number two, point number three, and you'd have to just go through and do it on all of them. Then you would have lights that you could actually use for your rendering if you wanted to use lights. Now, I don't personally recommend this. I use the geometry lighting, but hey, you might want to have actual real lights for some reason. This is a simple and quick way. You can do it, and it's much simpler by being able to just tell it a point. And by representing each one of these spheres or boxes as a point because we packed them with this assemble node, it makes it super simple. All you got to do is put a zero through whatever many boxes you have. We have 19 or 20 of them, so you would just do 012345, and so on. You get the idea. So that's how you can use actual rivets. We'll stop this video here and we'll create a new video to show the finale of this whole thing, doing some cool energy effects. So we'll get into that in the next lecture. 7. Lecture 6: Adding Lightning: Alright. Now we're back into this final section of this lecture. I'm gonna show you how to create a lightning effect. So when we have this malfunction of these lights breaking off from the wire, they're gonna have some electrical lines shooting out of them. I'll look pretty cool. It's something that is very common to have to do as a dynamics artist. For example, I worked on the last two seasons of a TV show called The Flash. There was almost not a single effect shot that didn't have some form of energy or lightning in it. So it's good to know tricks like this. If you close down, your scene file, open it back up. And what we're going to do is expand our little effects box here and just copy this entire node network, so you can t and left drag it over. And let's just call this advanced. Why not? This is a little more of an advanced setup. And we can dive in. This way, if we mess something up in here, we always have our original to go back to, and we have it untouched, and we know it works in it's condition and it state that it's in so we can always revert to it if we need to. So let's drop down another assemble node. We'll plug that into our boxes here. And zoom in, so it's easier to see it and select it. Create a packed primitive. We're going to want to transfer our parent ID. That's about all the data we're going to need from there. Let's move this stuff out of the way so we have more room to work. Now, let's drop down and add node. Zoom in. Now you can see we have got our 20 points, 20 pack fragments, 20 prematives. We only want points, so we can hit this, delete geometry, but keep the points. Now you see we only have the point representations of the middle of those boxes. And you can see we only have 20 points, 20 unconnected points. That's great. That's what we need. Let's drop down now a blast node. And we can select this delete node above our vellum post process here. And let's say copy here. L et's zoom in. And let's say delete non selected. So what's that going to do for us? Well, if you look, we get then the points that are directly in line with our boxes, which is what we want. We want this electricity to basically be coming from the contact point or ever these boxes were connected to this node. Let's also copy this and let's click it over because we want to do basically the same thing. We just want the points. And then we can merge these two point sets together. It's gonna make its little complaint. It doesn't matter. This is completely meaningless. It just says there's a mismatch of attributes. That's fine. It always says that unless it's identical geometry going in. Now, let's drop down. Another ad node. And this time, we're actually going to generate our line. So go over to polygons, by group, by attribute, and let's do parent ID. You can see now we get a line directly connecting from that center point of the box up to where it would be making contact with our wire. We can disable our velocity values. We don't need to see that. Once we get farther along, you'll see these lines get much longer. Here we go. Now, we're going to want to turn on this electricity again once the box basically disconnects from this wire. And instead of doing the other method of sampling the position of the constraint and transferring the color red so that we can sample when it's breaking, we can do it a little bit of a different method. Let's drop down a convert to line, a convert line node. Wire it in. Rename this compute length to distance. What that's going to do is actually give us the length of this line. If you go over to our geometry spreadsheet, look over here at our primitive mode, and you can see distance. You can see some are much longer than others 0.7, compared to 0.02. Okay? 0.7 is going to be one of these long lines compared to 0.021 of these short lines. And that's what we're going to use to sample when we want the stuff to emit lightning electricity. You'll see what I mean very shortly. Now, let's drop down a attribute promote node. Wire it in. What this nodes going to do is allow us to change this from a primitive attribute to a point attribute. So you say original class, primitive. New class will be point, original name is going to be distance, so you can select distance. Now if we go into our geometry spreadsheet, it's no longer here under primitives. It's going to be under our point attributes here is distance. We can go back to our scene view. Now, let's drop down a resample node. You'll see there's a lot of repetitive nodes being used in Hudini. Once you really start using Hudini, you'll realize you use a lot of the same nodes, and very few of the many other nodes. You probably only use about 20% of Hudini in your daily workflow compared to how many options there are for nodes in this software. Like usually, we're going to turn off this max segment length, and we want to explicitly say maximum segments. Now, we're going to want a lot because we want to be able to have really nice, detailed noisy lines. So do something like 350. Trust me, that's nothing for Houdini to handle that many points. And also scroll down and let's enable this curve U attribute. That's going to come in handy later when we want to try to apply some type of gradient shading along the length of this. The curve U is basically going to give you a value of length down it, almost like a UV coordinate. It'll start at zero and end at one, and that'll be very useful when we want to put a ramp on this geometry later on. Now, let's just say we don't want every single one of these lights to have a bolt of electricity, you might not want that. So we can simply delete some of these randomly. Again, we can use some quick and easy x. So drop down a wrangle node. And we can say, let's create a random value for it to delete from. So we can say a delete M's do capital A equals. We'll do a random value off of parent ID. Now, if we look at our geometry spreadsheet and see delete M, You'll see that you get random values. Now remember, every single point per line has the same parent ID, so every single point is going to have the same delete me value, which is why it will allow us to delete an entire piece at once. You could also do this with the class attribute or many other attributes, but right now we're going to do it with the parent ID. So now we can say, if a delete M and let's say is greater than, and let's use that CH trick, and let's just do v Now we do open and closing brackets. Even though we might only do one line of code, it's just a habit. Now we can say, remove 0.0 because we want to do it on our incoming geometry, and then you just say PT num, and now click this little plus, and you say everything goes away. But you'll see them come back. If you want this behavior to be opposite, where you don't want anything deleted when the value is zero, you can just reverse this. Now you see they're all there, and then you can randomly delete lines to thin it out. However, you might be noticing that, no matter how much you slide this, it's the same pattern of random deletion. That's because the rand function is going to output the same random value unless we do something to it to modify it. So you could multiply this again by another CH and put the correct syntax here with the parentheses, and we could say rand vow, n n parentheses. And again, hit this little button. And now you see it's zero. So nothing will get randomness here. It'll just be all or one because they're now all going to be evaluating to the same random value. But if you do this, you can see now you start getting complete random change. So if you wanted only a very few of them, you could adjust this normal or this upper value slider. And then you could adjust which ones are displayed by this slider. It gives you some good flexibility and control there. It's still all random. So you don't have to manually set things. Again, you might want to limit this to never be zero, so you can hit this little sprocket at an interface. Rand val. Set it to something like 0.1. Doesn't really matter. As long as it's non zero. And now you can see it can never go to zero. So that's a good way of getting a randomness here. You might want to change this color here to something and also just change the icon because this is something that's very likely needing to get changed the more you work in the file. And now we're going to do our actual car wrangle. So this is going to get possibly a little confusing for some, but it's not that big of a deal. Let's just drop a wrangle node, and I'll show you what to do. Let's create a float value, and we will call it carve. And we will equal this to smooth. This is a new function that you may not have seen before. Go to compute an ease in ease out interpolation between values. So A this is going to do is provide a zero to one value. It says it right here. You can read the description if you've never seen this before. So we're going to give it a value one, a value two, and the amount. This will make sense once we actually start typing some code. Let's do 0.10 0.15, and then we're going to use our distance as our value that we're going to be evaluating against. If you want to see what that gives us, we can go into our spreadsheet and watch carve on. It's all zeros until we start moving along. And then you see it instantly jumps to one. Which is fine for now. We'll leave it as is. We're going to probably want to modify that. Usually, it's a smooth interpretation 0-1, but our distance attribute is changing so quickly once the start to move, that it's going all the way through the range before we even get a chance to see it smoothly grade eight 0-1. Let's now create a carve off. And we're going to change these values a little. Let's do 0.80 0.9. And again, we're probably going to have to modify these. Let's see if it's smooth or if it just pops. You can see now we get a little bit of a gradation here. It goes 0-1 over a couple frames. And what this is going to do is actually delete the points along the length of the curve. And I'll show you how it's going to do that. It's because of this curve U value that we have that this is going to work. So let's hit space type we're going to do if curve. Let's spell it correctly. Curve U is greater than curve. We will do remove 0.0 at PT num. Well, let's actually change this to greater than equal to. I don't know why type that like that. All right. This is spelled wrong. Again. Now you can see this works correctly, curve. And let's just copy and paste this. And let's change this Let's s equal and do carve off. And now you can see they come on, they extend, and then they disappear. That's the lightning dying, we can say. Now, if you look before we have this node, you can see how different it is. They're all there in the beginning, and they just stretch out and they never go away. Now with just a few simple lines of code, you get up to emit out. Once the boxes pop off of our wire, then you see them extend And then they disappear quickly, and it's all based on procedural nature of Hudini. We don't have to hand key any of this. It's a great thing now. Let's go over this code because you probably are a little confused about why this is working. As I said, the curve view value is going to be just a zero to one value down the length of our wires here. If you want to visualize that to make it easier to understand, you can always create again a little marker. Type in curve view curveviw, curveviw. Now, there's so many points it's going to be a little cluttered to look at. For sake of example, and argument. Let's just drop this down to 30. Now you can see it much clearer. You can see it starts at zero, goes up to one. That's like that for every curve, zero, one, zero, one. So this is basically a mapping down the length of our curve. And we can use that to our advantage because we're going to then create a zero to one value for this carve off and this carve on. How we're doing that is with the smooth function. And by the very definition of the vex, this produces a zero to one value based on two values that you give it, and then a value to sample against. So distance, when this distance of this box gets far enough away from our wire, after it's more than 0.1 units away, we start getting a transitional value that starts at zero, and we'll go to one. Once that box is 0.15 units away, it will be giving us a value of one. Now, as you saw, it pops because this is too small of a range. When we looked at this, our carve on value just goes from 021 instantly almost. You know, you have a little bit of a in between there. But if you really wanted to see the effect of it, you could change this to say 0.35. And now you can see them take longer to grow on. Just disable that compared to 0.15. Same with this carve off, we're just going to create another zero to one range, but we're going to start it later on once this distance is more than 0.8 units away, and we're going to kill it once it's 0.9 units away. If you want it to be a smoother transition, you could change these values. Like, look at how quickly this one dies or snaps back. Let's isolate this one right here and look at that. If you wanted that death to take longer, you could do say, 1.9. Now it's going to take way longer, it might never actually die. But we don't want that. And then down here, we use this value to say, remove the point only once this value is greater or equal to carve on. So I hope that makes sense. Let's see. I could show you just like usually you would use just a carve, and let's just plug that into the output here. But if you notice the standard carve works on the entire setup. All of it, all of them. So you can't get an individual unique carving. That's why you can do it very easily with V if you just know a couple little tricks. The smooth function isn't all that confusing. If it's your first time seeing it, it might seem confusing, but it really isn't just work with it and just keep using it, and you'll understand what it does. It boils down to just using zero to one values to sample when you want the point to be deleted, if that makes any sense here. Now, to get this to actually look like lightning, let's drop down an attribute VOP. We'll plug in. Visualize it here, and let's dive in. Now we're going to have to do a number of things in here. First thing we can do is drop down a bind, and let's bring in our curve e value. And this might make it much easier to understand this whole zero to one concept. Let's just drop down a ramp, do ramp parameter. Plug our curve view into our input and then this ramp into our CD. Now you might notice already, we get a nice white solid value up here and it fades down to zero to a black value here. And the reason is is because we're using this curve value to drive our ramp or to sample the values from our ramp. If you look at what our ramp is, it's going 0-1. So obviously, our mapping is zero to one. You can see what I mean, look at the lines. What we want to do is have both ends taper to black. So you can just move this white slider into the middle. Click anywhere on this gradient, and you'll get another slider and move it to the end and then just set it all to zero. And now you'll see over here, we have it fade off on the end, get more solid in the middle and fade off at the end again. That's exactly what we want because we want to be able to fade off the influence of our noise. We don't have the noise in this system yet, so let's do that now. Hit tab, and drop down a turbulent noise. We're going to plug in P initially just to pose and plug the output of the noise into P. Now, we've got to change to three D noise. You can see it's still pretty funky, but that is very noisy. Let's increase our frequency. Let's drop our amplitude down quite a bit. Now, this is just setting the actual p values for these. We don't want to do that. We'll be driving this position of our wires and our electricity solely by the turbulent noise, but we want to add it to what was already there. So it's very simple to do that. Just drop an ad, and we're going to plug our P into it. Our position. The output of the noise, we'll go into input two, and now look at how different it is. We now get our actual lines here, but with just the noise added to it, rather than driving the entire position by the output of our turbulent noise, you can go up here and disable and re enable to see how that works. But you'll notice that our electricity gets offset. So if we wanted this to actually be on our wire here, go up here and template it, It's offset. You might not want that. You might actually want that, but we're going to use our ramp now to control this. So dive back in. Get some room here to work. And now we can just drop down a multiply node. And let's move this over. Let's multiply the output of this turbulent noise by the output of the ramp, and then plug it right into our ad. Now, look what happened. It changed it so that the noise is no longer on the ends at the front and the back. Why is that working? Well, remember, when you multiply any value by one, it stays the same. When you multiply any value by zero, it becomes zero. So this noise, we're just going to make it go to zero at the ends of our wire so that when we add it in, there'll be nothing to add. It'll be adding a noise value of zero. But in the center of this electrical arc, where the value is white on our ramp, the noise value will be multiplied by one, so it will remain at full noise. So it's very easy to use values to manipulate data in Hudini. So now let's make this a little more interesting. We can promote our turbulent noise offset here. Look, if you change the offset, we can make it wiggle around and look like electricity, but you can't animate that within a VOP. You have to promote it. So just promote parameter. It's on this little sprocket icon. When you go up now back to geometry level, you'll see our offset, and you can do something like just dollar f. And now if we scrub through, you'll see they wiggle around a little bit. Right there. It's very easy to see that. If you want to wiggle more, you can just multiply this by something, and it will increase the amount of wiggle. Dollar f is just going to tie this value to the current frame that's a variable in Hudini. It's very good to use that to just randomize things or have something driven by time. But all of them have the exact same wiggle up and down, so the noise field is moving through them all identically. We can actually offset that. So let's dive back in. Double click this little tab that's into this offset here. So now we can actually inject some more data into this. Let's drop down another bind. And let's use our parent ID. Every point has the same parent ID that is on the same bolt so we can use that to randomize the amount of offset. But we only want to do it in the y axis. So the way we can do that is by doing a get vector component. Plug the offset into that. And now we can say component one, two, or three. Component two will be y because it's x y z, and we can just add. So plug the output of that into here and our parent ID into there. So now we have added the unique parent ID into the y vector component of our parameter. Now we can reassemble this into one vector to pipe into our offset. Set vector component. So the vector we will have is this offset going in. The sum will go into F val, and we'll say we want a component two to set it two. So what it's going to do now is use the original data for x and z coming out of here, but it's going to use this f value to set the y component. And then we just rewire this into offset. You can see they changed, and now they've changed so that they're all going to be slightly offset and a slightly unique, might be hard to see, but it's there. It'd be more noticeable for other effects, too. If you did this, and it's a very good thing to know how to be able to adjust just one component of a vector. Let's now maybe adjust our turbulent noise a little bit. Let's get some better looking lightning. So you can increase the turbulence value. That'll just create finer and finer turbulence. We can increase the roughness. We can change the frequency. We can look at our points. So don't forget we resampled these to a very low value just so we could see our curve view. So let's go back up now and bring this back up to its full 350 segments. You can see now we have much finer looking lightning. Now it might be a little too crazy, though, so let's dive back in. We can change this frequency. Modify the amplitude a little bit. Let's stay in the positive though. Modify that roughness. Now that's looking pretty good. That looks like lightning energy to me. Let's look through our camera. So we like that. That's good. Change it to whatever you like, but I'm going to stick with that. Remember, none of these values have to be identical to my scene. It's all going to be arbitrary. The slightest difference will just make it look a little bit different, and that's okay. Let's go back up now. Now, we can just do a little cleanup like we've been doing. We can do an attribute delete. Wire that in. Let's see what we have. Nothing here. Nothing here. Nothing here. Let's see what we have here. We only want a couple of these. Let's keep color. Let's keep parent ID. And now we can do our little star trick asters, and then put the carrot in front of these. That'll be what's kept, and now you can see, we only have CD paranoid EP is undeletable, that will always come along with it. You need that for the position. We have these point groups. We don't need those either, so we can get rid of those. So I'll drop down a group delete. Group delete. Enable this delete unused groups. And let's just pick them both. You could have done the asterisk if you wanted to. And now you see we have no groups. Now we can do our null. Wire that in, and we will call it out. And we'll just do lightning. Right now, I'm going to stop this lecture here since it's getting very long, and we will pick up in another lecture to show you how to actually render this lightning. So I'll see you in the next one. 8. Lecture 7: Rendering the Lightning: All right, we're back to look at some more of this lightning setup. We're now going to go into getting the rendering setup for this. If you close on your file, get it back open and let's go up to our object level. We can do another geometry node here. Let's call it render lightning. Let's go up to our render options are material, and we'll assign our same lighting material node. It'll work for this case. Let's dive into our lightning node now, and let's do an object merge. Let's say into this object. Now, let's go to R advanced node. Let's find it. That's going to be down at the bottom here. And we can look for out lightning. And hit accept. Now we have our lightning in here. One thing we can do right off the bat is drop down a wrangle node. And Let's store the CD color, the cd x into an attribute called Alpha. You may notice it got even a little dimmer at the ends. Alpha is actually going to apply an Alpha value to our geometry. So at render time, it will fade the opacity of the edges basically at the ends. Now let's drop down another object merge. Into this object. And now let's find the output of our render boxes node. Out render, and let's visualize those. So now we can see we have these spheres that have the colors on them, and I would like to have the same colors on my lightning. You might want to just make the lightning yellow or white or blue or whatever, but I think it'll cool if we have the lightning color match our sphere, so that's very simple to do. If we middle click, we see we still have our parent ID, and if we middle click over here, we still have our parent ID. So we can use that to actually look up the color and transfer the color of one node to another. We can do that with an attribute copy node. Plug our wires here on the left. Our geometry over here is our spheres. And now by default, you see, it's not really correct. But we can tell it to match by attribute. So if you say parent ID, now you can see it changed it so that there's one color per bolt here, and you can see these colors are actually correct with our spheres. It might be easier if you merge it to visualize that. But you can see this purple one is coming out of this ball, this green one is coming out of the green ball. Another green one here. This white one is this white one, so we have our correct colors now, which is great, that'll look cool when it's rendered. We can delete this merge node, though we don't need that. Now, let's create a poly wire node. We want to give these actual thickness. Now that's going to be a way too much thickness. So do something very small. Let's see. That's even too big. Maybe 0.001 is the ticket here. That even might still be too big for us. You might have to adjust this once you get into test rendering, but for now, this should be a good enough value. Now, you can see if you go into wire frame mode, you can hit W, the same thickness out to the end even with this faded off tip. Now, we can actually use that Alpha to also drive a wire radius. Like I said earlier, don't think about the name of an attribute and that it's limited to do what it's named for. Just think of values as values and any value can drive just about anything in Hudi. So you could just say, Okay, we want our general thickness to be the 0.0 005, but let's multiply that. By Alpha, and make sure you put the at sole and Alpha. And now, if you notice, look at what happened. We got his nice tapered end there. But the overall thickness stays the same, wherever it's solid white. Why? Because like I've said before, multiplying anything by one, it stays the same value, multiplying anything by zero, it makes it zero, and you're going to have a smooth transition in between because it's a zero to one value of our Alpha. This should be making it very, very clear and hammering home the point that data is just data in Houdini, and you can drive anything with anything just about. You could adjust these divisions and segments if you want more detailed geometry. You can see if we create more segments, it makes it finer, but should be fine as is, or you can set it to two, really doesn't matter. Divisions, you can increase as well if you want it to be smoother, but from the distance we're going to be viewing these bolts from, it doesn't really matter. Just know that these options are available. Now, we can drop down and attribute delete, because as you can see, if we middle click, we have some values that we really don't need. It's fairly clean, actually, but if you wanted to get rid of some of these, we could get rid of basically parent ID. That's about it. And we already are pretty clean. Well, you could get rid of the UV verts as well, why not? We don't really need them because we're not going to be UV anything. So that's about as clean as this can get this data. Now, something that I sometimes do is even drop a wrangle node down at the end. And let's just say, since this is lightning, you wanted it to be super powerful. You could just do an at CD times equal something like five. You'll see it just got much brighter, and remember, this is going to also drive our lighting intensity. So again, you're going to have to do test renders to see what's a good value for you, but we can drop our null down, and we can say this is a complete network and chain, so let's call it out render. Let's go up here, Let's make sure we have our lighting on here. We don't care about adding the velocity blur because with lightning bolts, you typically don't render those with motion blur. It'd be up to you. Also, let's go up here, and at least let's disable these so that we don't see them. You can just select them all and then click the little end here, and that will make them all invisible. Let's go into our mantra node. Go to our objects. And let's add we want to have our boxes, ground lightning and wire. H except. Now, if we do a render, it's probably going to take a little bit to kick this up, so I will pick this video up when this render is done. Now, let's look at our output. Well, Cool, we have our lightning. However, it doesn't appear like it is actually contributing. Now, why is that? Well? It's very simple actually. If we go back to our objects, what did we do? We created a new geometry source that needs to emit light, but we didn't duplicate our geolight. So just all and left click, drag it down. And in here, we're going to use our same material, but all we want to do now here is select our render lightning Geo. So collapse. This render lightning, out render, Now if we go back to our out node, we have to assign this new light. We just want Geo Light one and two. Don't use any of these H lights. And now we can click Render, and we'll bring this window back up. It's going to take a little bit for this to. Render, so I will pick the video back up when it's done. And now it's done, and if we toggle back and forth, you can see now the contributions of our lightning. We could still make this better and improve this right now, it's basic shaders. There's nothing on our ground. We could add something like a reflective shader, but for now, we're not going to do that. We're going to stop this lecture here and we'll pick it up in another lecture to show you how to add something even more interesting to this setup. So I will see you in the next lecture. 9. Lecture 8: Creating Ground Lightning: Alright, welcome back to this course. If you close down your scene file, open it back up, and you can dive right into our vellum string lights advanced. Now we're going to do one final thing. And this is very common to happen in production. If you're working on a show, you might have a SIM that looks great. You think you're to the very end. But then all of a sudden, supervisor or a client wants to tweak something at the last minute, and you're going to have to be able to just edit something quickly, maybe not even rerun a SM. And let's say they want some cool little ground electricity running along the ground on these boxes or these spheres. They loved your lightning that branched off when the lights broke. So now they want to add some lightning jumping back and forth between some of these as they're swirling around and going by the camera. So we can do that pretty simply. It's very similar to the setup we already have, but you're going to want to be able to do it on a very specific set of boxes. So this particular SIM might be a little out of control, like we have boxes that are going all over the place because of the intensity of our noise. But let's see if we can get it to work. At least I'll show you the concept. And we might have to dial the actual dynamic settings, but we can go from this point and just see what happens. We can drop down another assemble node. We use these frequently to make things more convenient to work on. Just plug the output of the add flicker into it. Create the pack primitive. Let's make sure we keep that parent ID, metal click it. So now we'll see what we have yet. We have it, and we have our 20 pack points. Realistically, you could probably rewire some of this network to just create one assemble off of these boxes and then wire all your outputs that need an assemble. But for sake of example, we'll just create an assemble every time we need it. Now we can select the boxes we actually want to create lightning effects through. So let's go over here. Make sure we have points enabled, since we're working on packed points. Let's say we want to do it on these boxes and now hit Delete. Now you're going to see they disappear, but all you got to do is click this Delete non selected, and now we'll have the boxes isolated that we want to work on. So those will be the guys that are going to have the ability to have lightning bounce through them. We'll drop another ad node and do the same trick we've done in the past. We just want these points to work on, so we can delete the geometry but keep the points. Now you see we only have five points. Now, let's do a connect adjacent pieces. Wire that in. And we can say adjacent points. Let's tell it to only search for say three points. Let's expand that search radius. Let's see what that gives us. That might look all right? Let's see. You might want to play around with these settings. That's going to be too uniform. Well, we can run with this for now. You might have to do a better selection of boxes, but let's see how this works out. We'll drop down another sample node. Wire it in. Let's just for now say that 50 will be a good number. So unclick this maximum segment length. Turn on maximum segments, put 50 down. If you enable points, you can see now we have tons of points here. And we're also going to want our curve view attributes so we can do the same trick that we did on our other lightning. Now, we're not going to want this on from the beginning. Just like we did to our other lightning, we can actually recycle some of this code. Let's find where we did our carving here we go. Let's name this. Animated curve. And then let's copy and paste it. Control C, Control V, wire it in. Now, we're going to want to modify this because we want to do it specifically in a time region, okay? So say once we get to here, we want the ability for this lightning to turn on, say frame 22, and we'll have it happen to 44, whatever. It doesn't even matter. Let's just see how we can modify this. So the carve on instead of using 0.1 and 15, let's use actual frame ranges. So 22 would be the beginning frame range. And we'll want that to turn on quickly. So we'll say 25, and then instead of distance, we will drive it by frame. Not double app there. Let's just do one. And we can comment out this off. We're not going to use that. We're not going to make them disappear. Common out these two. And now, if we scrub, you'll see they just turn on very quickly in the beginning or after frame 22. You could modify this to your liking if you want to change it. Let's template our boxes real quick just so we can see what they look like. That's probably going to be too much lightning. But again, let's just get the setup working, and then we can actually go in and fine tune it. That's a good workflow you should always do. Don't get caught up fine tuning something. Just get a working rig. Once you can prove that it works, then you can always modify it and fine tune it to art directed. But the most important thing is getting a rig that works. Now let's go over here and find our attribute vp. This is where we actually made our lightning cool. You could name that too if you want. Lightning vob. And you might want to color something just because it's a node you might have frequent interaction with to change the look of your lightning. Control C and Control V, paste it over. Wire it in. Now you can see these values might not work for us on this lightning. I might have a little too much amplitude. So let's go in here. Turbulent noise. Now, a lot of the stuff you can promote up to stop level so that you don't have to keep diving in. So something you might frequently want to change would be frequency. So click over here on the right, promote parameter, same with amplitude, same with roughness. Same with turbulence. Attenuation I rarely ever adjust. Now we have all these values up here, we can change. You can see it's much simpler. But I like that. Let's look at through the camera. That might be a little crazy, but, you know, we have tricks that we can do to delete some of these if we don't want them. For now, we'll leave it as is. Now let's look at our side view here. Let's hit the four key. And make sure none of this lightning goes to the ground. That can actually happen. Unfortunately, we're not seeing that lightning anymore. Let's go back in here. Here we go. Okay, we look like we're lucky, all our lightning is staying above ground. We have to look through our camera again. So if we want to have the ability to randomly delete these things, we've already done that many times. We could do a connectivity stop. That's going to give us our class attribute. Which will give us individual lightning bolts here if we want to visualize class. You can see what it gives us. So this is Bolt one, bolt, Bolt six, bolt seven. Then we can randomly delete these things. Let's see if we can find where we did that. It's somewhere over here. Here it is this red one. We could also name that random delete and copy and paste it. Let's change this parent ID to class. That way, at least we're using it. We technically probably could have kept a parent ID, but the problem is, because of the way this is interpolating, it's going to have parent IDs that don't exactly work because now for the first time, we're connecting between two different boxes that have different parent IDs. So it doesn't quite work the same as it did on our other setup. That's why I made this class attribute. It just makes it easier and more stable. As you can see, if we go back here. And actually look at parent ID. It's broken in the middle. You see how that breaks and this breaks. That's because of the way these values are getting interpolated, because of the way this resampling is working with this connect adjacent pieces. So we just can't do it the same way. We have to make a clean attribute after this stuff is generated so we can have our correct values that give us a single full bolt. And then, like, before you can randomize this as much as you want. It's completely up to you. You don't have to have these values match mine at all. And if you picked different boxes to be your hero boxes here, all these values are going to be different and need to be adjusted on a per scene basis. If you want these boxes to only say have this electricity when they're close to the ground, which might be cool. I kind of don't like how it has this electricity as it goes up. We could probably modify this pretty simply. Let me show you something here. If we go here. This is where we have our points. We could drop a wrangle node in and just say, at p y, that's going to access our position in y. If it's greater than say 0.25, just remove the point. And we know we need zero, and we want PT num because we want it to remove the point that is above that threshold. Now, obviously, no points are above that threshold, so let's lower that. Still none are lower than that threshold. Now we can see two of these points disappeared. Might be hard to see it with our template mode on, so we can get rid of that. But now you can see only points remain down here. If we disable it, you see these ones up here disappeared. So let's look through our camera. Let's wire this node into our network and see if we actually like the output. Maybe it'll work. Maybe it won't. We won't know until we try. So now we get only lightning when they're on the ground. What that might be a little more aesthetically pleasing. It's up to you. Again, this is a node that you would want to give it a color, maybe change its shape just so it stands out. You can name this something like height delete or wide delete or whatever you choose. Now, let's do what we always do when we finish a chain and drop a null. And let's call this out. Then we'll just call this ball lightning. Now we can go back up to our render lightning and we can actually merge it in with this stuff. We'll just do it in here. So let's bring in the object. We'll merge it into this object. Let's go find it. It's in our advanced setup here. Out ball lightning. There we go. Now we have it. We're going to basically do the same stuff and try to get the color on here, but we can't do it the same way that we did it before, because, like I showed you, the attribute gets interpolated across the surface, and now we have two parent IDs, one on a ball over here, one on a ball over here, so it's not going to give us just one parent ID value on this geometry. If we copy this over and try the same thing, Look, what happens? It does not look good. We have some purple over here, some purple over here, green here, purple there. It just doesn't work. So I'll show you a different method. We can do an attribute transfer. This is going to be based on proximity. We want to transfer this color onto this ball lightning. So we plug it into the left. We can just tell it CD because that's all you want to transfer, and we could leave these values at where they're at. It doesn't really matter. But you can see now you get a better transition, and we can merge this so we can visualize that easier together. You'll see this is that slightly pinkish peach color and that slightly greenish color. It meets in the middle and it's a bit of a harsh contact there, so we can actually smooth that, but let's get rid of this node. We don't need that, and we'll visualize this. Before we get farther ahead, let's though copy this attribute wrangle for our Alpha because we're going to want that on here. All right. Now, let's drop down a smooth node. Plug it in. You can see it by default, smooths the P. If you disable it and look at the line, it's back to our nice electrical lightning look, but the smoothing really smoothes it out, but we want to smooth CD. And if you drop this filter quality down to say one. You can see it did disable it. And then look at this harsh connection point here, basically the middle. It's a lot harder than when it's here. It's nice and blurred, so that actually helps smooth our color value. Now, let's do what we've done before and drop down a poly wire. Wired in, it's going to be huge by default. Let's go down to something like 0.0 004. We want something pretty small. Again, if we look at our ns, they're kind of blunt, so you can multiply them by Alpha. And you see they get nice and tapered and thin. You don't really need much detail in here, but if you want to increase the segments and maybe the divisions, you can do it a little bit. Now we can drop down a null because we're basically done with this chain. And just call it ball lightning. Even though we're going to be merging this over and just rendering all this as one geometry here. Let's do emerge above this last wrangle node because this last wrangle is multiplying our color, and we might want to affect this the same so we can merge in here and then visualize both through our camera. Now, this is cool. However, I'd like to be able to brighten this electricity that's on the ground a little and make it independent of this one. So we could just drop down a wrangle, plug it in over here because this is our side that's just our ground lightning. And we can do a trick we've already done at CD. We can times equals. So it's going to multiply the current color value by whatever we put on the right side of this. And let's do a channel. And we'll just call it, you know, color molt. And now click a little plus. It's going to go to black by default because it's zero. You can see it comes back. Again, if you want this to never go to zero, you could do your little sprocket trick up here, but maybe you do want to be able to animate this down to zero. For now, we don't want to do that, though. Let's back this time frame up a little bit here. We'll set our value here at say, frame 33 Alton left click. Then when we go a little further ahead, we can crank this up like crazy to say 15. And then you can lower it to two and key frame it, and then we can go ahead a couple of frames and again to something high, like 13 and set another keyframe. I'm just Alt and left clicking. And that might give us some nice bright pops because remember, this is going to drive your lighting intensity. Let's look at it combined. And now let's just for the sake of it, let's render a test frame. Now, we don't have to create any more geometry lighting because this is all in the render lightning node. It's all wired in. So this out render, as you can see, has both chains into it, so that's good. Let's go over to our out. We'll hit Render to play. And I'm going to pick this video up once this render is done. Alright, the renders done. As you can see, it's very bright. It's also very noisy because our render quality is pretty bad right now, but it's okay for just prototyping. Looks pretty cool, though. You could always dial this down in C. You know, you're going to want to glow it out a lot anyways, but you would have to dial in some of these values. This lightning is a little hot. Let's create a cooler shader, though now for our spheres and for our ground. Again, that's going to make us need to adjust these values because if we add a reflective type shader, it's probably going to be very bright, but let's just see how it looks. So let's go over to our material palette, a principal shader. We'll shoot it over here with this arrow, and then double click it. And now we can just call this reflective go. And we'll have this base color, we'll have all this. Let's just keep all this as it is. And then also let's duplicate this over. And let's call this reflective light. And on this one, we're going to go to emission. It's a used point color. And now, we'll put reflective go on our ground and we'll put reflective light on our light sources. So let's go up to our object level. That means our boxes will get this reflective light. Our lightning. We'll get reflective light. Our wire will just put the reflective go on it, and our ground will put the reflective go on it. Now, at default settings, this might be crazy, so let's just check it out. It might be very, very reflective and show way more of the light and contributions, but we'll just have to see to bring this up here. I want to jump ahead to when this renders done. And the render is done, and you can see it actually made the ground look much cooler compared to before. It's still extremely noisy, and we actually almost lose a little bit of a lightning bolt back there. So we'd have to fine tune this and dial this in. Let's reduce some of the values on this lightning so we can just go to our object. Let's do render lightning. Let's change this overall to say a value of two. That'll drop it down considerably. Let's also go up to our object level and our geolights. Let's increase this sampling quality to at least three and three. Do it for both. And let's go back over to our out, and we will adjust some of these values, three. Let's bump this up to a seven and a seven. Now, this is probably going to take a considerably longer amount of time to render. The unfortunate thing about mantra and geometry lights is it is very slow to get high quality out of it. So I'm going to click this render to play. And I will bring this video back up. When this is done, it could easily take five, six, 7 minutes. We'll see with these reflective surfaces, it could take a while. So we will pick this back up when it's done. All right, so the render is now done. You can see it took 4 minutes and 28 seconds compared to a minute in 1 second, but look at the drastic increase in quality. It looks much better here. Still, though, this is not a production quality render. If you look closely, you can still see significant noise, especially up here. This is very bad that would not be usable in a production render. For now, this is going to be considered done. Our rig is set up. I've shown you everything I intended to show you with vellum. I hope you got a lot of good information out of this course. As you can see, many, many things are repeated when you start setting up a Houdini rig, key things like that connectivity node that allows you to get all of the points that are connected to a single piece of geometry are fantastic to allow you to do things on an individual geometry basis. I hope you are interested in learning and wrangles after seeing how easy it can achieve great effects, also the power of grouping geometry and then merging it together to feed it into a vellum solver setup. You can then do very unique things and isolate each piece of geometry very easily if you have them pre separated into groups. And something like a parent ID. You saw the power of doing that where you can then grab colors and connect points and lines and everything by simply just adding an attribute in the right space in your setup. Now, if you had forgotten to do any of that, you can always go back, but you then have to rerun the SIM, which isn't a big deal for something like this, but in a production, you can sometimes get into a time pinch where you might not be able to adjust your setup, and you just have to be able to edit your setup after the SIM and make it work. So with that, that's all I'm going to show you for this. I'll see you in the next one. 10. Closing Remarks.!: All right, so that concludes our course here on Vellum. I hope you picked up some useful tips and tricks along the way. We covered quite a bit of information in this class, so congratulations are in order if you made it to the end. Now that you have, I encourage you to try to incorporate these tricks and techniques I've shown you into your own setup. You can do this as a class project. Try to come up with something unique based off what you learned in this class. Can try to do anything like different shaped objects for our light geometry or try to use multiple light strings, even maybe try to pin both the left and right side of our strings to moving geometry. And remember in Hudini, a point is a point. So you could technically do a simulation, say some RBD objects, and then use moving points on two separate RBDs and create a vellum string between those two rigid bodies, just to give you a little idea of what you could try doing on your own. Hope you enjoyed what we covered in this class. Vellum is a very interesting part of Hudini, and there's so much you can do with it. This is just scratching the surface. I encourage you to just open up a blank Hudini file and start playing around with Vellum and see what you can come up with. Once you know a little bit of the basics, you can then try out so many things on your own. Just remember, one of the most powerful things you can do is to group your geometry and then combine it all together. That way you can pipe it all into a Vellum setup, and then you can have access to individual components of that geometry so you can apply different types of constraints and control things individually. It makes it very powerful and very easy to work with V. With that being said, have fun trying out these techniques that you learned on your own for a project and feel free to post whatever you come up with. It'd be interesting to see what everybody does with this information. I look forward to sharing more information through this platform, so stay tuned and just keep looking out for more lectures. I have a lot more information about who D need to share. I'm glad you are a part of the class, and I hope to see you in a future one.