diff --git "a/transcriptions/S3 - Wind Animation_transcription.json" "b/transcriptions/S3 - Wind Animation_transcription.json" new file mode 100644--- /dev/null +++ "b/transcriptions/S3 - Wind Animation_transcription.json" @@ -0,0 +1,8 @@ +{ + "text": " things that need to happen, but then we'll get into doing the, we're gonna do the, we're gonna get the custom tree branch placer to work with the rig. So we're gonna actually re-rig towards the end. I, depending on how much time we have, I may either dive in and actually do it live, or if it's running a little long, or if everyone's down for it. I don't worry about that. If people people have to go they go and usually people who stay are hungry for the info so I'm worried about that. Yeah I practiced it last night and I had time to do it live so I'll shoot for that today too just to so we just will modify or we get the variant and change the insides of those tools and get them to do cool things. I actually ended up using this on a job this week I started making trees for a job that we're doing at my work so. I was making a little bones I had plants and stuff. I was going to try and make a flower too because I'm pretty sure you can make, you know, flowers and whatever types of plants you'd want. Yeah, I thought about too. It'd be interesting. Yeah, it's like unfurl a petal or something off of it. Yeah. Yeah. Cool. We'll go take it away, Mark. Alrighty. Let me do my share screen. I'm going to share this one. And I'm just going to slide this over here. And let me grab my chat. And I'm going to do this. So all right. So here we are in lesson three of procedural growth with Kinifex in the Labs Tree Tools at Houdini School. name is Mark Fancher again, and this is our third and final lesson where we will be creating a wind system for our tree. So I got a little video here and see. This is sort of where we were left off last week, we kind of created this tree animation, so it just the tree kind of grows out of nothing and just sort of lands. So, I'm statically like this and then what we'll be doing today is this, adding this like rustling of the leaves right here so if I just me. So you can see here, we're going to be adding sort of bending of the branches to kind of accommodate that wind gust and then we're also going to be applying this leaf flutter that is going to increase in frequency and amplitude as the gusts pass through the leaves. I just, it was something that I kind of like picked up from observing like how speed tree works their wind system is super fantastic looking and it was kind of inspiring to me to see if I could figure out a way to do it in Houdini. And so we're going to be doing that by the end of this main portion of the lesson. And then the lastly what we're going to do is we're going to dive into this now you can't see the full tree for this example but this is the more advanced example where I'm actually using custom branch placement and stuff but this is sort of my hero image I just kind of decided to pick a more pleasing angle, more abstract view of the tree But if I pull out the, let me just grab my other window over here of that project and merge it together, you can see that here I've kind of, like I kind of hand placed a couple branches here. I kind of drew a curve for the trunk here and then placed this branch by hand by drawing it using this curve tool and placed another one by hand and so on and so forth, built this tree that is a little bit more like in a shape where I just kind of want to art direct it more like kind of horizontal kind of roaming almost bones I like looking tree. So we'll look at that at the end of this lesson and figure out how we can modify our rig to get it to work with our current setup. So the file that I'm going to be working off of for this lesson is going to be the project file from the course from last week. So if you go to the course dashboard and session two right here. And we just hop down here. This file down here on related material lesson 02.zip, that is the project file I'm going to be building off of just to maintain some consistency. I'm sure that it's almost identical, but just to make sure you never can be too safe with that. So let's get into it and start building this sort of a wind system. First thing I wanted to do is apply the wind to our branching setup. So over here, we've got our breast branches right here. And the way that I'm gonna, the way that I thought about doing this is sort of just passing a noise attribute through this and using that noise to drive literally everything. But the noise that I'm gonna do isn't sort of the typical noise you might think of. So when I think, oh yeah, let's pass a noise through our tree, I'd throw down an attribute noise, like so, and maybe just select the position mode. So instead of, you know, creating a vector noise on color, we just would put in P here and sort of get this kind of noise function that kind of messes up our tree branches a little bit. And if we like, you know, increase the element size of that and then add our offset, you might think that this is the beginnings of how we could apply some sort of a wind deformation to our branches. But the way that Kinifex works and everything is I really want to work with, I really want to continue working with rotations because rotations are really kind of like the core of how these deformations work and everything. So what I thought was maybe we just passed through a float noise and that float noise acts as a modifier as to how much rotation should be happening on these branches as gusts pass through. So let's just go back to our attribute noise here and I'm gonna scroll up here and instead of making a vector position noise, I'm just gonna just create a new attribute called noise and we're gonna switch that over to a float. So we're just getting a float noise here and I'm just gonna hit the I key and find my noise attribute here and just visualize it. So you can kind of see that we've got this red, white and blue kind of color. We'll fly in here. We got this red, white, and blue color on our branches. And so what I like to do to get a better view of what my noise is actually doing since these branches are just kind of little splines, I want to get an overview of what this noise actually is. So I'm going to just actually thread on a grid and use that grid to act as a slice through our wind to view what we're doing. So I'm going to set this grid to be on the YZ plane. Sorry, the XY plane. Yeah, there we go. The XY plane. And let's give it 100 rows and 100 columns. And let's just make it a size of 30 by 30. And I'm just going to grab the manipulator and kind of position it over our tree. And now if I just I'm going to hold Control, Shift, and Alt and drag this noise off to the side and just wire this in here. So I can actually kind of view what this noise looks like in the space of the tree, you know, which is kind of resting underneath it. So I have a reference copy of this noise over here for visualization purposes, but any changes I make to this node over here is going to update correctly. So if I were to offset this noise, you can see it passing through that plane, and that'll be really kind of like what is happening on our branches themselves. I'm just going to switch my view up a little bit here. I like to work with this. I'm just going to hit the Alt key and click on this little paddle in the middle here. And then without holding Alt, I'm going to click it again to just put my parameters off to the side like that. So I can get a little bit more room to see what I'm doing here. So let's make some modifications to this noise. I think that right now, the noise seems like it's really kind of, it's really noisy. And it's really, there's a lot of like very closely packed together pockets of high intensity and low intensity in order to get these bigger gusts. We're going to want a larger element size and maybe a little less roughness. So I'm going to dial the roughness back to about point two five. That kind of just makes these blobs a little bit more, you know, blobby and less kind of, you know, just less of this like kind of chitter in there. So I'm just going to set 0.25 there. And then on the element size, let's just crank this up quite a bit and see what I did in my previous example here. Just make sure I get those values right, because one of the funny things is that I found a really good gust that I liked in this. And so I end up offsetting and animating into this noise quite a bit to find that perfect gust. But if I increase my element size to 30, you can see that we're getting quite some large. some large blobs here. And then I just want to animate this offset. So we're going to say that our wind is blowing in the x direction. If I look down from our camera angle, so our previous camera angle we set up, I want the wind blowing from left to right. So that is blowing in the positive x axis. So if I just animate this offset on the x axis here, we can put in something like dollar sign ff divided by 30. And that will give us this sort of, you know, wind gusts coming from left to right like we'd like. The other thing that I found though, this is what I'm talking about offsetting is right here as we get to the end of this. You can kind of see that it actually looks like the noise value is shifting a little bit. If I just kind of move subtly with the mouse, you can see that it looks like it's actually, it's not just moving from left to right, it's actually changing its on the visualization on our visualizer because it's set to, here it's set to auto ramp range for us. So it's kind of grabbing a min and max on its own and setting the range of this. I'm just going to set that to min and max and set it to, restrict it to a value of zero to one. So that's no longer changing but as we get over here you can see that we're about to get this major dip that comes right here. And I found that I really liked that dip to kind of happen at the beginning of at the end of when my growth was happening. So we could get that initial that initial gust that kind of like pushes our branches right as our growth stops. So I just did that by kind of offsetting my frames into that noise a little bit. I offset it by 168 frames, which ends up being like, I think seven seconds. Yeah, it's about seven seconds in. So here you can see as we get to the end of our growth, which will, you know, well, at the end of our growth kind of, our growth kind of wraps up around, let's see here, around, you know, the 72, 72 frame point right there. So if I show our noise, and around frame 72, we see we get this nice dip and then this nice heavy gust that comes through. So I was just sort of a little like, you know, art directing, trying to find the right point point in the noise that I wanted to use for doing that kind of a thing. The other thing I wanted to do is just add a little bit of contrast to the noise. I'm right now it's right now we've got very smooth transitions between the noise. I just wanted to kind of like let that noise kind of max out a little bit. So I'm going to just throw down a wrangle, an attribute wrangle and wire that in here. And we're just going to kind of ramp our noise off a little bit. So I'm gonna say at noise equals ramp. We're gonna create a ramp parameter called ramp. So ch ramp ramp in quotes comma at noise. And this just gives us a nice, it just gives us a nice little curve. We can kind of modify that. I'm gonna do the same trick, which is control alt shift drag this off to the side so we can kind of visualize what effect that's having it having over here. And I think that for a value, you know, you can see we're just, we're increasing that contrast on this noise. What I like to do is I'm just gonna bring it in about 20% on either side. So we just put in a 0.2 here and a 0.8 on the right hand side. So that just kind of, it's kind of tucks it in a little bit and gives it a little bit more. You get that really nice violent, like it's basically nothing right here. And then we get this nice whoosh that comes through like that, sweeps through the tops of our branches. Nice, so now I want to kind of get back into, I wanna, let's get this back into our network and start using it with our rig attribute wrangles. So I'm gonna just zoom out here, maybe give myself a little bit more space. So I'm just gonna grab all these nodes and drag them down a little bit. And what I wanna do is just bring this introduce this noise into our stream, right, about here. Now, I've got sort of a bunch of streams kind of coming off of this rest right here. I'm going to just bundle these all together, maybe do a little bit of this, maybe bundle these together, just holding on the alt key and clicking on these, on these streams to just sort of create a little notch here to kind of keep things organized. So we've got this noise and we're replying this contrasty noise that we applied here as our gusts in our branches. So the next thing we want to do, and this is what I was thinking would be great, is just use this noise to drive the magnitude of the rotation that we're applying to our branches. And we've done a whole bunch of stuff with rotation already right here with our branch animations and so on. on. And so I'm going to just do another one. We're just going to grab another, we're just going to create another rig attribute wrangle. And we're just going to throw it in right here and do our rotation base and use our noise as a multiplier on that rotation. So what we were using before, we're using the pre rotate function. So I'm just going to snag this out of our previous apply animation, you know, one of these one of these wrangles, we're just going to use that same line here. Just going to paste it in here. So we got our pre-rotate function set up. And then for our axis, we're going to do an angle. So we're going to say float angle. And we're just going to give it a multiplier here. We're just going to say CHF angle. And then whatever we set this slider to is going to sort of be kind of like what the maximum level of rotation is going to be on our branches. And we're going to multiply that by that noise attribute that we're bringing in from up here. I'm gonna just label this real quick. Let's say apply contrast to noise. And down here, we're going to be saying, this ring attribute wrangles is gonna be saying, call this apply noise like that. The other thing we need is an access. So right now, if my wind is blowing In the positive x direction, I want to rotate it around the axis that points into the screen. The issue that we have right here is that our transforms, if I look at our previous level, our transforms currently are pointing in all sorts of different directions. So if I were to say, okay, let's rotate this around the x-axis, you'll see that it's actually going to rotate about all those red axes that were defined on that transform. So let's throw down a float axis and say, sorry, it's not a float sub vector. I do that a lot. Vector axis equals CHV, sorry, not CHV, we're just going to say 1 comma 0 comma 0. So the axis we want to rotate around is our x-axis. And if I just turn on this slider right here and crank that up, you can see that. Things are kind of rotating every wish way because all these axes are not, you know, world aligned at the moment. They're kind of all on their own. So if I were to, I think what we do at this point is we actually just are going to temporarily reset our axes, so that our x axis points into the screen down the z axis. So, if I go up here, and we just create another little transform. and why are they in here? For right now, I'm going to just turn off our animations that we did here, the animate branches and trunk and everything. We're just going to have a static tree for right now. You can see that that noise is passing through and rotating our branches. It just doesn't really look like anything resembling wind yet, because it's kind of rotating all sorts of different directions based off of those weird transforms that we have. So we create this. Sorry, I didn't want to throw it on a transform node here. I wanted to throw it on another wrangle. angle, another attribute wrangle, we're just going to reset the the transforms to point down the z-axis. So on this one, I'm going to throw down a vector dur and this is going to be our wind direction, we're just going to normalize that and we're going to normalize a chv that we're going to set, so a vector channel that we're creating called wind direction. And I'm just going to hit this button to create it, to create the channel that we have here. And the wind direction is going to point in the x-axis. So we're going to be setting our wind direction to be 100. And then we're going to create a transform here and just basically set our transform from scratch. So three at transform equals make transform. We're just using the make transform function to give it the direction that we want it to point. So we want it to point in the dir direction that we created. And then we want our up vector to just be, we'll just use the y-axis for now. Oops, zero comma one comma zero and close brackets on that. So now we've recreated. So if we go up here and we look at what effect this has had on our geometry before, our axes were pointing in all sorts of different directions and our noise wasn't really behaving itself very well. But now, if we turn this on, you can see that all the X axes are now pointed into the screen, into that Z axis. So when we rotate around that X axis, it's gonna give the effect that the wind is blowing the tree as it rotates off into the right. So if I turn the apply noise back on, let's just turn off those transforms for a second. Maybe I'll just dial this back a little bit, like way back. And let's play this down a little bit. You can kind of see that our different branches are having different amounts, they're having different bend amounts as that wind passes through. So if I turn maybe the noise on and turn the transform off of our visualizer, you can kind of see how that noise is passing through and rotating all those branches along with it as it comes by. So you can see this big gust comes through gives us a lot of rotation towards the top there and everything like that. So that's working, but one of the things that I would like to do is, you know, and this, you can do kind of either way if you want. Here in my example, what I did was I only rotated my branches around their roots, but it does kind of look good sometimes to actually rotate the entire branch and just apply a tiny amount of rotation to the whole branch. And so that's why I have to use such a tiny amount of an angle right here to just apply this little bit of bending. And I think that that looks great. In my example file that I have, I ended up just working only on the root group. So if I just select the root group here, you can see that that rotation is very much less because it's not compounded all the way down the branch in that parent child relationship that's created by KineFX. So I'm just going to crank my angle up a little bit. let's just crank it up to 0.2. And then you can kind of see we get we get that behavior back. It's just maybe a little bit more rigid, but I don't know, it seemed like it worked okay for my example that we were doing. But the other thing that I want to do is I kind of want to ramp this off. I want to ramp off the amount of noise that's being applied along the tree. I want to say maybe that the branches that are towards the top of the tree are allowed to be blown a little bit more than branches towards the bottom. So we can just apply a mask to this the way we did before. We actually have a mask that we can use and that one would be the Dist N attribute we created when we're creating this unrolling type of effect before. We have a mask that kind of goes from zero to one as we go from the bottom to the top of the tree. So I'm just going to introduce another ramp where we can control that inside of our rig attribute wrangle right here where we apply the the noise. So I'm going to actually say apply wind. That's a better descriptor here for what this does. And let's go up here and create a new, we'll create a new float ramp. And it's going to be a ch ramp type called ramp. I like to name my ramps ramp. And it's funny because sometimes I'll have an attribute called ramp, and then I'll ramp that one. I'll have I'll have a line of vex that has ramp equals channel ramp ramp at ramp. And it just, it It just says ramp like 900 times, but we're not using that this time. We're just going to be doing a dist underscore n. So that was that distance attribute that we were just visualizing there and a knee date and a semicolon here. And there we go. So now if we look at this, we can see that it's actually kind of doing the opposite of what we want because our, if we look at our visualizer here on dist n, you can see that our higher values are red. So we get a higher value at the base of the trunk than we do at the top. And I also need to create this. Let's actually create the ramp as well. So you can see that it's actually rotating things towards the bottom of the tree, more than the top of the tree. So I'm just gonna reverse this ramp. And then we can actually see that the leaves, oh, you know what I also have to do is I have to multiply this angle magnitude by that ramp as well. So let's just bring this down here and say times ramp. And now you'll be able to see that the top branches are kind of rustling a little bit more than the bottom ones. And so that's just sort of a nice little approximate wind animation for our branches. Cool. Is this visible enough to everybody? Do I have a good enough size on the tech support here? Yes. Great. Awesome. Cool. So now that we've done this, let's see what our actual bone to form is looking like. I'm just going to go back down here and highlight the bone to form. And it's going to have to cook through a little bit. I might actually cache this out really quickly to be able to see what we're doing without having to wait for it to recook during the session. So once this passes through our branches, I'm just going to throw a file cache node right after our capture right here just so that we just just so we don't have to recapture anything. At least as frequently. So let me just before we address how wrong our tree looks now I'm going to just go up here and throw out a file cache. I'm just going to put that right here and let's select it I'm just going to call this capture cache. And I'm going to switch to explicit mode and single frame, and I'm just going to remove dollar sign F from the mix here and save to disk. All right, cool. So now that that's cash, it's loading from disk. And if we look at our bone deform, you can see that everything is all mixed up now. We've got our trees just like totally messed up. And the reason for this is because we are not providing rest transform and an updated transform in a way that is meaningful for bone deform to maintain the shape of this tree. So our rest transforms, if we visualize our transforms for our rest tree, you can see we've got these crazy transforms that are pointed all sorts of different places. And then when we come down to our animation, which we're using to update, our rest transforms are basically oriented along the world. And so when bone deform sees this, it thinks we're trying to to actually rotate all of our branches and all the skin of all of our geometry by those little transform offsets that we did. So the thing that we need to do is we need to compensate for these changes that we made and supply a better, a transform output from our animation that actually is indicative of the trend, you know, it's it is an updated version of the transform that we're providing on our input. And this kind of gets a little bit tricky. But basically, what what we're going to do is we're going to, we're going to calculate what the offset is between our, between our messed up transforms here and the, you know, animated transforms at the end. So the way I actually want to do this if we go up here to rig doctor you can see that rig doctor is actually supplying us some nice transforms we said here to reorient towards child, I actually like the way that this works it seems predictable to me, these are the transforms that I would like to use as our rest state. And since we're making these updates, we can just update once for our branch animation and then update again for our wind animation. And so I'm going to actually bring this fix axes step. I'm just going to bring this down below. So here what we're doing is our rest at transforms that we're going to be providing are going to be these nice clean transforms to get out of the rig, Dr. We just need to make sure that what we're applying in our animation right here is an animated version of these rest vectors. So let me just pop out the, I'm just going to open up EpicPen for a second here and kind of diagram out what it is that we're trying to do. So we're going to see up here, we're going to, let me just get my, let me get my little controller over here, and I'm going to select the yellow color, Let's do that. Let's say, okay, so initially what we're getting, let's suppose this is the matrix we're getting out of our rig attribute wrangle. We just have this nice normal matrix, whatever it is. It doesn't matter really where it is oriented, but this is going to be from rig attribute wrangle. So rig, or sorry, rig doctor, rig doctor. So rig doctor is giving us this. What we have done is we modified our axes. So we modify. And we'll just say that our new matrix that we have is something that is kind of oriented in a different way. We know we just picked a different orientation so that we could continue to rotate around the x-axis. Let's say that this is the x-axis in this example right here. And so then what we did was, you know, we know that we're going to be be rotating this around our x-axis, like so. Got that right here. We know that we're going to be rotating around this axis. So we end up doing that rotation. And then the resulting matrix that we end up with, the resulting coordinate system we're left with, is something, let's say, we rotated around this way. So we end up getting a vector that looks like this, maybe. And the x-axis is still sort of aligned like so, because we just did that rotation around here. But all of these, all of these, these are the Y and Z vector kind of rotated around this plane right here. So we've done this, we've done this modification and then we've animated it. So this is the animation. And what we need to do is compute the offset because what we wanna do is we want to rotate this vector right here, the same along the same axis that we did right here. We're going to apply the same difference between this matrix and this matrix to this matrix. And the way that we do that, and this is the part that gets kind of tricky. I wish there was a node that did this or just a little bit easier way to describe like how I'm making this correction right here. But essentially what I'm going to do is I'm going to call this initial matrix our T0, our transform zero matrix. This updated animation matrix is going to be T1, is going to be the updated animation matrix. And then in order to update our, you know, we'll call this one, this is three at transform. Let's call it three at transform. Like so. And so in order to update this, we need to invert one and multiply by the other. So essentially we will wind up with a new vector, or sorry, a new matrix, like so, that has been, you know, say rotated a little bit so that it now has been rotated around this same axis that we had provided like so. So we've done, we've now taken it out of its initial space that we have right here and rotated it in this space that we did right there. So the way that we do that was we can say that our new matrix, so our M new is equal to R, M old, which is this one right here, M old times the inversion. So we have an invert function. So we're going to invert t0 and multiply by t1. So I know that that's kind of a lot, but basically what it is is it's just allowing us to look up a rest in an updated transform and just apply that same animation to our original transform so that it doesn't confuse our bone deform and give us that messed up geo. So let's apply this in a wrangle over here. So what I want to do is throw in our wrangle and we're going to be working on these right here. What I want to do is take in my rest right here. So initially what I thought was maybe we could use the rig doc, like maybe recalculating our transforms using the rig doctor would help us, but I did find that there were, because it is computing the transform fresh using a rig doctor down here, it would actually not really supply us the type of, it wouldn't really supply us the like as accurate of a result as if we just did it ourselves. So like a lot of things in Houdini, if the tool that they made isn't doing exactly what you were hoping it would, there probably is a way around it. So what I did here was we are going to grab our rest. So these are our rest transforms. These are the ones that we want to update. Then we want to update them by the difference between these transforms and these finally animated transforms, which are like so in our setup right here. So if I grab this apply animation trunk, sorry, the fix axis, so this is our new kind of rest for our correction here, and this one is the update. We put that in here. And then in this node, you can see we're sliding, we're not getting sort of, we're not really getting any, any real like updated behavior. We just need to extract those matrices. So let's use the point function to grab those. We're going to say matrix T0. So the first matrix is going to be what's coming in the second input right here. So So that's the fixed axes. That's going to be 0.1. We're grabbing the transform attribute. And we're doing it for every PT9. We got that. And then matrix two, we're just going to copy that line, go on to the second line, and paste it. And this one is going to be matrix T1 is equal to the incoming geo from the third input, so geo2. And then what we want to do is just fix our transform by doing that and doing the inversion that we had shown just a second ago. Did I close epic pen? I think I might have closed it. Nope, here it is. There we go. We're just gonna do this. Basically we're saying our current transform times equals invert t0 times t1. So we just say three at transform. 3-0. 3-0 transform which already exists on our geos, we can just do times equals, invert, t-0, and multiply by t-1. And see, that causes this to kind of get upset, let's see why. cast from matrix to matrix three. Okay. I didn't set up these, I didn't declare these correctly. These are supposed to be matrix threes, not matrix fours. So now you can see after we did that, you can actually see that all of our transforms stay in place, but they're inheriting that rotation that we get from that initial animation that we're doing on our geometry here. So that's kind of coming through. And then, so now if I were to bring this back, we're just going to copy this transform back onto our, onto our jail over here. So we're just going to use a attribute copy. And wire that in here. And we're just going to copy the transform attribute that we had created off to the right and copy it back onto our branches. So if I ignore wind right now, you can see that our rest geometry looks like this, and down here, our updated animation looks like so. And so we've bypassed essentially this messed up axis that we created here to just create a modified version of our original axis. And so when we turn on bone deform and we look at it, you can see that everything's looking good. this transform copy this copy off this attribute copy off, you can see everything's messed up, we turned it on, and it kind of fixes everything because it's getting a more like a more consistent transform. The only other thing we need to do is if we turn on our wind. It's not 100% apparent that that's happening right now if I really crank our wind will find that we're having the same problem here so I'm just going to crank that up pretty high and you can see that. things are starting to kind of fold in on themselves. So we just need to apply this correction again right here where we create our new axes. So this is create wind direction. So when we create our new axes and we update the animation based off of that axis, we just need to do this correction one more time. So I'm gonna alter drag. This is gonna be called the, this is gonna be the compensate. Compensate initial transform. And then this one is going to be Compensate Wind Transform. And all we have to do here is just change what wires in but the same functions would work. So I'm going to take the output of our previous compensation note and wire it into the first input. We're going to take the second input is going to go to the create wind direction and the third input is going to go to the apply wind animation. And then instead of copying this transform attribute back, we're just gonna copy this one back. And now we should have nicely mangled branches that don't look like they're folding inside out and stuff like that. So everything has been corrected there by those two nodes. And that was the part where I was hoping that there was an easier way to do it. Like that Kinefx probably maybe even has a node that can do that, but that's sort of what that was all about. So now that we've got our animation here, you can see our tree kind of grows and then our wind starts becoming applied to it. I think I still have, I may still, yeah, I still have our wind value cranked way too high. Let's just bring the angle back to 0.2. Yeah, and we can kind of just take a look at that. Nice tree geometry being blown around by the branch animation that we just fixed. So that's working nicely. And the next thing that I'd like to do is jump into getting the leaves to do their animation. So the leaves is quite a different situation. I mean, depending on the size of the leaves, if you have long leaves, I think Deb said last week that with the palm tree leaves, it almost looked like they could behave more like branches. That might work. That might actually work. Some leaves that are really long, You may want to actually, you know, kind of treat them as branches and to form them along this way with the noise, maybe applying a different noise to them specifically, but, you know, with groups, we can, you know, choose which branches we want to have this wind taking effect in different ways and stuff like that. But in our example, we're doing packed primitives. So we've got our leaves here. And what I was thinking is, you know, because we have leaves and because we have packed primitives that are coming out of here, we chose pack an instance here. we could actually apply a little bit of rotation to the leaves. I was looking at, when I was looking at leaves, I just thought from a midrange distance, they all just look like they're oscillating back and forth. So I was thinking that we could apply something like that by just modifying the rotation of these leaves. Is it all right with everybody if I just take a moment, just a quick short break? Sure. Yeah, of course. All right, one second. I will be right back. you All right, I'm back. Is everybody able to still see my screen and everything correctly? Yeah. Cool. Cool. Yeah, I'm seeing the comments in the chat about talking about the matrix math a little bit more. I agree. I think that the concepts are so difficult to grasp sometimes. And I don't fully have them myself, but sometimes I do find myself opening up Excel spreadsheets to try and figure out what Houdini is doing under the hood. Because with these transforms, You're multiplying a vector, which is a position vector. Sometimes you're multiplying position vectors by four by four transform matrices. And it doesn't make sense because the math that you were taught in high school about matrix multiplication and stuff like that, you wouldn't be able to multiply a vector three by a four by four matrix. They just don't line up correctly. There aren't the right number of dimensions on each one to be able to kind of deal with that correctly. What I did find is it looks like when we do multiply a position by a four by four matrix, it's sort of taking the position vector and dropping it into that bottom line of a matrix and then multiplying two four by four matrices together. It is rather confusing, but one of the ways I do think about it is kind of like when we invert one matrix and multiply into another, it's almost sort of like calculating a percentage or like, you know, almost like it's almost like calculating a percentage where you would say, you know, if I want to know what 60% of 700 is, I'm going to take 60 divided by 100 and multiply that by 700. So it's essentially like you're inverting to determine a percentage and then multiplying that by multiplying that 700 number to figure out what 60% of 700 is in the same way when we're doing this invert by t0 and multiply by t1. In my head, it's what we're doing is we're almost saying, okay, well, we want to get a percentage offset from this one to this one, and it just so happens to be that using a invert and then multiplying it by the inversion is almost like, I mean, almost like an analogy for dividing and then multiplying by the result we want to achieve. That's not exactly how it works, but that's sort of kind of how I deal with it inside of of my head is using one to invert our self out of one space and then multiply into another. I know that it takes a little bit of pondering, and I don't even know if I fully have that explanation correct, but that's sort of one of the ways I like to think about it when I'm working with this kind of stuff. So over here, when we're working with our packed leaves, what I was thinking We can do a rotation on these leaves. Just give it an oscillation and a rotation. So the way we're going to do that is we're going to modify the prim intrinsics. So like we had over here, we've got transforms and all that stuff. We've got our local transform and everything is kind of provided to us here in our attributes. We can modify those directly. Here on our tree leaves that come out of here, if we look, we see we don't really get any transform attributes here. If I open up an attribute spreadsheet, I'm just going to do that by over here with my mouse on the left over the viewport. I'm going to say alt right bracket, split that in half. And then right here, I'm going to just right click and say inspectors geometry spreadsheet. Over here, we're getting packed primitives out. If we go to the primitives tab and we just hide, let's say hide all attributes, but under intrinsics, we have these, if we say show all intrinsics, we have all these intrinsic attributes that are more or less hidden inside of our geometry that we can extract, modify and put back on our geometry and it's gonna update its rotations and positions, et cetera. So I'm gonna just hide all these real quick. What do we have? We've got a pivot and we've got a transform. And these are really the main attributes that we need in order to be modifying our leaves. And we can see here that if we can just pull this out, modify it and update it, then we can do effectively a nice little rotation on our leaves. So let's just set up the very basic version of that. I'm gonna go down here after the capture proximity. So I'm just gonna bring the capture proximity up above. The reason why I wanna do this after the capture proximity is because I don't wanna introduce a time dependency. We're gonna be feeding noise over here at some point using an attribute transfer. And I don't want to be feeding that noise over or making modifications upstream that are gonna be animated and cause this capture to have to reoccur on a frame by frame basis. It'll really slow down our setup. And that's also why we applied our noise right here after our rest right here because the capturing process that's happening down here. This little green clock that appears on our nodes is where a time dependency has been introduced. You can see that we're managing that by making sure that this time dependency is not happening before the capture, keeping it off to the side right here. So we're gonna do the same over here. I'm gonna just create a node. And because we're working with, we're gonna create a wrangle, so wrangle. And because we're working with prim intranetx, we're gonna set this to a primitive wrangle. Say primitives. And I wanna do a rotation here. and I want to grab the prim intrinsic and rotate it. So there's a function that allows us to extract prim intrinsic and we're going to store that transform in a local variable for the time being. So it's a matrix three M and that's going to be, we're going to use the prim intrinsic function. So prim intrinsic and we open that and you can see that it's looking for the geometry, the intrinsic name and the primitive number when we want to process. Very easy, just the first input. So input zero and transform and then at primdom. And so that's gonna just bring our transform sort of into this wrangle so that we can work with it. And so the next thing I wanna do is do rotation on it. So we're just gonna say rotate M by our angle and axis as we've been doing axis. So, and let's just create an angle and an axis right now. say float angle equals, let's say, right now let's actually, let's say hf angle to create a little slider for it. And then vector axis, we'll just hard code this one to the x axis right now. So 1, 0, 0. And if I turn on the slider and crank this angle, it's not doing anything yet because we've We've got this matrix, we're manipulating the matrix, but we need to write it back into a perm intrinsic warmer done. So we kind of open up the perm intrinsic here, make adjustments, and then rewrite it back out. So right here, the last line is we're going to say set perm intrinsic. And this function is gonna take the five arguments that a lot of the set attribute set group functions do, which is we give it our geometry handle, we tell the name of the attribute that we want to be setting. And we tell it for which primnum we want to be setting. We're going to use our currently processed primnum. And we're going to give it a value, which in our case is M. We just created this matrix, modified it, and we're going to feed that M back in there. And we're going to use the set method. So on the currently processed geometry, geometry zero, we're going to send in transform. We're going to do it for every primnum. And we're going to give it a value of M, that matrix we created, and we're going to use the set method here, like so. And so now you can see that I've got this angle slider right here that is rotating all of our leaves all at once. You know, to kind of make this a little bit easier to see, what I'm gonna do is kind of just come down here and maybe give myself a little bit of room, but I'm going to, let's go back to the camera view just so I can kind of have a nice frame. I'm gonna grab maybe just a couple of leaves over here. So I'm just gonna grab, I'm gonna zoom in over here and grab maybe just two leaves like so, and hit the delete key. And then let's just invert. So I'm gonna say delete none selected. So we can just focus on what's happening with these two leaves to make things a little bit, just a little less chaotic for ourselves. And so now, yeah, we can see here that we've got angle. Now, if I were to type in like a sine function, say sine of at frame times 30, this should give us a little bit of an oscillation in our leaves. You can kind of see them doing that little rotation. Like so. There are a few things that are obviously off about this. First off, they're not rotating around the stem. They're sort of rotating around their, they're sort of rotating around their centroid. And the reason for this is because when the packing occurs inside of this tree leaf generator, it has a, there's a copy of points happening. And the copy of points is packing up the geo and choosing the centroid of the geo as its origin. If we hop in here, you see this big old thing right here. I'm just gonna control F to find a copy to points. And I'll just grab this first copy to points and here we can see what's happening here. This copy to points has a pack an instance turned on and the pivot location is centroid. What we could do is unlock this node and change the pivot location to something like the origin and that would actually fix it for us. But because I didn't want to modify the tree tools until the very end, I just kind of left this and said, maybe we can just update our pivot on our own. So just sort of illustrate where the pivot actually is. We want our pivot. This is our single leaf geometry that we're feeding in. We want our pivot to be right here at the origin. But in our case, the pivot is coming in at the centroid of this geometry. If I say extract centroid, and I wire this into our tree geometry and highlight it. And we'll say, we'll go over detail. And I'm just gonna hit the D key and visualize a larger point size and template this. You can see that that point is right in the middle of our leaf. This is what our pivot is currently set as. We wanna update this on our leaves after they've already sort of been placed. So when we're down here, if I zoom back into our other two leaves, we wanna move this pivot over here. And so there's just another little correction that we can do here to do that. I'm gonna do this again in another wrangle. So we're gonna throw down another wrangle above here. And we're gonna call this one offset pivot. And this one is going to be, we'll call this apply, this will say apply or say leaf animation. You say this is where a leaf animation is occurring. And we just want to offset this pivot. So I'm gonna template the rest here so that we can kind of see where our branches are because it's gonna illustrate another problem that kind of happens. So we can modify the prim intrinsic pivot that we have right here that I'm, I think I have it showing right here. You can see in the geometry spreadsheet we've got intrinsic pivot visible right here. We can modify that directly by using the set prim intrinsic and setting that pivot back to zero. You can see we've got the same pivot on both of these geos. Just let's just hide all intrinsics and that shop material path and just take a look at our pivot. We've got the same pivot for each one of our geos, but we just want that to be set to the origin. So we're going to say set perm intrinsic again here, and we're setting it for the zeroth geometry. The attribute we're setting is pivot, and we're setting it for at primnum. And we're doing, we're setting it just straight up to the origin. So zero, zero, zero vector like so. And we're using this that method. And when I do that, you can see that our leaves jump out a little bit. But if I highlight our leaf animation, you can see that they're, they're actually rotating around the correct, the, at least from the correct pivot location. The axis hasn't been corrected yet, but it looks like they're rotated around the right location. but we need to get these leaves back to where they were. So to do that, we need to kind of compute the difference between whatever position it was we started in and this new updated position that we received from the pivot offset. So we're gonna create a new vector. And this vector is going to store what our old pivot location was. So vector old pivot. And we're gonna set that equal to the prim and transit. we're going to fetch that pivot that we had before we modified it. So we're going to say, perm intrinsic, we're looking for the perm intrinsic on the zeroth input. We're looking for the pivot attribute. And we're looking for it for every at PT number. And in fact, I am doing this in points mode, and that's kind of important for this step, because it seems like it wants to work better when we're working in points mode for this. So here on this set, prim intrinsic, I could use prim num and at PT num interchangeably. I could actually put a PT num down here and everything should still continue to work. So you can see on our leaf animation, we're still are rotating around that correct pivot location. Now we just need to update this. And the way we do that is we take the offset of the old pivot and the new pivot, the new pivot being zero comma zero comma zero, the origin. So essentially we're taking the origin minus our old pivot. And then we are using that as the multiplier on our full transform. So we can update our position by saying that P equals, you know, the difference between the old pivot and the new pivot. In this case, since it's zero, we're just gonna be taking the negative of the old pivot. So negative old pivot. And multiplying this by another function, which is getting the packed transform from that print that we're working on, that packed print that we're working on. So get packed transform of zero and epidemi. And I spelled something wrong. I said, transform, we're gonna transform and a bracket at the end here. And that kind of laps our branches or our leaves back to where they're supposed to be. Now, this is something that actually, This is a task that was much more complicated for me in the previous version of this lesson that I was working with. And so thankfully, I was able to clean this offset pivot up into one node. Also, if you do have mops, a handy, you can use mops to do this instead. So I'm just going to grab mops, and we're going to use the mops align node. And I think if I just throw this in here and we switch over to is it set pivot local set the local pivot to 0 0 0 I think we get the same result so yeah mops mops pivot if this if this is if this is confusing for you is I think it might be for me and many other people and you do have mops handy you can just reset that pivot by using the mops node like so so that's pretty easy I'm going to just use I'm going to use this one because it's the way I currently have my setup setup, but Mops is there to help with a lot of this primatrinsic stuff, and this packed primitive manipulation stuff to. And Houdini school I believe has a course coming out on Mops pretty soon with Henry. Grace. All right, so now that we have our leaves sort of animating, what I want to do is introduce our, bring our noise back over here and allow our noise to drive this leaf animation that we are working on right here. So I'm going to use chops to create our oscillation signal that we're going to use to modify our leaf flutter and we're going to use the noise to kind of drive that oscillation value using chops as well. So we're going to need to grab our noise that we're using over here. So I want to grab this right after we apply our contrast. We're just going to do an attribute transfer. So let's just transfer this over here. So attribute transfer. And we can go right after capture proximity. And this is why I listen to the second input. And then and then why this here. And we're going to be grabbing our noise. And so we're getting our noise on our leaves. We can't really, we don't really see that noise on our packed prims, but it's there. If we go over to our points and we say view, let's say, hide all attributes and view noise, you can see our animated noise values are coming in from this stream. And so we wanna use them in a chop network that we're going to allow to kind of drive this oscillation. So I'm going to, let's see here, I'm going to, first off, I'm gonna actually throw it on a switch right here. So I can easily switch between using, showing all of our leaves and just the two test leaves that we're working on right here. So I'm just gonna drop that down here. and wire this in and reverse it and set this to one. So when we're on one on our switch, we're just looking at our two individual leaves here. And the next thing that we want to do is, let's just bring this down a little bit. Right here, we're going to create a new oscillation attribute that we're going to feed back out into our animation right here. So I'm gonna throw down, I'm gonna create a chop net. And this is similar to like, I think I learned this method of creating a chop net off of CGWiki, but basically we're gonna create a null, send it into chops, and then create a channel, a channel SOP to extract those channels out of our CHOP network. So first thing is a null, and we're gonna call this two SOP, or two CHOPs. So, and then we need a channel wrangle. This is gonna be used to fetch our channels from CHOPs, and we need a CHOPnet. This is going to be where all the magic happens for this part. So on our channel wrangle right here, sorry not channel wrangle, just our channel, we're going to be grabbing, let's say we want to do an animated, we want our setup to be animated, and we want to grab our, we want to feed through our noise attribute. So noise is coming through like so. And over here in ChopNet, we create a geometry to fetch those, to fetch those attributes. So geometry right here. And this is also another static one. The attribute scope is going to be noise. And we're gonna feed this back out to another null. Oops, I also need to change my rename scope up here to noise and it needs to be animated. So this is very, this just needs to kind of mimic what we had going on outside. I'm actually going to do the thing where we get the quad view going on here. So I'm going to alt right bracket on this side, alt right bracket on this side. I'm gonna say alt three up here to turn this into a parameter view, alt two down here to turn this into a network view, pin this to one and this to one. One and two and two. And stop in here and over here, let's just go up. right. And then bring this down in this null. I'm going to call this null to be two sops. So you can see here on our channel, we have animated channel scope is noise attribute scope is noise over here to sops we've got our sorry on our geometry we've got animated attribute scope rename scope is noise as well. So that should all be flowing through correctly. And we just look and see what this error is giving us right here saying invalid input chop. Okay, That's because I need to link these up. So over here on our geometry, we want to fetch a sock. That's the one that goes to chops. And then over here, we want to get the result from chops. And that's going to be putting this two sops in all into the chop that we want to be looking up into. And it needs to think a little bit. But then eventually we should be getting that noise and attribute fed back out here. And so now if I, over here by my geometry spreadsheet, I'm just going to click a plus and create a new viewer so we can see our motion effects view. You can see that what's happening is our, our chop network is correctly reading in this noise attribute and giving us the full animation timeline of what this noise attribute that we created way back over here. It's kind of, it's giving us this whole noise attribute as a chart that we can now manipulate and shape the way we would like to. So this whole noise is sort of corresponding to this. I'm just going to hit this button so we can see where our timeline is right now. We can kind of see that, yeah, this is the noise that we created. We got this big blue dip coming through here. And then this big, this really heavy one up here. You can see that that's sort of what these limits are kind of reaching their max and min values based off of this incoming attribute that we're creating. So now that we have this in chops, I just want to do a little bit of shaping. We've got all sorts of tools for shaping this graph. And this is a lot of why I'm only using two leaves right now is because if I turn on all the leaves, this is going to just look like a cluttered mess. There's going to be like thousands of charts all over on top of one another and overlaying one another. And it'll be really hard to see what we're doing. So working on just a couple of leaves right now will make things a little bit easier for us. But so suppose that we wanted to use this noise to now adjust the values of some oscillator that would kind of modulate its frequency based off of the amplitude of this noise that is coming in. We can use, and there's actually a node that is designed just for this, and it's called the oscillator. So the oscillator, well, actually, if I wire this in here and we highlight it, and I'm gonna just, you can see our oscillator has kind of created this much noisier pattern right here. And its base frequency is set to 440, which is actually rather like 440 Hertz, I think is like might be middle C. It's a very much higher tone in the spectrum than we want to work with. We're working with slow fluttering. So I'm going to just bring this base frequency down to something like one. So you can kind of see that we get a nice sine wave here. And that's being determined by this sign. You can choose different waveforms, triangles, ramps, stuff like that. We're just going to use sine. But you can see that the frequency of this sine wave is changing based off of the amplitude of this noise. So that would be like a complicate for a faster flapping as that wind gust is coming through. So if I can actually accentuate this effect by adjusting units per octave, units per octave is actually just like, well, tell us how many, I think it's how many the amount, yeah, it's right here on the tip, the amount the pitch control needs to increase and raise the pitch by one octave. So I think an octave is doubling in frequency, if I remember correctly. So if I crank down the units per octave, you can see that as that noise increases, we're getting a much more drastic change in our frequency here. A value that I thought worked out good for me was actually a 0.5. So I'm just going to leave that at 0.5. You can see that we're getting this nice flutter and that the flutter is increasing as that noise increases. And before we go into doing too much more shaping with this, I just want to get this oscillation that we're creating back out. So essentially, if we wire this in right here and we kind of look at the info on here, you can see that we've got two noise channels coming in, one for each of our leaps. And that noise channel is actually set to this new oscillation that we've created right here. What I would like to do is actually apply some decay to our noise and then refeed it back into the other side of our setup where we are actually doing our branch animation to kind of allow the wind gusts to come, but then have them allow them to die off a little bit slower. And so I'm actually going to want to output the oscillation channels and the noise channels at the same time. So we're So we're gonna be fetching two, we're gonna be creating basically a new attribute in here and outputting that oscillation in addition to what we already had. So to do that, we'll just use a rename. I'm just gonna rename this, oscillation that's coming out. And we're just going to wire that out. And instead of renaming, you can see we've got from star to blank because we have these noise attributes here. And when we have all of our leaves in here, we're gonna have noise one, two, three, all the way up to thousands of leaves, however many leaves we have. And we can just use a wild card to do this renaming. So we're gonna rename every channel that has noise in it, and then we wild card it. So every, you know, it doesn't matter what number comes after noise, it's gonna be replaced. We're gonna rename from noise to ask. And we just put a little star there to help as well. And if I look at this, you can see we've got ask zero and ask one now, ask is for oscillator. Now if we merge, and we merge in our original setup right here, and we look at our info, you can see we're getting out OSC0 and OSC1 and noise0 and noise1. And these are all coming out and going over to our setup over here. So now if I look at our channel, channel, we need to actually specify that we're gonna be pulling out the oscillation value here because we haven't scoped it here. So let's just write that in, ask. And the attribute scope is ask. So we're gonna be rewriting the channels called ask into an attribute called ask. And it gets upset with this because we don't have an ask attribute already existing on our geometry. So the way I fix this is I just create an attribute, create right above. And I'm just gonna initialize the ask attribute to zero. I don't really, it doesn't, you know, it just needs to exist on the geo in order for it to be picked up out of traps. But now if I move back over to the geometry spreadsheet, you can see we get our noise values coming through animated and our OSC values are updating, they're fluctuating between negative one and one. And so now down on our leaf animation, I could go in here and grab our, let's say we want to, I just wanna see what I, I think that, Yeah, what I ended up doing here is just multiplying this angle that we create here by that ask attribute that we create. So let's say angle times f at ask. So, now we don't need this angle sign function that we're doing down here. I'm just going to control shift. Click that to reset it and we'll just set it to an angle about the amplitude. This is really more of an amplitude now. In fact, I mean I could change that but I'll just leave it at an angle right now. And then let's change it. Let's go up here. I'm gonna say edit parameter interface, grab angle, change it to amp and call this amplitude. Apply an accept. And then up here, I'm gonna say amplitude. Amp. So now if I zoom in to our leaves, where are they right here? We should be getting that rotation. And the reason why we're not getting any rotation, you can see the attributes are here, But right now we're working on primitives. So we just need to promote this oscillation attribute to a primitive. So say attributePrimote. And we're gonna promote the ask attribute to primitive. And now if we look at our leaf animation, is it doing it? I'm not seeing it. Let's see here. On ask, that's coming through. I think your amplitude still has zero. There you go. Thank you. Set that to 0.5. And you can see our leaves are oscillating based off of that. And you can see the speed of that oscillation is increasing as that noise value gets adjusted. So if I look at our motion effect view, you can kind of view that noise is increasing, and then they start fluttering faster. and so on and so forth. This is stuttering quite a bit and I'm not quite sure why. I'm just gonna look at my CPU right now. Looks like Zoom's using a lot of resources. I'm not sure. Either way, it's not unbearable, but you can kind of see that that's sort of the effect that this is having here. But what I wanna do is actually kind of make some adjustments to this. I don't, I not only want the frequency to modulate based off of that noise value, I want the amplitude as well. So I'm going to kind of let's do a little bit of work to smooth out our noise that's coming in. So I'm just going to look at this. Let's see, we've got these sort of like hard caps on our noise value that we can kind of filter off. So I'm just going to throw in a filter right here. And we'll just wire that in. And if I grab this filter and show that, let me just pick a more visible color, like yellow. You see that we can actually kind of shape this. We can shape this so that these, we don't get these hard edges where it kind of slams into its max and min values. We can kind of like roll those off a little bit. So I'm just going to, one second, check. I wanna check and see what I ended up setting this to because these values are really touchy. But this overall effect working in chops is pretty touchy. I just wanna make sure that I'm being consistent with my example file. So yeah, I think I set this to about a value of about 0.6, something like that. Seem to smooth out that noise nicely. So the other thing that we could do is we could actually kind of use this noise amount to multiply against our oscillation value to change the amplitude of our oscillation value as well as our frequency. So we can use a math note for that. And if I throw this math node down, we can bring in our noise into the second input. The second here, and then we can choose the operation as combined chops we can set to multiply. And here you can see that the actual amplitude is now fit under the envelope of our previous noise that we're feeding through here, which is kind of nice. So we can kind of adjust how intensely these leaves are flapping around based off of this amplitude. But it's a little bit intense. If we're watching this, we can kind of see that our leaf animation really dies off quite bit, it becomes almost still during these little valleys in our animation. So I want to actually just kind of refit this noise that we're supplying. I just want to refit that a little bit. And I also want to make it so that this noise kind of dies off a little bit slower. So we can do a couple things. First thing I'm going to do is I'm going to kind of lag. I'm going to put a lag here. So or sorry, I'm going to do another math node. And I'm just going to use this math node as a fit range to modify how low this amplitude is allowed to go. So let's go over to the range column here and I'm just going to set the, we know it's ranging from zero to one, that's good because everything's been normalized and we've done a good job of maintaining things on a zero to one scale. I'm just going to set this to point four. You can see that now that just brings the, you know, that brings the floor up of how low this noise level can get. The other thing I wanted to do is just smooth this out a little bit. So I'm gonna throw in a lag. And what the lag is gonna do is it's actually gonna allow these animations to kind of die off. When I see a gust of wind, I feel like the gust comes on really quickly, but then it takes a little while for it to decay off. It doesn't just, the slope doesn't just drop like this. So I wanna allow for that wind to accelerate very fast, but I don't want it to be able to die off as fast. So we can solve this with a lag. So I'm just gonna grab this lag right here and we're gonna look at, let's look at our, let's combine our previous filter and our current lag. So I'm doing this by clicking these on and off. Every time you click one of these, it changes your display flag and adds it to your setup. But if you control click on one of these, you can just see one of your chops graphs at a time. So I'm gonna just bring in our previous one and our current lag. And we're just going to kind of look at what effect we have on this. We want to have like a nice, kind of like a more of a slope on our onset of our gust and have it decay longer. We can just adjust this lag out value. Do you see if I adjust that? It actually makes it decay a lot slower. So I'll set this to something like 0.5. And then we'll actually, sorry, I'm going to set this something like 5. And then what we'll do is on the onset, on the left-hand side, we're actually gonna just increase this to a value of about 0.5. So you can see that we've sort of like taken our noise situation and allowed like it to die off slowly, and then a gust happens and then it dies off slowly, and another gust happens and it kind of just dies off slowly like that. So we can actually use this now as the, this will now be what is driving our oscillation we look at it and kind of see it fit underneath this new kind of like lagged out noise that we've created here. And so now if we kind of go and look at it, it's sort of hard to see this right now when we're only looking at our two leaves. And so what I'd like to do is actually maybe just grab a few more leaves. Oops, how did I get up there? Let's go up to this. this. If we're looking at our two leaves, I kind of want to see a few more leaves at this point. So let's just grab, let's maybe go up to here where we created our, where we actually blasted out our branches. I'm just going to create a few, I'm just going to grab a few more. So instead of just two, I might go over to this section nearby and just hit the S key and select a few leaves and hit the delete key. And we'll just use this as I'm going to hit the escape key and just wire this so that it's another input on our switch. This just makes it a little bit easier to kind of art direct the little tiny chunks of leaves instead of dealing with the whole thing. Now this is trying to recalculate this motion of X view. I'm just going to turn that off first. I'm just going to move away from the geometry spreadsheet, move away from the motion of X view to the geometry spreadsheet so that it doesn't like try and work on that graph just yet. And I highlight this, delete non-selected. You can see we've got our leaves here. And so now if I go down to our leaf animation, we should see all of these leaves sort of behaving in unison. And did I, yeah, I got to switch my switch, switch to switch input two. And it does take a little bit to cook through the, through the chop net. And that's just something you kind of have to wait for, because it just needs to, it needs to like, you know, basically cook through the entire timeline, every time it does it, I'm getting a error here. Let's see channel noise zero not found. Hmm. It looks like this here. This is a it's saying it's not finding the noise attribute but I see that we do have a noise. We have noise to here. Not sure what's going on there. Let me, let's, let's try this. Let's just get rid of a couple of these leaves and see if it recooks correctly. No. Okay, let me just try switching this back to our two leaf setup and see if it likes that one because it was just working a moment ago. And it seems like it likes that I'm not exactly sure why it's going to be okay with. I'm not exactly sure why it's going to be okay with our, our two leaf setup here but not with a larger trunk let's see if just switching this back is going to make it work out okay. And that is going to be a crash. I'm pretty sure. Yeah, for sure. So I have another copy of Fudini open because I thought this would happen. This is something that kind of happens when you're working in shops a little bit as you get it does need some love. It's an older system. It's very cool, but it does. It could use some updates and some stability. So I'm going to open up the project fire we're just done. So let's go to, let's go here and I think this is the lesson recording file today and open that up. Hopefully whatever was going on with that crash was what was responsible for that channel stop not working correctly. I'm hoping that that's the case because I haven't run into that one before. But you do kind of run into little weirdnesses with chops every from time to time. I think it was because it is working for me right now. Is it cool. Yeah, yeah, Nice. And my setup is just cooking real quick here. So. All right, so I've got my little chunk of leaves here and we're just going to turn on the leaf animation. Oh, and everything is moving so much smoother. So whatever was going on in Houdini now when I click play, it's all everything is just playing back nice and nice and nice and fast for us. Cool. So now that we've kind of got that going on, let's just kind of see what it's doing along with our animated branches as well. So I'm gonna go down to the bone deformer here and we're going to, I'm gonna just template the animated skeleton underneath so we can kind of observe how these leaves look like they're behaving along with the motion of our tree. There's a couple of things we need to fix. First off, all the leaves are sort of animating in unison with one another. I'm going to just disable the growth animation for it now. I'm just going to grab those four nodes and disable them. So all the leaves are flapping in unison. And they start flapping as our tree takes that gust. That's nice. But they're also all oscillating around the same axis. So we'd set that x-axis that they're all rotating around. You can see that these leaves at the end here, if I just go back over here, these leaves all sort of rotating around the world x axis and we kind of want to get them to rotate around their local x axis. So let's actually just make a little bit of an adjustment to our leaf animation here. So where we're saying vector axis, we're just going to use that matrix notation that we did before. So we've got our matrix, and we're just going to set our axis equal to m set m dot m dot xx m dot x y m dot x z. That's the battleship method of locating your vector values out of a a matrix. And now if we play them, you can see that those leaves are actually flapping kind of, you know, perpendicular to their stem. So if we kind of look at it, sorry, Mark, can you hit control plus on your? Oh, yeah, the new version of the new copy of Houdini. Yeah, one sec, control plus plus plus plus. There we go. That better? So I think that's great. Cool. So yeah, I just did this, what I like to call the battleship method of whatever, finding the components of the matrix that we want to extract a vector from. So our x-axis is now kind of, our x-axis from that matrix is now what we're gonna be using. And you can see that these leaves are now flapping up and down about the axis perpendicular to their stem. So we kind of fixed that. The other thing we want to fix is that these leaves all appear to kind of be flapping at the same time. I mean, it might not be 100% obvious, but you know when you get really close, you can kind of see like it looks like clusters of leaves are all kind of flapping at the same time. And so we can use a little offsetting in in our trap net to kind of combat that a little bit. So I'm going to switch back to our I'm going to switch back to our quad view as quickly as I can. So I'm just going to click this and I'm going to do alt right bracket here. Alt right bracket here. And then this is going to be two and three up here. I'm going to pin one, two. Actually, this is two and this is one and this is two. And I'm just going to dive into the chopper here. I also want my geometry spreadsheet back up and my motion effects view. So I'm going to alt-right bracket this and we're going to choose the motion effects view and the geometry spreadsheet. So where's that? Inspectors geometry spreadsheet. So over here on our motion effects view, you can see we get this nice busy graph of all these data points overlaid over one another. And what we want to do is actually just do a little bit of an offset. So these noises are not just like right on top of each other and mimicking one another, but we actually have a little bit of a variation between them. So I'm going to just bring this down and I'm doing this right after the, oh, I can do it right before the math note, I suppose, doesn't really, actually might matter. I'd like to, if we do this before the math node, then the modulation we're doing with this amplitude is going to not be affected by our time shift. So that'll kind of to keep things a little bit more organized. But I just throw down a shift here. So the shift, I wire that in like so. And then we're going to just use this scroll offset will allow us to time shift all of these channels. And we can do it on a per channel basis by just doing a random variable and seeding it with the channel number that we're on. So we just do that with $rand, $c is the special little local variable we got to remember to do that. So if I do that and click, you can see it offsets all those graphs at once. And if I zoom into our, if I zoom into our, see where we, by zoom into our leaf animation, you can see that now all of those leaf animations look like they are very much offset from one another. And it just, it just enough to sell the fact that they're all like fluttering independently of one another like so. Cool. So what you can see those at the beginning, they're all kind of frozen a little bit. And we're probably not going to see that because we're going to be animating our tree on during this first couple frames. But if you did want to kind of, you know, if you did want to adjust that, you could throw down like a extend. And extend works just kind of like cycle post offset functions do in 3D software where you can, you know, make the left behavior of your graph kind of cycle based off of what you already had. And you might see a little bit of a jump in your animation here, but honestly, we're not gonna see it, but you could, if you did see like kind of an obnoxious little like glitch in your animation, the first couple of frames, you could smooth that out if you wanted to, but I'm just gonna leave it like that for right now. So we'll just have it set to cycle. Other options you could use, I'm just gonna pin this. I keep getting popped into my, it keeps popping me out to my grid, my psych view, and I don't want that. So I'm just gonna pin my leaf animation view over here. So we've got this going on. And the next thing I wanted to do is, let's just take a look at what all of this sort of looks like with our leaf or a branch animation that we have going on as well. So I'm gonna kind of merge these two together. And let's actually switch back to, no, yeah, we'll just continue looking at this smaller chunk of leaves for right now and just kind of back out. And I'm going to just run a little bit of a flip book. So I'm just gonna bring this down and run a flip book. So you can see, I'm just kind of looping it as it plays back. You can see that our leaves have like a little bit of a flutter. And then around frame like, around frame 96, we're gonna get like a larger gust that comes through and is gonna really pick up the amplitude on that leaf flutter. You can see it's coming. It's starting to build up to it. And we should start to see a big gust come through. And what's happening is this is the next thing that I kind of wanna solve for is that that big gust comes through. And it causes these leaves to flutter, but the leaf flutter kind of happens after the big gust occurs. And when I was looking at these kinds of things, it actually seems like that leaf gust is sort of, the leaf flutter kind of anticipates the gusts that really pushes the branches. I think that the leaves start fluttering a little bit before the branches start doing their thing. So I think to kind of make this feel a little bit more consistent, we could provide a little bit of a time offset the noise and feed that back over to the branch side to allow the branches to let the leaves flutter a little bit before they take off and do their crazy bending around. So let's just, I'm going to just close down this play blast that we have right here and let's just do a little bit of some modifications on the right hand side here where we're messing with our noise. We haven't messed with our noise at all, but what I want to do here is actually kind of get another lag that's similar to what we had going on on the other side. So I'm going to let's just hop up here. I'm going to switch to input two so that we're back to the two leaves setup. And we'll just take a look at those charts. It's just easier to see those graphs a little bit better when there's only a couple on top of each other. So if we go into our chop net, we could view our our lag of our noise. So we've got our noise coming right here. I might just allow the leaf flex, the branch lag to kind of come back down a little bit quicker. So let's just, this is gonna be the new noise that we feed over to our branch. Just gonna dial this back down to a value of three. So those kind of, we had our leaves, our leaves flutter kind of dies off a little bit slower then the branches flexing will. So we're gonna kind of do that. We're gonna modify that lag a little bit. And then the next thing I wanna do is shift it. So let's throw down a shift. And I like to look at these two with each other. So we've got our OSC right here. And I'll just grab, let's go ahead and turn off these two and look at our shift. So I want to push this noise that we're creating back in time a little bit. I can just use the scroll offset. So if I push this scroll offset off to the right, it will basically, let's just set it off to a value of about 0.5. This will allow the amplitude to pick up and the frequency to start picking up in our leaves before the bending of our branches occurs. You can kind of see that it's just trailing behind it a little bit. And then what I might do is, if there is any kind of off value over here, I'm just gonna throw down another one of these extends to kind of just make sure that everything's cool here. Now, this extend is set to cycle. I'm just gonna set it to mirror just so that it kind of keeps things a little bit more smoother on that extension point. And then we'll just merge this back in instead. So now we have this updated noise value. We need to apply it back to our branches out here in SOPs. So I'm gonna just bring these over. Let's bring this one up. So we've got this stuff coming out of the channel. We just need to, I'm just going to attribute transfer the noise back over here before we do the wind animation. So let's just run an attribute transfer. Over here, I'll just put it above fixed axes, let's say. And so our noise is kind of going to take a detour, come and do all this stuff and then come back and get updated right here. So if I, and this does look a little bit sloppy, I guess if I grab all these and all these, except for those and kind of bring this all down, that might be a little bit, I don't know, upward, streams that go upwards kind of bother me sometimes. So I might make space for it like this. I don't know, it all ends up working at the end of the day. So now if I actually transfer back onto our branches, this new noise that we created on the left. And let's visualize that. So we're over here. I might just increase the distance threshold to like 20 or something just to really make sure that it's encompassing our whole tree. And let's look at what our noise values are doing over here. We can see before the attribute transfer, we can see lots of noise values passing through and changing quite abruptly. And now after we apply this, you can kind of see that noise is changing much more gradually. Not seeing it change it. Yeah, you can see like a gust will come on quickly and then it'll take a little bit longer to fade off. Just gonna check and see what effect that's having on our branches. Let's look at the wind animation. So yeah, you can kind of see it. It has a kind of mellow that out. There we get that big gust and it kind of everything just kind of fades down a little bit slower. I'm just going to check out what our leg is doing. Yeah, cool. And to see this really kind of, it really kind of come together when we kind of see it with the leaves as well. So at this point, let's just turn on all of our leaves, let them process through this chop setup and see what it looks like when we bring them all together. So I'm going to grab this and oops, I'm going to switch it to, I'm going to switch away from my motion effects view because I'm superstitious about having it up when I have thousands of leaves being grafted to it. And then switch the switch to zero. And it's going to just take a little bit to, you know, kind of cook through that channel, that chop net. And we may have another crash. I don't know. to see. Hopefully we'll get lucky. I've got another copy of Houdini waiting for me in case anything goes wrong. Okay, we've got progress down here. We've moved to 25 seconds. That's good. And this is where I open up my task manager and just kind of look at it and see if the CPU value is changing and the memory value is changing. Usually that means to me that progress is being made somewhere in there, hopefully. All right, and we got a crash. I had a feeling that might happen. It seemed like it was taken a a little bit long. So let's just open that back up. Is it in my recent files? Let's see. Yeah, it is. Thank goodness for one minute auto saves in Houdini. Everybody hanging in there okay. If I lost anybody. No, that was great. Cool. This should really be once this opens back up this should really be like what the setup is for the this this is I thought I think that was the final step that I needed to take to get this. to take to get this to kind of do the thing. Let's see here, I've got this set. I'm gonna just go up here. Let's switch this back to input zero. We are transferring our noise back. That's good. And I'm gonna, let's just for right now, let's turn back on our growth animation and everything. And let's just come down to the bottom here where our tree animation is happening and just let it kind of cook through that. Hopefully it doesn't have as hard of a time as it did last time. So here we got it. It's growing and as far as I can tell, it looks like, yep, the leaves are fluttering, so everything's there. Let's just flip book this. I'm just gonna switch back to our camera view and we can kind of see it all happening at once. Yep, crashes, so crashes with, crashes with chops are inevitable. I really love that system and I hope that someday it gets like a refresh because honestly, I feel like there are some things that are just easier done in chops. When I was originally doing this course, I tried to build the solver to do this, where I was integrating time and all sorts of stuff like that to advance through the sign function at different rates of speed. So you basically have to integrate time and having that run in a solver and not being able to visually see it playing back in, or visually see a chart for me. I'm a very much a graph person. Not being able to see that graph, I found super challenging. So I ended up at one point even taking a single point and graphing it in the viewport to try and rebuild more or less a solver version of CHOPs in the viewport to see how my frequency was changing over time. So I just kind of like picked an axis and said, all right, cool. Now we run the solver, you advance the point over very small increment and then draw a polyline that more or less represents what we would be getting out of CHOPs. Eventually that just got so tiresome and it just was a pain to deal with so I ended up just ditching it and going for the chop setup because you do when it is working you get that graph that is updating you can see the oscillations you can see the offsetting that you're doing and you can more or less composite those graphs together and I really thought that that was just like the way to go for this. So even though it does crash sometimes it just is really good for graphic for graph-minded people who do like if you're doing motion design based in like graphs and stuff like that, CHOPS is really handy for that kind of thing. So now the growth of our tree is coming up and you can see that there's a little bit of mild flutter but then when this first gust starts to come in around frame 96, you can see that these leaves anticipate a little bit and start picking up their flutter as that gust starts to happen. They kind of increase and get pushed out of the way. So that's sort of the basis of the wind setup. And it's not, it's obviously it's, it's really kind of, there's probably a lot of tweaking that would need to be done to, you know, adapt this to like maybe a very different leaf shape. You might want to use a totally different method of applying noise. I just thought that it was nice to kind of see that kind of thing. I've used noises to chop space noises to mess around with creating custom like kind of wind gust-like behavior before we did a project at my work. I think I have it up here. I'm just going to pull up my pull up the website real quick. And if I refresh already been chewed website this is where I work. We did a project with glue Vuitton and these flowers right here where I did a chop space wind system that I was driving these flower petals with. So kind of like instead of just using your regular old pop wind, we were doing it, we were applying emotion effects to like an overall amplitude to kind of like create larger gusts within a finer noise field to kind of get that fluttering like effect for some of those flower petals. So chops is really handy to use sometimes for sure. And our playblast is almost done here. And you can see that, yeah, we get that fluttering as it kind of pushes our leaves around and they kind of die off a little bit. And yeah, so that is the basis of that, the simple sort of rig setup. I call it simple because we'll look at the more advanced example just in a second here. But, you know, using this level based system where or we're parenting our rig to the child. We're assuming that our parent branch levels, we're assuming that each, that our parent branches are based off of what level they're on. And so now when I did my other example with the, when we're modifying, let's see if I pull it up over here. In this other example, where we're using our custom tree branch placement, we're gonna be making different assumptions about how this was, about how we're gonna be doing this parenting setup. So I do wanna do it live. It will probably go over a little bit, but if you can hang around, that'd be awesome. And I can kinda show you how I built that other setup by just modifying what we have right here. So we've got our win setup. We're not really gonna worry about that right now. For now, I just wanna jump up and save this as a different file because this is sort of like the base rig. And then now that we're gonna make a modification to the labs tree tools, I just kind of wanna save this off into new files. So I'm gonna save this for save file, save. And then we're gonna say file save as, and I'm just gonna call this lesson three, lesson three custom. At this point, I would definitely say like save a new file. This is, we're gonna be drastically sort of changing things here. I'm gonna just have this grab my old cache file. Actually, it's not gonna matter, cause we're modifying this. So I'm not even gonna worry about what this cache is doing. Just gonna untick load from the disk and hit escape and hop up to the top here. Up to where our branch generators are. So let's start with our trunk generator. And we're gonna do the two things that we kind of, I kind of mentioned to avoid in our first lesson, which is we're gonna use, we're gonna place branches on different levels and we're gonna use the custom tree branch placer. So let's just over here on our tree trunk generator, I'm gonna just, let's just disconnect the rest of our tree for right now. And I'm gonna just put in a, let's say a curve. And it's cool because the tree trunk generator takes a curve. You can actually draw a curve and have it be the profile of your trunk. So I'm gonna switch to, let's see, spacebar, I'm hitting spacebar three and let's grab the manipulator for the curve tool and I'll just draw like a nice trunk that I would like to have like so. And then if I turn on the trunk generator, let's see, I think I might be in, let's see what happened here. Spacebar one, what are we doing? What's going on here? Our curve. I think I drew way too small of a curve. I'm going to go back out to my camera view right here. Yeah, it's so small that it's just, it looks ridiculous. So let's just undo that and reset operations here. And I'm just going to draw from this viewport. Think it'll be good enough. Just going to draw my custom trunk like so. And let's check that out. That's looking a little bit better. One thing that you might note is that the orientation at the bottom kind of gets a little bit messed up. I would just at this point kind of grab the anchor here. And if I do switch into side view and kind of look at it, if I grab the handle here, I'll just like align this handle with the grid. So I just turn on grid snapping over here and I'm just gonna snap this handle to somewhere on the grid. And you can see that that really just orients the bottom of this pretty good. If I switch to maybe the other side view, there might be a little bit off. I'm not sure. It seems like it gets it pretty good. Any little extra discrepancy down here, you just push it into the floor and you'll be good to go. So that's sort of a custom, this is sort of a custom trunk that we're supplying, but suppose we wanna have this branch off and give it our own little kind of branch going off to the side. This is where the tree branch placer comes in. Branch placer. And we're gonna do a similar operation here. We're just gonna draw and occur where we want. we want another branch coming off to the right right here or something like that. So I'll throw on a curve and wire that right here and I'm actually uh yeah let's wire that into this furthest right hand point of the branch placer and I'm going to draw starting from the trunk away from the trunk otherwise it'll get kind of backed up and confused. So if I do that and highlight this you can see the tree branch placer by default rotates it. If I go to the draw on branches tab and just set the angle and roll back to zero. We kind of get that back to where it was. And then it started using the viewer state thing to place branches. I don't want to place any branches right now. I'm just going to leave that. And then, yeah, suppose now we want to just generate branches on here. I could grab a couple of these and throw them down. Let's just do this first generation right here. You can see that the tree branch generator is generating branches that are only on this branch level that we created right here, the second level, this first level rather. And I want these branches to continue to be spawned off of the trunk because I'm almost treating the trunk like a branch in itself, even though it's kind of extending off to the left here. So if I go to the tree branch generator and say branch on level zero and on level one, then we can kind of see that our branches are kind of growing off in all these different directions. you know, accompanying their, accompanying that geo. Let's, we've got a branch that's growing into the ground here. I'm just going to go to the, maybe the pruning settings under general prune and just prune by downward facing angle and stuff like that. This is just for demonstration purposes and everything, but I'm going to just bring back the length of the generated branches a little bit as well. And so from here. Now, when I was testing this, I'm just going to get rid of this third branch generator real quick. If I just wire this into our splines and we can kind of see what our rig does with this information. If we go down here to our point where we're doing the, the attached joints operation, you can see that we get all these lines kind of going off in all these different directions. And if we go all the way down to our animation. Well, it seems that it gets, oh, it gets upset because I think that it's trying to do something with let's just, I'm going to bypass this noise transfer so we don't have to worry about what's going on in shops over here. Because we've totally kind of, we've got to, we don't have like a successful tree over on this side to be even be processing at this point. But right here, if we get onto our trunk animation, and I'm just gonna hit this select key, and we just kinda look at what it's doing, you can see our trunk kinda comes up, all these branches have a really random long polygon, a polyline that's attached to the second branch level. And it's just, maybe these are working out okay over here, but this is just not working out right on the left-hand side. And so what I thought to do was just, Let's look at the attributes that are coming out of here. What we had done before was we were making our branching parent-child relationships based off of what branching level they were at. We've changed that now. We're now supplying branches to any branching level that we want to. My thought was that what we could do is actually apply our, adjust our rig to actually track which branch ID is the parent of any given branch. So I've got a little diagram here that I'm gonna do in Photoshop this time because I epic pen, I just wanted to copy and paste this diagram that I drew last week. So last week we were creating branching levels and these were all sort of, we were making assumptions saying that like, level two can only connect to level one, level one can only connect to level zero. Well, now we need to actually track the parents. So let's just kind of make another little diagram over here. And I'm just gonna grab the brush and let's go to this new layer here. And I'm just gonna draw that from scratch. Just add a little plus here. And so now this is what we've got for a tree. We've got level one right here. And then level two is actually this branch coming off to the right that we just drew. And now the next generation of branches that we have, which is level three, is going to be branching off of both the level zero, the trunk, and this level two. So we've kind of broken this sort of assumption that we're making right here. This is not happening anymore. So what we can do is we do have branch IDs. So if we do kind of look, we can say, we know this is going to be branch ID zero. This main trunk is going to be branch ID zero. And this is going to be branch ID one. At least it should be. We've placed a branch here. should be branch ID one and so on and so forth. And then when we scattered, more or less, inside the tree tools, it's doing a scatter operation. So at some point, this branch is gonna know that its parent is supposed to be one, and this branch is gonna know that it was scattered on branch ID zero. So we'll have branch IDs for all of these branches. This will be like two and three, four, five, six, so on and so forth. So all of these branches, we're just going to track what branch it was scattered on and build its ID, its parent ID attribute accordingly. So we're going to use a, we're going to say, we're going to have a parent ID. And we're going to use that parent ID to set our valid attachment groups and name our valid attachment groups based off of what the branch ID value is for any given parent ID. ID. So for example, branch seven right here, we know its parent ID is branch ID one equals branch ID. And we know that for, for example, right here, its parent ID is equal to branch ID zero, this one, because it's attaching to it's, we know that it was scattered on this and on the trunk. So let's go and check out what we got going on in our labs tree tools that we can modify to create this type of behavior. Cool. So let's first look at what the tree branch placer itself does. I'm going to pull back up my geometry spreadsheet, alt-right bracket, and then alt-8. And if we go and look here, we can see we've got branch ID. We should have at this point branch ID, 0 and 1. If I go and visualize our branch IDs, we can see here that we run into our first problem. The first problem is that we don't have two different branch IDs. We've got two different levels. We've got a branch level 0 and a branch level 1 if we scroll through our spreadsheet. But for whatever reason, True Branch Placer doesn't have, it wasn't set up to create its own branch ID that we could use in this setup. So what we need to do is we need to do that ourselves. So I'm going to modify this by right clicking on the asset and say allow editing of contents. And then we're going to jump inside and there's this huge network. It's going to alt click my viewer to split it back the way I had it before all the crashes. And you can see that this is the inside of the tree branch place. And it looks pretty scary, but most of it is doing shaping stuff right here really where the magic is happening is up in this little section right here. What we're doing is we've got these two these two chunks. One of them is where the drawn branches are happening and the other one is where the placed branches are happening. You can see that our curve right here is coming in. The curve, the input curve, is our previous, it is our, oops, the input curve is our trunk and we know that that input curve has a branch ID of zero. So what we need to do is just actually take the maximum value of our previous branching levels or branch IDs and just add one to it. So we can do that using an attribute promote. So I'm just going to pull this off to the side and create a little knot and we're going to create an attribute promote right here. And on this attribute promote, we're going to be promoting the branch ID to detail attribute and we're going to change it to the max branch ID max. And this way we're going to know whatever the highest level of branch ID was achieved on the previous, you know, generation of all the branches that are feeding into the system. We're going to know what the maximum level of branch ID is based out of this detail attribute that we're creating here in our case it's just zero, but this will come in handy later. So what we do is inside here, I had to kind of dissect this. This took me a while. But at one point in here, there's a little attribute transfer. And this attribute transfer is the culprit for what's happening with our branch IDs being wrong. You can see that right here is transferring the previous branch ID back onto our placed branches and our drawn branches in these two nodes right here. So if we just split off this stream, we can use this to set a new branch ID. And we can also use it to set our parent ID at the same time. So I'm going to just bring this off to the side. And I'm going to just throw it on an attribute wrangle. And so this attribute wrangle is going to take whatever this, whatever our newly created branches that we're feeding in right here, and we're going to look up into the second input and make a new branch ID based off of whatever the maximum branch ID was over here. So we're gonna say that our branch ID, I at branch ID is equal to a current primnum plus one plus the detail attribute from our second input, so input one, and we're looking up the attribute branch ID max underscore max, max, I think this will be said there. So now you can see that in our geometry spreadsheet, this new branch has branch ID one applied to it. Now we need to do this in that we just need to feed this back in over here. So if I bring this back in over here, you can see we've kind of just made a little detour out of this, modified it and brought it back in. Now we just need to do that over here as well. So I'm just going to bring off a little thing like this. And actually, I need to grab this one. We're just going to copy that wrangle and we're going to bring it bring this in over here like so. So we're just kind of making that detour twice one for each side for the drawn branches and the placed branches and placing them back in here. The other thing that needs to be modified is down here there's another attribute transfer that's happening and it is grabbing a bunch of it's grabbing all the attributes that we just created but we want to make it so that it doesn't overwrite the branch ID that we just created. So we're going to say not branch ID. And when we hop back out here and look at our tree branch position, we can see that we get two different colors. That's a good sign. We got our branch level zero and branch ID zero. And we scroll down and you can see branch level one and branch ID one. But the other thing we wanted to do, based off of our Photoshop doc, was also track what our parent ideas. And our parent ID is stored because we're scattering, we already had our branch ID and we reset it. So if we have that branch ID, we can just initialize our parent ID to be whatever the branch ID was before we modified it. So if I go back in here, and we just hop up to this thing, we can just right before we adjust our branch ID here, we're just going to create a new attribute called I at parent ID. And we're gonna set that equal to I at branch ID. So that's just, you know, carrying that attribute through. And I need to do this for both ranges. I copied this wrangler, I'm just gonna copy this line and paste it over here. I could have done an absolute reference copy, but I wasn't thinking of it. So now that we've made these modifications, We also need to adjust it so that we're not overwriting our parent ID here as well. So insert a parent ID there. And what I like to do at this point is I'm just gonna put a little knot here and take this one and push it way off to the side and then grab these four nodes that we created and put them in a mint colored box to know that this is the thing that we tweaked in order to get this setup to work properly. So we can hop back out here. Our tree branch placer should be working correctly. The only other thing that we have to do is modify the tree branch generator to understand what its parent ID was. And similarly to how we did it right here, we just set one line that said parent ID equals branch ID. I'm gonna just increase the scale here. Sorry. So we when we said parent ID equals branch ID, we just want to kind of take this line and copy it into our tree branch generator so if we just jump down to the tree branch generator we're going to also allow editing of these so let's right click allow editing of contents and jump inside here. And this is another scary network, but you can see right here in the middle, we got a copy to points happening. And that's where we're copying all of our new. We're copying these new lines onto our initial points here that were that we're gathering. So we just need to track that parent IE right here. I'm just going to throw it on another wrangle. And I'm going to wire that in here and paste in the same line. We're just tracking parent ID. I said parent ID is equal to branch ID. That's it. So here I'm going to also put this one inside of a nice minty, spear minty colored box where we update the and add the parent ID to our setup. And that should be all we need to do to get this to provide the data that we need. The only thing we have to do now is just modify a couple of nodes down here to get it to do the attachment correctly because our attached joints still aren't working correctly. So we need to take into consideration that we're using parent IDs instead of branch it instead of levels and just make mods to these so when we the first thing we need to do is just modify set attached group. I'm going to just option drag these off to the side to keep an old copy for our reference. And then I'm going to just color these two nodes red to denote that we made a change here. Under a attach group, we were previously making a dynamic attach group called level whatever our branch level is, level 0 attached, level 1 attached, something like that. In this one, we just want to do a branch ID attach. So we're going to just change this label to be something that means a little bit, something more meaningful or call it branch ID underscore percent D attached. And then instead of using our branch level to dynamically replace the string inside of this group that we're creating, we're going to call this branch ID instead. So we're doing that. And that should be good to go for there. And if you just middle mouse click on this, you can see that we get like, we're getting tons of branch IDs. we're getting a branch ID group for every, branch ID attached group for every single branch in our entire system. So we'll delete those later once we're done with them. We just need to kind of use them in this next node where we do our attachment. So in attached joints, same thing, very similar. We just want to change the kind of wording right here. We're doing branch ID attached. So as per net branch ID attached to attach to that branch ID group we just created. And then instead here, we want to actually attach to the parent ID that we created in our, when we were modifying our labs tree tools. So we're going to say parent ID. And that's going to allow our diagram to behave accordingly. Now, if we look at the attach joints group, we're not seeing these strange polylines that are kind of moving across the screen and attaching to this other branch we placed over here, it's all working correctly. So if I come down here and we go to apply animation trunk, you can see that now all of these branches are all tied together in a predictable way that makes a lot more sense than it did just a couple of moments ago. So that's kind of how I modified the lab street tools to get them to work with this new setup. The only other thing I would do right here is just insert a group delete to get rid of all these groups because we only have three levels of branches here, but you can imagine you'd get quite a few unnecessary point groups if you had quite a few branches. So we'll just throw in a group delete and throw that in right here. And we're gonna just delete any group. See if we got branch ID, blah, blah, blah, blah. Where's a branch ID, anything with branch ID underscore and then use stars as a wildcard. And that should delete all of the extra branch ID groups. And if we go back down here, We should have all that stuff working, our wind working and everything like so. And it looks like I just wanna get this wired back into my setup here. So I had, if you do want to add another level of tree branch generation, you're gonna want to kind of copy this obviously to make your updates to this instead. So we do a couple of generations here. And on this one, I'm gonna say I wanna branch on. We're just going to remove that so it's only branching on the previous level and we can see we get a much more, we get more of our branches here. Then let's just grab this wire that in here. And I'm going to delete these two other branch generators, but I'm going to wire this in first. We get our leaves back. So, and I want to wire this into our material. So and if I go down here, I'm going to just let's cross our fingers and see if we get see how we do with our full setup. Obviously, I'd want to have a little bit more on leaves on maybe a few more generations of branches and leaves and stuff. But we should have that full wind setup working with our new tree here. And let's see our leaves making any movement here. Yeah, our leaves are fluttering. It's very subtle, but you can see them. Maybe we'll make them make them bigger. We'll make this like a tropical tropical plant or something like that. Increase the leaf size. There we go. And so yeah, that is how we can use the custom, we can customize the lab street tools to have them work in a way that is logical with our updated rig that we created here. And that is pretty much all I got for, for that is everybody, how's everybody doing. Great. Yeah, it looks so good. Cool. I know that that one was a little bit. I know that these kind of got gradually more and more complicated as we went along, but I think that hopefully there's a lot of interesting little tidbits in there that you can use in various other parts of your Houdini-ing. Oh yeah, I mean I think that even though it's complex, it's just there's so much learning in there that can be taken to so many things. Yeah. And the result is gorgeous. So the chops was so interesting. I know it crashed a lot and I hope you don't feel bad about that. not you. Obviously. Yeah, no, I was kind of expecting that, like, it would do that kind of stuff. I Yeah, sounds like it. You're rehearsing. It didn't happen yesterday, but it did happen quite a bit in some of my other rehearsals. Yeah. And I guess taking zoom into account is always like an unpredictable little thing there. Yeah, it's weird because I feel like OBS has been taking up a lot a lot of GPU resources. It looks like Zoom is coming. Oh, I didn't realize you're doing it. Also OBS. Oh yeah, no, I have OBS. I'm recording a local copy. Just so if you wanted a hybridized copy or whatever, I have it here. Got it. Yeah. It was weird. It was acting a little bit weird and then it crashed, but then when it came back, it was performing great. So it was like fluttering real time and everything again. So that was fantastic. Yeah. Does anybody have any questions? Any questions? Larry has a question in the chat. So yes, all the hip files, all the hip files will be uploaded. The hip file from the video that I showed at the beginning, all those, all the, all the videos that I've shown will have the hip files provided. So you'll be able to get in there and mess with it. And honestly, yeah, like following along and modifying these, I was, I was actually not even planning on doing it during the live lesson. I was just going to be like, and here's my file, and this is what I did. And but I tried, I tried going through it last night and it didn't seem like it was that hard. So, I mean, it's just a couple of modifications. But yes, I definitely will be providing this file will be on the course page. You'll be able to just grab these nodes and paste them into other projects. And if you're feeling like extra saucy, you can create versioned up digital assets. So you can actually version forward the HDAs that labs provides. And I tried to do that on my end and I got it working. But then when I wanted to come teach this lesson, it was defaulting to the new nodes that I had created. And I had to actually take that out of my system and revert back to the bread and butter labs tree tools because they created too many problems with me trying to create a tutorial around them because it was always trying to grab the most recent one that I had. So you can kind of modify those and save them for yourself. It is, however, like I find modifying HGAs and like updating HGAs to be kind of a convoluted process. Yeah, I feel like I don't do it enough where it's not like in my muscle memory. So I don't. But if you are comfortable with that kind of stuff, you definitely could follow along and make these mods to them and save a new tree tool set and it should work pretty good. The other disclaimer that I would put on there is that if you're doing the tree branch placer, I would place branches one at a time. Instead, in the tree branch placer, you do have the opportunity to place multiple branches and multiple drawn branches. I would definitely choose to, you know, if you wanted to place more than one branch, I would use multiple of this node as opposed to trying to do it all on one node. Just because I'm not sure how it breaks down in there if it falls apart with tracking the parent IDs and stuff like that. So you just want to use one note at a time when placing custom branches. Cool. Got a question for you, Mark? Yeah. So the the chop stuff, I love how you explain the chop stuff that that was I need to get deeper into chops anyway. But one thing that I'm thinking of on this, and this would be a a very different approach is going into volumetric velocity fields. And I'm curious if you've actually tried going that route with a kin effects rig. And if you've encountered hurdles, just because of the like you were talking about the orientation of stuff, because with the velocity, it's dealing with the points in a different way. It's not dealing with orientation. It is, but isn't at the same time, not in the same way. But I'm curious if you've messed with actually trying to run a volumetric field through there to get a wind versus doing the chops. Yeah, that's a good question. I don't think I have, but I do know that, you know, when at the beginning I kind of threw down a attribute noise and just had the position kind of warping around like that. What I do know is that if we send in our capture stuff, if we send in our capture transforms, and then we do an animation and update, but we don't update those transforms and then feed our, then we update that deformation after, we're looking at, we did these corrections right here. We did these corrections right here, just directly modifying the position of a kin-infects rig without touching the transforms will create that skewing effect inside of the geometry when it gets reboned or formed or whatever. So you might need to run another rig doctor or use some logic to kind of measure the change in the angles of the primitives to compensate for a direct manipulation of the point positions as opposed to modifying the transforms themselves. That makes sense. Gotcha. Yeah, that makes sense. Okay. I have a quick question. I'm curious, I was thinking you were talking before about wanting to make the trees dance, Deborah. If there was a way that to use chops to instead of providing the noise to have an audio file. Oh, you got, you got, I was just gonna say, you got to it before me. I was gonna say another homework assignment for someone is to get a music track in there and have the leaves dance to the music. Yeah, yeah, for sure. Yeah, that would be, yeah, that would be cool. Yeah. Yeah, the sky's the limit. And going back to thinking about the question with using the volumetric, I mean, applying the noise as a float value, you can always look up into a pyro sim and grab some density attribute or measure the speed, the length of the velocity vector to convert that into a float attribute and use that as your noise. and everything. I mean, it's funny because there's like infinite possibilities, but there's still our limits you have to like work within. But I think there are ways around it if you get creative with. I have a question. If the transforms, they're all a matrix, but it's composed of vectors inside of that matrix. So couldn't you make a velocity field like a pyro sim and just affect one of the vectors in the matrix? You could, but I think that you might end up with non-orthogonal, I think is the term where they're not 90 degree oriented for one another. Yeah, they would probably twist across each other in a weird way, although it could be an interesting look. Yeah, it could be cool. You could have it do that twist And then pull them out. If you, if you actually convert them to an orient, it'll normalize and then convert it back to a matrix. So you could, you could like, you know, have it mess with one of the vectors, recompute the transform and then, and have it just create a new transform based off of that adjustment. But then you'd get that, you know, right handed orthogonal. I keep doing this right handed rule thing. That's what these are the axes. You can kind of see my hand. Right. Right. Yeah. Yeah. Yeah, there's there's so many things and it's crazy because when they you can get some very weird shearing and stuff to happen and I don't necessarily understand enough under the hood of what's going on with these matrices to know what exact effect that's going to have but it might look pretty cool for sure. Yeah, and I wonder if it would be easier if it was a you can make 2d sends like make the pyro Like just like a 2d sheet and I wonder if that would be easier for the that problem the orthodontic problem. Yeah, but um, yeah neat I love it Stop giving me ideas to waste my time with Yeah, do it, David. Oh, you know, by the way, while I have this open, I was doing, I wanted to show you like one thing when we're over here, when I was messing around with this, I did actually at one point clone cubes on here and just did copy it. Oh, yeah. If we just throw a box down. And why are this in here. You have basically actually, if I can I see that. that you kind of have us by night happening here a little or actually I got a wired in over here. I think yeah, there you kind of get a little bit of that us by night type thing we were talking about last week where it's all these, you know, nice parameters that are, you know, un unrolling themselves in a really classy looking way, which is kind of cool. And that's exactly what I did for the last piece, the psychedelic cube once it was exactly that. Yeah, cool. Yeah, I love that. I love the idea of using this for things that aren't tree related. I think that was really cool. The what you did on with that post with like using it in water. It's just, it's so cool because that's the beauty of Houdini is that you're not restricted by a plug in its black box and you can only use for one specific task you can cross breed this with anything you want and it like, and that's the thing is like, you know, the number one use case for for kin effects. The number one most relatable use case for kin effects is character animation, modifying character animation. But under the hood, you've got a tool, a set of rotational tools that are so robust and so powerful and well thought out that you can like apply to all sorts of different things that are not even trees, you know? Like just lines or spines or, you know, any type of geo you can imagine, you can use it in Belem. I used it to wrap up that, those flowers that I was showing in that example, I used them to kind of wrap up that flower. I think I kind of followed an example that I saw during one of XK Studios talks at one of the hives. They do a lot of really cool flowers. Yeah. They fold the flowers up and stuff, but you can use KinFX to just drive really like realistic looking initial states for vellum, just wrap everything up and then just let it unfold from there. Kind of stuff. like the ultimate art direction tool. Yeah. Yeah. Thank you so much. Any other questions from the audience? Did you guys enjoy it? I think so. That was great. Yay. Really good. Thank you. Yeah, thank you everyone for hanging in there and checking it out. And yeah, check out those project files and hit me up on Discord. I'm totally happy to help problem solve troubleshoot all that stuff. And I really want to see work from this class, you guys. So I hope to see some stuff in the discord this week. So practice is really important. But yeah, thank you so much, everybody. Thank you so much, Mark. This concludes the course and went by really fast. And I hope everyone had fun including you, Mark. Yeah, absolutely. We'll have to come up with another one do it sometime. Excellent, excellent. Okay, have a great weekend everyone. Thank you.", + "segments": [ + { + "text": " things that need to happen, but then we'll get into doing the, we're gonna do the, we're gonna get the custom tree branch placer to work with the rig. So we're gonna actually re-rig towards the end. I, depending on how much time we have, I may either dive in and actually do it live, or if it's running a little long, or if everyone's down for it. I don't worry about that. If people people have to go they go and usually people who stay are hungry for the info so I'm worried about that. Yeah I practiced it last night and I had time to do it live so I'll shoot for that today too just to so we just will modify or we get the variant and change the insides of those tools and get them to do cool things. I actually ended up using this on a job this week I started making trees for a job that we're doing at my work so. I was making a little bones I had plants and stuff. I was going to try and make a flower too because I'm pretty sure you can make, you know, flowers and whatever types of plants you'd want. Yeah, I thought about too. It'd be interesting. Yeah, it's like unfurl a petal or something off of it. Yeah. Yeah. Cool. We'll go take it away, Mark. Alrighty. Let me do my share screen. I'm going to share this one. And I'm just going to slide this over here. And let me grab my chat. And I'm going to do this. So all right. So here we are in lesson three of procedural growth with Kinifex in the Labs Tree Tools at Houdini School. name is Mark Fancher again, and this is our third and final lesson where we will be creating a wind system for our tree. So I got a little video here and see. This is sort of where we were left off last week, we kind of created this tree animation, so it just the tree kind of grows out of nothing and just sort of lands. So, I'm statically like this and then what we'll be doing today is this, adding this like rustling of the leaves right here so if I just me. So you can see here, we're going to be adding sort of bending of the branches to kind of accommodate that wind gust and then we're also going to be applying this leaf flutter that is going to increase in frequency and amplitude as the gusts pass through the leaves. I just, it was something that I kind of like picked up from observing like how speed tree works their wind system is super fantastic looking and it was kind of inspiring to me to see if I could figure out a way to do it in Houdini. And so we're going to be doing that by the end of this main portion of the lesson. And then the lastly what we're going to do is we're going to dive into this now you can't see the full tree for this example but this is the more advanced example where I'm actually using custom branch placement and stuff but this is sort of my hero image I just kind of decided to pick a more pleasing angle, more abstract view of the tree But if I pull out the, let me just grab my other window over here of that project and merge it together, you can see that here I've kind of, like I kind of hand placed a couple branches here. I kind of drew a curve for the trunk here and then placed this branch by hand by drawing it using this curve tool and placed another one by hand and so on and so forth, built this tree that is a little bit more like in a shape where I just kind of want to art direct it more like kind of horizontal kind of roaming almost bones I like looking tree. So we'll look at that at the end of this lesson and figure out how we can modify our rig to get it to work with our current setup. So the file that I'm going to be working off of for this lesson is going to be the project file from the course from last week. So if you go to the course dashboard and session two right here. And we just hop down here. This file down here on related material lesson 02.zip, that is the project file I'm going to be building off of just to maintain some consistency. I'm sure that it's almost identical, but just to make sure you never can be too safe with that. So let's get into it and start building this sort of a wind system. First thing I wanted to do is apply the wind to our branching setup. So over here, we've got our breast branches right here. And the way that I'm gonna, the way that I thought about doing this is sort of just passing a noise attribute through this and using that noise to drive literally everything. But the noise that I'm gonna do isn't sort of the typical noise you might think of. So when I think, oh yeah, let's pass a noise through our tree, I'd throw down an attribute noise, like so, and maybe just select the position mode. So instead of, you know, creating a vector noise on color, we just would put in P here and sort of get this kind of noise function that kind of messes up our tree branches a little bit. And if we like, you know, increase the element size of that and then add our offset, you might think that this is the beginnings of how we could apply some sort of a wind deformation to our branches. But the way that Kinifex works and everything is I really want to work with, I really want to continue working with rotations because rotations are really kind of like the core of how these deformations work and everything. So what I thought was maybe we just passed through a float noise and that float noise acts as a modifier as to how much rotation should be happening on these branches as gusts pass through. So let's just go back to our attribute noise here and I'm gonna scroll up here and instead of making a vector position noise, I'm just gonna just create a new attribute called noise and we're gonna switch that over to a float. So we're just getting a float noise here and I'm just gonna hit the I key and find my noise attribute here and just visualize it. So you can kind of see that we've got this red, white and blue kind of color. We'll fly in here. We got this red, white, and blue color on our branches. And so what I like to do to get a better view of what my noise is actually doing since these branches are just kind of little splines, I want to get an overview of what this noise actually is. So I'm going to just actually thread on a grid and use that grid to act as a slice through our wind to view what we're doing. So I'm going to set this grid to be on the YZ plane. Sorry, the XY plane. Yeah, there we go. The XY plane. And let's give it 100 rows and 100 columns. And let's just make it a size of 30 by 30. And I'm just going to grab the manipulator and kind of position it over our tree. And now if I just I'm going to hold Control, Shift, and Alt and drag this noise off to the side and just wire this in here. So I can actually kind of view what this noise looks like in the space of the tree, you know, which is kind of resting underneath it. So I have a reference copy of this noise over here for visualization purposes, but any changes I make to this node over here is going to update correctly. So if I were to offset this noise, you can see it passing through that plane, and that'll be really kind of like what is happening on our branches themselves. I'm just going to switch my view up a little bit here. I like to work with this. I'm just going to hit the Alt key and click on this little paddle in the middle here. And then without holding Alt, I'm going to click it again to just put my parameters off to the side like that. So I can get a little bit more room to see what I'm doing here. So let's make some modifications to this noise. I think that right now, the noise seems like it's really kind of, it's really noisy. And it's really, there's a lot of like very closely packed together pockets of high intensity and low intensity in order to get these bigger gusts. We're going to want a larger element size and maybe a little less roughness. So I'm going to dial the roughness back to about point two five. That kind of just makes these blobs a little bit more, you know, blobby and less kind of, you know, just less of this like kind of chitter in there. So I'm just going to set 0.25 there. And then on the element size, let's just crank this up quite a bit and see what I did in my previous example here. Just make sure I get those values right, because one of the funny things is that I found a really good gust that I liked in this. And so I end up offsetting and animating into this noise quite a bit to find that perfect gust. But if I increase my element size to 30, you can see that we're getting quite some large. some large blobs here. And then I just want to animate this offset. So we're going to say that our wind is blowing in the x direction. If I look down from our camera angle, so our previous camera angle we set up, I want the wind blowing from left to right. So that is blowing in the positive x axis. So if I just animate this offset on the x axis here, we can put in something like dollar sign ff divided by 30. And that will give us this sort of, you know, wind gusts coming from left to right like we'd like. The other thing that I found though, this is what I'm talking about offsetting is right here as we get to the end of this. You can kind of see that it actually looks like the noise value is shifting a little bit. If I just kind of move subtly with the mouse, you can see that it looks like it's actually, it's not just moving from left to right, it's actually changing its on the visualization on our visualizer because it's set to, here it's set to auto ramp range for us. So it's kind of grabbing a min and max on its own and setting the range of this. I'm just going to set that to min and max and set it to, restrict it to a value of zero to one. So that's no longer changing but as we get over here you can see that we're about to get this major dip that comes right here. And I found that I really liked that dip to kind of happen at the beginning of at the end of when my growth was happening. So we could get that initial that initial gust that kind of like pushes our branches right as our growth stops. So I just did that by kind of offsetting my frames into that noise a little bit. I offset it by 168 frames, which ends up being like, I think seven seconds. Yeah, it's about seven seconds in. So here you can see as we get to the end of our growth, which will, you know, well, at the end of our growth kind of, our growth kind of wraps up around, let's see here, around, you know, the 72, 72 frame point right there. So if I show our noise, and around frame 72, we see we get this nice dip and then this nice heavy gust that comes through. So I was just sort of a little like, you know, art directing, trying to find the right point point in the noise that I wanted to use for doing that kind of a thing. The other thing I wanted to do is just add a little bit of contrast to the noise. I'm right now it's right now we've got very smooth transitions between the noise. I just wanted to kind of like let that noise kind of max out a little bit. So I'm going to just throw down a wrangle, an attribute wrangle and wire that in here. And we're just going to kind of ramp our noise off a little bit. So I'm gonna say at noise equals ramp. We're gonna create a ramp parameter called ramp. So ch ramp ramp in quotes comma at noise. And this just gives us a nice, it just gives us a nice little curve. We can kind of modify that. I'm gonna do the same trick, which is control alt shift drag this off to the side so we can kind of visualize what effect that's having it having over here. And I think that for a value, you know, you can see we're just, we're increasing that contrast on this noise. What I like to do is I'm just gonna bring it in about 20% on either side. So we just put in a 0.2 here and a 0.8 on the right hand side. So that just kind of, it's kind of tucks it in a little bit and gives it a little bit more. You get that really nice violent, like it's basically nothing right here. And then we get this nice whoosh that comes through like that, sweeps through the tops of our branches. Nice, so now I want to kind of get back into, I wanna, let's get this back into our network and start using it with our rig attribute wrangles. So I'm gonna just zoom out here, maybe give myself a little bit more space. So I'm just gonna grab all these nodes and drag them down a little bit. And what I wanna do is just bring this introduce this noise into our stream, right, about here. Now, I've got sort of a bunch of streams kind of coming off of this rest right here. I'm going to just bundle these all together, maybe do a little bit of this, maybe bundle these together, just holding on the alt key and clicking on these, on these streams to just sort of create a little notch here to kind of keep things organized. So we've got this noise and we're replying this contrasty noise that we applied here as our gusts in our branches. So the next thing we want to do, and this is what I was thinking would be great, is just use this noise to drive the magnitude of the rotation that we're applying to our branches. And we've done a whole bunch of stuff with rotation already right here with our branch animations and so on. on. And so I'm going to just do another one. We're just going to grab another, we're just going to create another rig attribute wrangle. And we're just going to throw it in right here and do our rotation base and use our noise as a multiplier on that rotation. So what we were using before, we're using the pre rotate function. So I'm just going to snag this out of our previous apply animation, you know, one of these one of these wrangles, we're just going to use that same line here. Just going to paste it in here. So we got our pre-rotate function set up. And then for our axis, we're going to do an angle. So we're going to say float angle. And we're just going to give it a multiplier here. We're just going to say CHF angle. And then whatever we set this slider to is going to sort of be kind of like what the maximum level of rotation is going to be on our branches. And we're going to multiply that by that noise attribute that we're bringing in from up here. I'm gonna just label this real quick. Let's say apply contrast to noise. And down here, we're going to be saying, this ring attribute wrangles is gonna be saying, call this apply noise like that. The other thing we need is an access. So right now, if my wind is blowing In the positive x direction, I want to rotate it around the axis that points into the screen. The issue that we have right here is that our transforms, if I look at our previous level, our transforms currently are pointing in all sorts of different directions. So if I were to say, okay, let's rotate this around the x-axis, you'll see that it's actually going to rotate about all those red axes that were defined on that transform. So let's throw down a float axis and say, sorry, it's not a float sub vector. I do that a lot. Vector axis equals CHV, sorry, not CHV, we're just going to say 1 comma 0 comma 0. So the axis we want to rotate around is our x-axis. And if I just turn on this slider right here and crank that up, you can see that. Things are kind of rotating every wish way because all these axes are not, you know, world aligned at the moment. They're kind of all on their own. So if I were to, I think what we do at this point is we actually just are going to temporarily reset our axes, so that our x axis points into the screen down the z axis. So, if I go up here, and we just create another little transform. and why are they in here? For right now, I'm going to just turn off our animations that we did here, the animate branches and trunk and everything. We're just going to have a static tree for right now. You can see that that noise is passing through and rotating our branches. It just doesn't really look like anything resembling wind yet, because it's kind of rotating all sorts of different directions based off of those weird transforms that we have. So we create this. Sorry, I didn't want to throw it on a transform node here. I wanted to throw it on another wrangle. angle, another attribute wrangle, we're just going to reset the the transforms to point down the z-axis. So on this one, I'm going to throw down a vector dur and this is going to be our wind direction, we're just going to normalize that and we're going to normalize a chv that we're going to set, so a vector channel that we're creating called wind direction. And I'm just going to hit this button to create it, to create the channel that we have here. And the wind direction is going to point in the x-axis. So we're going to be setting our wind direction to be 100. And then we're going to create a transform here and just basically set our transform from scratch. So three at transform equals make transform. We're just using the make transform function to give it the direction that we want it to point. So we want it to point in the dir direction that we created. And then we want our up vector to just be, we'll just use the y-axis for now. Oops, zero comma one comma zero and close brackets on that. So now we've recreated. So if we go up here and we look at what effect this has had on our geometry before, our axes were pointing in all sorts of different directions and our noise wasn't really behaving itself very well. But now, if we turn this on, you can see that all the X axes are now pointed into the screen, into that Z axis. So when we rotate around that X axis, it's gonna give the effect that the wind is blowing the tree as it rotates off into the right. So if I turn the apply noise back on, let's just turn off those transforms for a second. Maybe I'll just dial this back a little bit, like way back. And let's play this down a little bit. You can kind of see that our different branches are having different amounts, they're having different bend amounts as that wind passes through. So if I turn maybe the noise on and turn the transform off of our visualizer, you can kind of see how that noise is passing through and rotating all those branches along with it as it comes by. So you can see this big gust comes through gives us a lot of rotation towards the top there and everything like that. So that's working, but one of the things that I would like to do is, you know, and this, you can do kind of either way if you want. Here in my example, what I did was I only rotated my branches around their roots, but it does kind of look good sometimes to actually rotate the entire branch and just apply a tiny amount of rotation to the whole branch. And so that's why I have to use such a tiny amount of an angle right here to just apply this little bit of bending. And I think that that looks great. In my example file that I have, I ended up just working only on the root group. So if I just select the root group here, you can see that that rotation is very much less because it's not compounded all the way down the branch in that parent child relationship that's created by KineFX. So I'm just going to crank my angle up a little bit. let's just crank it up to 0.2. And then you can kind of see we get we get that behavior back. It's just maybe a little bit more rigid, but I don't know, it seemed like it worked okay for my example that we were doing. But the other thing that I want to do is I kind of want to ramp this off. I want to ramp off the amount of noise that's being applied along the tree. I want to say maybe that the branches that are towards the top of the tree are allowed to be blown a little bit more than branches towards the bottom. So we can just apply a mask to this the way we did before. We actually have a mask that we can use and that one would be the Dist N attribute we created when we're creating this unrolling type of effect before. We have a mask that kind of goes from zero to one as we go from the bottom to the top of the tree. So I'm just going to introduce another ramp where we can control that inside of our rig attribute wrangle right here where we apply the the noise. So I'm going to actually say apply wind. That's a better descriptor here for what this does. And let's go up here and create a new, we'll create a new float ramp. And it's going to be a ch ramp type called ramp. I like to name my ramps ramp. And it's funny because sometimes I'll have an attribute called ramp, and then I'll ramp that one. I'll have I'll have a line of vex that has ramp equals channel ramp ramp at ramp. And it just, it It just says ramp like 900 times, but we're not using that this time. We're just going to be doing a dist underscore n. So that was that distance attribute that we were just visualizing there and a knee date and a semicolon here. And there we go. So now if we look at this, we can see that it's actually kind of doing the opposite of what we want because our, if we look at our visualizer here on dist n, you can see that our higher values are red. So we get a higher value at the base of the trunk than we do at the top. And I also need to create this. Let's actually create the ramp as well. So you can see that it's actually rotating things towards the bottom of the tree, more than the top of the tree. So I'm just gonna reverse this ramp. And then we can actually see that the leaves, oh, you know what I also have to do is I have to multiply this angle magnitude by that ramp as well. So let's just bring this down here and say times ramp. And now you'll be able to see that the top branches are kind of rustling a little bit more than the bottom ones. And so that's just sort of a nice little approximate wind animation for our branches. Cool. Is this visible enough to everybody? Do I have a good enough size on the tech support here? Yes. Great. Awesome. Cool. So now that we've done this, let's see what our actual bone to form is looking like. I'm just going to go back down here and highlight the bone to form. And it's going to have to cook through a little bit. I might actually cache this out really quickly to be able to see what we're doing without having to wait for it to recook during the session. So once this passes through our branches, I'm just going to throw a file cache node right after our capture right here just so that we just just so we don't have to recapture anything. At least as frequently. So let me just before we address how wrong our tree looks now I'm going to just go up here and throw out a file cache. I'm just going to put that right here and let's select it I'm just going to call this capture cache. And I'm going to switch to explicit mode and single frame, and I'm just going to remove dollar sign F from the mix here and save to disk. All right, cool. So now that that's cash, it's loading from disk. And if we look at our bone deform, you can see that everything is all mixed up now. We've got our trees just like totally messed up. And the reason for this is because we are not providing rest transform and an updated transform in a way that is meaningful for bone deform to maintain the shape of this tree. So our rest transforms, if we visualize our transforms for our rest tree, you can see we've got these crazy transforms that are pointed all sorts of different places. And then when we come down to our animation, which we're using to update, our rest transforms are basically oriented along the world. And so when bone deform sees this, it thinks we're trying to to actually rotate all of our branches and all the skin of all of our geometry by those little transform offsets that we did. So the thing that we need to do is we need to compensate for these changes that we made and supply a better, a transform output from our animation that actually is indicative of the trend, you know, it's it is an updated version of the transform that we're providing on our input. And this kind of gets a little bit tricky. But basically, what what we're going to do is we're going to, we're going to calculate what the offset is between our, between our messed up transforms here and the, you know, animated transforms at the end. So the way I actually want to do this if we go up here to rig doctor you can see that rig doctor is actually supplying us some nice transforms we said here to reorient towards child, I actually like the way that this works it seems predictable to me, these are the transforms that I would like to use as our rest state. And since we're making these updates, we can just update once for our branch animation and then update again for our wind animation. And so I'm going to actually bring this fix axes step. I'm just going to bring this down below. So here what we're doing is our rest at transforms that we're going to be providing are going to be these nice clean transforms to get out of the rig, Dr. We just need to make sure that what we're applying in our animation right here is an animated version of these rest vectors. So let me just pop out the, I'm just going to open up EpicPen for a second here and kind of diagram out what it is that we're trying to do. So we're going to see up here, we're going to, let me just get my, let me get my little controller over here, and I'm going to select the yellow color, Let's do that. Let's say, okay, so initially what we're getting, let's suppose this is the matrix we're getting out of our rig attribute wrangle. We just have this nice normal matrix, whatever it is. It doesn't matter really where it is oriented, but this is going to be from rig attribute wrangle. So rig, or sorry, rig doctor, rig doctor. So rig doctor is giving us this. What we have done is we modified our axes. So we modify. And we'll just say that our new matrix that we have is something that is kind of oriented in a different way. We know we just picked a different orientation so that we could continue to rotate around the x-axis. Let's say that this is the x-axis in this example right here. And so then what we did was, you know, we know that we're going to be be rotating this around our x-axis, like so. Got that right here. We know that we're going to be rotating around this axis. So we end up doing that rotation. And then the resulting matrix that we end up with, the resulting coordinate system we're left with, is something, let's say, we rotated around this way. So we end up getting a vector that looks like this, maybe. And the x-axis is still sort of aligned like so, because we just did that rotation around here. But all of these, all of these, these are the Y and Z vector kind of rotated around this plane right here. So we've done this, we've done this modification and then we've animated it. So this is the animation. And what we need to do is compute the offset because what we wanna do is we want to rotate this vector right here, the same along the same axis that we did right here. We're going to apply the same difference between this matrix and this matrix to this matrix. And the way that we do that, and this is the part that gets kind of tricky. I wish there was a node that did this or just a little bit easier way to describe like how I'm making this correction right here. But essentially what I'm going to do is I'm going to call this initial matrix our T0, our transform zero matrix. This updated animation matrix is going to be T1, is going to be the updated animation matrix. And then in order to update our, you know, we'll call this one, this is three at transform. Let's call it three at transform. Like so. And so in order to update this, we need to invert one and multiply by the other. So essentially we will wind up with a new vector, or sorry, a new matrix, like so, that has been, you know, say rotated a little bit so that it now has been rotated around this same axis that we had provided like so. So we've done, we've now taken it out of its initial space that we have right here and rotated it in this space that we did right there. So the way that we do that was we can say that our new matrix, so our M new is equal to R, M old, which is this one right here, M old times the inversion. So we have an invert function. So we're going to invert t0 and multiply by t1. So I know that that's kind of a lot, but basically what it is is it's just allowing us to look up a rest in an updated transform and just apply that same animation to our original transform so that it doesn't confuse our bone deform and give us that messed up geo. So let's apply this in a wrangle over here. So what I want to do is throw in our wrangle and we're going to be working on these right here. What I want to do is take in my rest right here. So initially what I thought was maybe we could use the rig doc, like maybe recalculating our transforms using the rig doctor would help us, but I did find that there were, because it is computing the transform fresh using a rig doctor down here, it would actually not really supply us the type of, it wouldn't really supply us the like as accurate of a result as if we just did it ourselves. So like a lot of things in Houdini, if the tool that they made isn't doing exactly what you were hoping it would, there probably is a way around it. So what I did here was we are going to grab our rest. So these are our rest transforms. These are the ones that we want to update. Then we want to update them by the difference between these transforms and these finally animated transforms, which are like so in our setup right here. So if I grab this apply animation trunk, sorry, the fix axis, so this is our new kind of rest for our correction here, and this one is the update. We put that in here. And then in this node, you can see we're sliding, we're not getting sort of, we're not really getting any, any real like updated behavior. We just need to extract those matrices. So let's use the point function to grab those. We're going to say matrix T0. So the first matrix is going to be what's coming in the second input right here. So So that's the fixed axes. That's going to be 0.1. We're grabbing the transform attribute. And we're doing it for every PT9. We got that. And then matrix two, we're just going to copy that line, go on to the second line, and paste it. And this one is going to be matrix T1 is equal to the incoming geo from the third input, so geo2. And then what we want to do is just fix our transform by doing that and doing the inversion that we had shown just a second ago. Did I close epic pen? I think I might have closed it. Nope, here it is. There we go. We're just gonna do this. Basically we're saying our current transform times equals invert t0 times t1. So we just say three at transform. 3-0. 3-0 transform which already exists on our geos, we can just do times equals, invert, t-0, and multiply by t-1. And see, that causes this to kind of get upset, let's see why. cast from matrix to matrix three. Okay. I didn't set up these, I didn't declare these correctly. These are supposed to be matrix threes, not matrix fours. So now you can see after we did that, you can actually see that all of our transforms stay in place, but they're inheriting that rotation that we get from that initial animation that we're doing on our geometry here. So that's kind of coming through. And then, so now if I were to bring this back, we're just going to copy this transform back onto our, onto our jail over here. So we're just going to use a attribute copy. And wire that in here. And we're just going to copy the transform attribute that we had created off to the right and copy it back onto our branches. So if I ignore wind right now, you can see that our rest geometry looks like this, and down here, our updated animation looks like so. And so we've bypassed essentially this messed up axis that we created here to just create a modified version of our original axis. And so when we turn on bone deform and we look at it, you can see that everything's looking good. this transform copy this copy off this attribute copy off, you can see everything's messed up, we turned it on, and it kind of fixes everything because it's getting a more like a more consistent transform. The only other thing we need to do is if we turn on our wind. It's not 100% apparent that that's happening right now if I really crank our wind will find that we're having the same problem here so I'm just going to crank that up pretty high and you can see that. things are starting to kind of fold in on themselves. So we just need to apply this correction again right here where we create our new axes. So this is create wind direction. So when we create our new axes and we update the animation based off of that axis, we just need to do this correction one more time. So I'm gonna alter drag. This is gonna be called the, this is gonna be the compensate. Compensate initial transform. And then this one is going to be Compensate Wind Transform. And all we have to do here is just change what wires in but the same functions would work. So I'm going to take the output of our previous compensation note and wire it into the first input. We're going to take the second input is going to go to the create wind direction and the third input is going to go to the apply wind animation. And then instead of copying this transform attribute back, we're just gonna copy this one back. And now we should have nicely mangled branches that don't look like they're folding inside out and stuff like that. So everything has been corrected there by those two nodes. And that was the part where I was hoping that there was an easier way to do it. Like that Kinefx probably maybe even has a node that can do that, but that's sort of what that was all about. So now that we've got our animation here, you can see our tree kind of grows and then our wind starts becoming applied to it. I think I still have, I may still, yeah, I still have our wind value cranked way too high. Let's just bring the angle back to 0.2. Yeah, and we can kind of just take a look at that. Nice tree geometry being blown around by the branch animation that we just fixed. So that's working nicely. And the next thing that I'd like to do is jump into getting the leaves to do their animation. So the leaves is quite a different situation. I mean, depending on the size of the leaves, if you have long leaves, I think Deb said last week that with the palm tree leaves, it almost looked like they could behave more like branches. That might work. That might actually work. Some leaves that are really long, You may want to actually, you know, kind of treat them as branches and to form them along this way with the noise, maybe applying a different noise to them specifically, but, you know, with groups, we can, you know, choose which branches we want to have this wind taking effect in different ways and stuff like that. But in our example, we're doing packed primitives. So we've got our leaves here. And what I was thinking is, you know, because we have leaves and because we have packed primitives that are coming out of here, we chose pack an instance here. we could actually apply a little bit of rotation to the leaves. I was looking at, when I was looking at leaves, I just thought from a midrange distance, they all just look like they're oscillating back and forth. So I was thinking that we could apply something like that by just modifying the rotation of these leaves. Is it all right with everybody if I just take a moment, just a quick short break? Sure. Yeah, of course. All right, one second. I will be right back. you All right, I'm back. Is everybody able to still see my screen and everything correctly? Yeah. Cool. Cool. Yeah, I'm seeing the comments in the chat about talking about the matrix math a little bit more. I agree. I think that the concepts are so difficult to grasp sometimes. And I don't fully have them myself, but sometimes I do find myself opening up Excel spreadsheets to try and figure out what Houdini is doing under the hood. Because with these transforms, You're multiplying a vector, which is a position vector. Sometimes you're multiplying position vectors by four by four transform matrices. And it doesn't make sense because the math that you were taught in high school about matrix multiplication and stuff like that, you wouldn't be able to multiply a vector three by a four by four matrix. They just don't line up correctly. There aren't the right number of dimensions on each one to be able to kind of deal with that correctly. What I did find is it looks like when we do multiply a position by a four by four matrix, it's sort of taking the position vector and dropping it into that bottom line of a matrix and then multiplying two four by four matrices together. It is rather confusing, but one of the ways I do think about it is kind of like when we invert one matrix and multiply into another, it's almost sort of like calculating a percentage or like, you know, almost like it's almost like calculating a percentage where you would say, you know, if I want to know what 60% of 700 is, I'm going to take 60 divided by 100 and multiply that by 700. So it's essentially like you're inverting to determine a percentage and then multiplying that by multiplying that 700 number to figure out what 60% of 700 is in the same way when we're doing this invert by t0 and multiply by t1. In my head, it's what we're doing is we're almost saying, okay, well, we want to get a percentage offset from this one to this one, and it just so happens to be that using a invert and then multiplying it by the inversion is almost like, I mean, almost like an analogy for dividing and then multiplying by the result we want to achieve. That's not exactly how it works, but that's sort of kind of how I deal with it inside of of my head is using one to invert our self out of one space and then multiply into another. I know that it takes a little bit of pondering, and I don't even know if I fully have that explanation correct, but that's sort of one of the ways I like to think about it when I'm working with this kind of stuff. So over here, when we're working with our packed leaves, what I was thinking We can do a rotation on these leaves. Just give it an oscillation and a rotation. So the way we're going to do that is we're going to modify the prim intrinsics. So like we had over here, we've got transforms and all that stuff. We've got our local transform and everything is kind of provided to us here in our attributes. We can modify those directly. Here on our tree leaves that come out of here, if we look, we see we don't really get any transform attributes here. If I open up an attribute spreadsheet, I'm just going to do that by over here with my mouse on the left over the viewport. I'm going to say alt right bracket, split that in half. And then right here, I'm going to just right click and say inspectors geometry spreadsheet. Over here, we're getting packed primitives out. If we go to the primitives tab and we just hide, let's say hide all attributes, but under intrinsics, we have these, if we say show all intrinsics, we have all these intrinsic attributes that are more or less hidden inside of our geometry that we can extract, modify and put back on our geometry and it's gonna update its rotations and positions, et cetera. So I'm gonna just hide all these real quick. What do we have? We've got a pivot and we've got a transform. And these are really the main attributes that we need in order to be modifying our leaves. And we can see here that if we can just pull this out, modify it and update it, then we can do effectively a nice little rotation on our leaves. So let's just set up the very basic version of that. I'm gonna go down here after the capture proximity. So I'm just gonna bring the capture proximity up above. The reason why I wanna do this after the capture proximity is because I don't wanna introduce a time dependency. We're gonna be feeding noise over here at some point using an attribute transfer. And I don't want to be feeding that noise over or making modifications upstream that are gonna be animated and cause this capture to have to reoccur on a frame by frame basis. It'll really slow down our setup. And that's also why we applied our noise right here after our rest right here because the capturing process that's happening down here. This little green clock that appears on our nodes is where a time dependency has been introduced. You can see that we're managing that by making sure that this time dependency is not happening before the capture, keeping it off to the side right here. So we're gonna do the same over here. I'm gonna just create a node. And because we're working with, we're gonna create a wrangle, so wrangle. And because we're working with prim intranetx, we're gonna set this to a primitive wrangle. Say primitives. And I wanna do a rotation here. and I want to grab the prim intrinsic and rotate it. So there's a function that allows us to extract prim intrinsic and we're going to store that transform in a local variable for the time being. So it's a matrix three M and that's going to be, we're going to use the prim intrinsic function. So prim intrinsic and we open that and you can see that it's looking for the geometry, the intrinsic name and the primitive number when we want to process. Very easy, just the first input. So input zero and transform and then at primdom. And so that's gonna just bring our transform sort of into this wrangle so that we can work with it. And so the next thing I wanna do is do rotation on it. So we're just gonna say rotate M by our angle and axis as we've been doing axis. So, and let's just create an angle and an axis right now. say float angle equals, let's say, right now let's actually, let's say hf angle to create a little slider for it. And then vector axis, we'll just hard code this one to the x axis right now. So 1, 0, 0. And if I turn on the slider and crank this angle, it's not doing anything yet because we've We've got this matrix, we're manipulating the matrix, but we need to write it back into a perm intrinsic warmer done. So we kind of open up the perm intrinsic here, make adjustments, and then rewrite it back out. So right here, the last line is we're going to say set perm intrinsic. And this function is gonna take the five arguments that a lot of the set attribute set group functions do, which is we give it our geometry handle, we tell the name of the attribute that we want to be setting. And we tell it for which primnum we want to be setting. We're going to use our currently processed primnum. And we're going to give it a value, which in our case is M. We just created this matrix, modified it, and we're going to feed that M back in there. And we're going to use the set method. So on the currently processed geometry, geometry zero, we're going to send in transform. We're going to do it for every primnum. And we're going to give it a value of M, that matrix we created, and we're going to use the set method here, like so. And so now you can see that I've got this angle slider right here that is rotating all of our leaves all at once. You know, to kind of make this a little bit easier to see, what I'm gonna do is kind of just come down here and maybe give myself a little bit of room, but I'm going to, let's go back to the camera view just so I can kind of have a nice frame. I'm gonna grab maybe just a couple of leaves over here. So I'm just gonna grab, I'm gonna zoom in over here and grab maybe just two leaves like so, and hit the delete key. And then let's just invert. So I'm gonna say delete none selected. So we can just focus on what's happening with these two leaves to make things a little bit, just a little less chaotic for ourselves. And so now, yeah, we can see here that we've got angle. Now, if I were to type in like a sine function, say sine of at frame times 30, this should give us a little bit of an oscillation in our leaves. You can kind of see them doing that little rotation. Like so. There are a few things that are obviously off about this. First off, they're not rotating around the stem. They're sort of rotating around their, they're sort of rotating around their centroid. And the reason for this is because when the packing occurs inside of this tree leaf generator, it has a, there's a copy of points happening. And the copy of points is packing up the geo and choosing the centroid of the geo as its origin. If we hop in here, you see this big old thing right here. I'm just gonna control F to find a copy to points. And I'll just grab this first copy to points and here we can see what's happening here. This copy to points has a pack an instance turned on and the pivot location is centroid. What we could do is unlock this node and change the pivot location to something like the origin and that would actually fix it for us. But because I didn't want to modify the tree tools until the very end, I just kind of left this and said, maybe we can just update our pivot on our own. So just sort of illustrate where the pivot actually is. We want our pivot. This is our single leaf geometry that we're feeding in. We want our pivot to be right here at the origin. But in our case, the pivot is coming in at the centroid of this geometry. If I say extract centroid, and I wire this into our tree geometry and highlight it. And we'll say, we'll go over detail. And I'm just gonna hit the D key and visualize a larger point size and template this. You can see that that point is right in the middle of our leaf. This is what our pivot is currently set as. We wanna update this on our leaves after they've already sort of been placed. So when we're down here, if I zoom back into our other two leaves, we wanna move this pivot over here. And so there's just another little correction that we can do here to do that. I'm gonna do this again in another wrangle. So we're gonna throw down another wrangle above here. And we're gonna call this one offset pivot. And this one is going to be, we'll call this apply, this will say apply or say leaf animation. You say this is where a leaf animation is occurring. And we just want to offset this pivot. So I'm gonna template the rest here so that we can kind of see where our branches are because it's gonna illustrate another problem that kind of happens. So we can modify the prim intrinsic pivot that we have right here that I'm, I think I have it showing right here. You can see in the geometry spreadsheet we've got intrinsic pivot visible right here. We can modify that directly by using the set prim intrinsic and setting that pivot back to zero. You can see we've got the same pivot on both of these geos. Just let's just hide all intrinsics and that shop material path and just take a look at our pivot. We've got the same pivot for each one of our geos, but we just want that to be set to the origin. So we're going to say set perm intrinsic again here, and we're setting it for the zeroth geometry. The attribute we're setting is pivot, and we're setting it for at primnum. And we're doing, we're setting it just straight up to the origin. So zero, zero, zero vector like so. And we're using this that method. And when I do that, you can see that our leaves jump out a little bit. But if I highlight our leaf animation, you can see that they're, they're actually rotating around the correct, the, at least from the correct pivot location. The axis hasn't been corrected yet, but it looks like they're rotated around the right location. but we need to get these leaves back to where they were. So to do that, we need to kind of compute the difference between whatever position it was we started in and this new updated position that we received from the pivot offset. So we're gonna create a new vector. And this vector is going to store what our old pivot location was. So vector old pivot. And we're gonna set that equal to the prim and transit. we're going to fetch that pivot that we had before we modified it. So we're going to say, perm intrinsic, we're looking for the perm intrinsic on the zeroth input. We're looking for the pivot attribute. And we're looking for it for every at PT number. And in fact, I am doing this in points mode, and that's kind of important for this step, because it seems like it wants to work better when we're working in points mode for this. So here on this set, prim intrinsic, I could use prim num and at PT num interchangeably. I could actually put a PT num down here and everything should still continue to work. So you can see on our leaf animation, we're still are rotating around that correct pivot location. Now we just need to update this. And the way we do that is we take the offset of the old pivot and the new pivot, the new pivot being zero comma zero comma zero, the origin. So essentially we're taking the origin minus our old pivot. And then we are using that as the multiplier on our full transform. So we can update our position by saying that P equals, you know, the difference between the old pivot and the new pivot. In this case, since it's zero, we're just gonna be taking the negative of the old pivot. So negative old pivot. And multiplying this by another function, which is getting the packed transform from that print that we're working on, that packed print that we're working on. So get packed transform of zero and epidemi. And I spelled something wrong. I said, transform, we're gonna transform and a bracket at the end here. And that kind of laps our branches or our leaves back to where they're supposed to be. Now, this is something that actually, This is a task that was much more complicated for me in the previous version of this lesson that I was working with. And so thankfully, I was able to clean this offset pivot up into one node. Also, if you do have mops, a handy, you can use mops to do this instead. So I'm just going to grab mops, and we're going to use the mops align node. And I think if I just throw this in here and we switch over to is it set pivot local set the local pivot to 0 0 0 I think we get the same result so yeah mops mops pivot if this if this is if this is confusing for you is I think it might be for me and many other people and you do have mops handy you can just reset that pivot by using the mops node like so so that's pretty easy I'm going to just use I'm going to use this one because it's the way I currently have my setup setup, but Mops is there to help with a lot of this primatrinsic stuff, and this packed primitive manipulation stuff to. And Houdini school I believe has a course coming out on Mops pretty soon with Henry. Grace. All right, so now that we have our leaves sort of animating, what I want to do is introduce our, bring our noise back over here and allow our noise to drive this leaf animation that we are working on right here. So I'm going to use chops to create our oscillation signal that we're going to use to modify our leaf flutter and we're going to use the noise to kind of drive that oscillation value using chops as well. So we're going to need to grab our noise that we're using over here. So I want to grab this right after we apply our contrast. We're just going to do an attribute transfer. So let's just transfer this over here. So attribute transfer. And we can go right after capture proximity. And this is why I listen to the second input. And then and then why this here. And we're going to be grabbing our noise. And so we're getting our noise on our leaves. We can't really, we don't really see that noise on our packed prims, but it's there. If we go over to our points and we say view, let's say, hide all attributes and view noise, you can see our animated noise values are coming in from this stream. And so we wanna use them in a chop network that we're going to allow to kind of drive this oscillation. So I'm going to, let's see here, I'm going to, first off, I'm gonna actually throw it on a switch right here. So I can easily switch between using, showing all of our leaves and just the two test leaves that we're working on right here. So I'm just gonna drop that down here. and wire this in and reverse it and set this to one. So when we're on one on our switch, we're just looking at our two individual leaves here. And the next thing that we want to do is, let's just bring this down a little bit. Right here, we're going to create a new oscillation attribute that we're going to feed back out into our animation right here. So I'm gonna throw down, I'm gonna create a chop net. And this is similar to like, I think I learned this method of creating a chop net off of CGWiki, but basically we're gonna create a null, send it into chops, and then create a channel, a channel SOP to extract those channels out of our CHOP network. So first thing is a null, and we're gonna call this two SOP, or two CHOPs. So, and then we need a channel wrangle. This is gonna be used to fetch our channels from CHOPs, and we need a CHOPnet. This is going to be where all the magic happens for this part. So on our channel wrangle right here, sorry not channel wrangle, just our channel, we're going to be grabbing, let's say we want to do an animated, we want our setup to be animated, and we want to grab our, we want to feed through our noise attribute. So noise is coming through like so. And over here in ChopNet, we create a geometry to fetch those, to fetch those attributes. So geometry right here. And this is also another static one. The attribute scope is going to be noise. And we're gonna feed this back out to another null. Oops, I also need to change my rename scope up here to noise and it needs to be animated. So this is very, this just needs to kind of mimic what we had going on outside. I'm actually going to do the thing where we get the quad view going on here. So I'm going to alt right bracket on this side, alt right bracket on this side. I'm gonna say alt three up here to turn this into a parameter view, alt two down here to turn this into a network view, pin this to one and this to one. One and two and two. And stop in here and over here, let's just go up. right. And then bring this down in this null. I'm going to call this null to be two sops. So you can see here on our channel, we have animated channel scope is noise attribute scope is noise over here to sops we've got our sorry on our geometry we've got animated attribute scope rename scope is noise as well. So that should all be flowing through correctly. And we just look and see what this error is giving us right here saying invalid input chop. Okay, That's because I need to link these up. So over here on our geometry, we want to fetch a sock. That's the one that goes to chops. And then over here, we want to get the result from chops. And that's going to be putting this two sops in all into the chop that we want to be looking up into. And it needs to think a little bit. But then eventually we should be getting that noise and attribute fed back out here. And so now if I, over here by my geometry spreadsheet, I'm just going to click a plus and create a new viewer so we can see our motion effects view. You can see that what's happening is our, our chop network is correctly reading in this noise attribute and giving us the full animation timeline of what this noise attribute that we created way back over here. It's kind of, it's giving us this whole noise attribute as a chart that we can now manipulate and shape the way we would like to. So this whole noise is sort of corresponding to this. I'm just going to hit this button so we can see where our timeline is right now. We can kind of see that, yeah, this is the noise that we created. We got this big blue dip coming through here. And then this big, this really heavy one up here. You can see that that's sort of what these limits are kind of reaching their max and min values based off of this incoming attribute that we're creating. So now that we have this in chops, I just want to do a little bit of shaping. We've got all sorts of tools for shaping this graph. And this is a lot of why I'm only using two leaves right now is because if I turn on all the leaves, this is going to just look like a cluttered mess. There's going to be like thousands of charts all over on top of one another and overlaying one another. And it'll be really hard to see what we're doing. So working on just a couple of leaves right now will make things a little bit easier for us. But so suppose that we wanted to use this noise to now adjust the values of some oscillator that would kind of modulate its frequency based off of the amplitude of this noise that is coming in. We can use, and there's actually a node that is designed just for this, and it's called the oscillator. So the oscillator, well, actually, if I wire this in here and we highlight it, and I'm gonna just, you can see our oscillator has kind of created this much noisier pattern right here. And its base frequency is set to 440, which is actually rather like 440 Hertz, I think is like might be middle C. It's a very much higher tone in the spectrum than we want to work with. We're working with slow fluttering. So I'm going to just bring this base frequency down to something like one. So you can kind of see that we get a nice sine wave here. And that's being determined by this sign. You can choose different waveforms, triangles, ramps, stuff like that. We're just going to use sine. But you can see that the frequency of this sine wave is changing based off of the amplitude of this noise. So that would be like a complicate for a faster flapping as that wind gust is coming through. So if I can actually accentuate this effect by adjusting units per octave, units per octave is actually just like, well, tell us how many, I think it's how many the amount, yeah, it's right here on the tip, the amount the pitch control needs to increase and raise the pitch by one octave. So I think an octave is doubling in frequency, if I remember correctly. So if I crank down the units per octave, you can see that as that noise increases, we're getting a much more drastic change in our frequency here. A value that I thought worked out good for me was actually a 0.5. So I'm just going to leave that at 0.5. You can see that we're getting this nice flutter and that the flutter is increasing as that noise increases. And before we go into doing too much more shaping with this, I just want to get this oscillation that we're creating back out. So essentially, if we wire this in right here and we kind of look at the info on here, you can see that we've got two noise channels coming in, one for each of our leaps. And that noise channel is actually set to this new oscillation that we've created right here. What I would like to do is actually apply some decay to our noise and then refeed it back into the other side of our setup where we are actually doing our branch animation to kind of allow the wind gusts to come, but then have them allow them to die off a little bit slower. And so I'm actually going to want to output the oscillation channels and the noise channels at the same time. So we're So we're gonna be fetching two, we're gonna be creating basically a new attribute in here and outputting that oscillation in addition to what we already had. So to do that, we'll just use a rename. I'm just gonna rename this, oscillation that's coming out. And we're just going to wire that out. And instead of renaming, you can see we've got from star to blank because we have these noise attributes here. And when we have all of our leaves in here, we're gonna have noise one, two, three, all the way up to thousands of leaves, however many leaves we have. And we can just use a wild card to do this renaming. So we're gonna rename every channel that has noise in it, and then we wild card it. So every, you know, it doesn't matter what number comes after noise, it's gonna be replaced. We're gonna rename from noise to ask. And we just put a little star there to help as well. And if I look at this, you can see we've got ask zero and ask one now, ask is for oscillator. Now if we merge, and we merge in our original setup right here, and we look at our info, you can see we're getting out OSC0 and OSC1 and noise0 and noise1. And these are all coming out and going over to our setup over here. So now if I look at our channel, channel, we need to actually specify that we're gonna be pulling out the oscillation value here because we haven't scoped it here. So let's just write that in, ask. And the attribute scope is ask. So we're gonna be rewriting the channels called ask into an attribute called ask. And it gets upset with this because we don't have an ask attribute already existing on our geometry. So the way I fix this is I just create an attribute, create right above. And I'm just gonna initialize the ask attribute to zero. I don't really, it doesn't, you know, it just needs to exist on the geo in order for it to be picked up out of traps. But now if I move back over to the geometry spreadsheet, you can see we get our noise values coming through animated and our OSC values are updating, they're fluctuating between negative one and one. And so now down on our leaf animation, I could go in here and grab our, let's say we want to, I just wanna see what I, I think that, Yeah, what I ended up doing here is just multiplying this angle that we create here by that ask attribute that we create. So let's say angle times f at ask. So, now we don't need this angle sign function that we're doing down here. I'm just going to control shift. Click that to reset it and we'll just set it to an angle about the amplitude. This is really more of an amplitude now. In fact, I mean I could change that but I'll just leave it at an angle right now. And then let's change it. Let's go up here. I'm gonna say edit parameter interface, grab angle, change it to amp and call this amplitude. Apply an accept. And then up here, I'm gonna say amplitude. Amp. So now if I zoom in to our leaves, where are they right here? We should be getting that rotation. And the reason why we're not getting any rotation, you can see the attributes are here, But right now we're working on primitives. So we just need to promote this oscillation attribute to a primitive. So say attributePrimote. And we're gonna promote the ask attribute to primitive. And now if we look at our leaf animation, is it doing it? I'm not seeing it. Let's see here. On ask, that's coming through. I think your amplitude still has zero. There you go. Thank you. Set that to 0.5. And you can see our leaves are oscillating based off of that. And you can see the speed of that oscillation is increasing as that noise value gets adjusted. So if I look at our motion effect view, you can kind of view that noise is increasing, and then they start fluttering faster. and so on and so forth. This is stuttering quite a bit and I'm not quite sure why. I'm just gonna look at my CPU right now. Looks like Zoom's using a lot of resources. I'm not sure. Either way, it's not unbearable, but you can kind of see that that's sort of the effect that this is having here. But what I wanna do is actually kind of make some adjustments to this. I don't, I not only want the frequency to modulate based off of that noise value, I want the amplitude as well. So I'm going to kind of let's do a little bit of work to smooth out our noise that's coming in. So I'm just going to look at this. Let's see, we've got these sort of like hard caps on our noise value that we can kind of filter off. So I'm just going to throw in a filter right here. And we'll just wire that in. And if I grab this filter and show that, let me just pick a more visible color, like yellow. You see that we can actually kind of shape this. We can shape this so that these, we don't get these hard edges where it kind of slams into its max and min values. We can kind of like roll those off a little bit. So I'm just going to, one second, check. I wanna check and see what I ended up setting this to because these values are really touchy. But this overall effect working in chops is pretty touchy. I just wanna make sure that I'm being consistent with my example file. So yeah, I think I set this to about a value of about 0.6, something like that. Seem to smooth out that noise nicely. So the other thing that we could do is we could actually kind of use this noise amount to multiply against our oscillation value to change the amplitude of our oscillation value as well as our frequency. So we can use a math note for that. And if I throw this math node down, we can bring in our noise into the second input. The second here, and then we can choose the operation as combined chops we can set to multiply. And here you can see that the actual amplitude is now fit under the envelope of our previous noise that we're feeding through here, which is kind of nice. So we can kind of adjust how intensely these leaves are flapping around based off of this amplitude. But it's a little bit intense. If we're watching this, we can kind of see that our leaf animation really dies off quite bit, it becomes almost still during these little valleys in our animation. So I want to actually just kind of refit this noise that we're supplying. I just want to refit that a little bit. And I also want to make it so that this noise kind of dies off a little bit slower. So we can do a couple things. First thing I'm going to do is I'm going to kind of lag. I'm going to put a lag here. So or sorry, I'm going to do another math node. And I'm just going to use this math node as a fit range to modify how low this amplitude is allowed to go. So let's go over to the range column here and I'm just going to set the, we know it's ranging from zero to one, that's good because everything's been normalized and we've done a good job of maintaining things on a zero to one scale. I'm just going to set this to point four. You can see that now that just brings the, you know, that brings the floor up of how low this noise level can get. The other thing I wanted to do is just smooth this out a little bit. So I'm gonna throw in a lag. And what the lag is gonna do is it's actually gonna allow these animations to kind of die off. When I see a gust of wind, I feel like the gust comes on really quickly, but then it takes a little while for it to decay off. It doesn't just, the slope doesn't just drop like this. So I wanna allow for that wind to accelerate very fast, but I don't want it to be able to die off as fast. So we can solve this with a lag. So I'm just gonna grab this lag right here and we're gonna look at, let's look at our, let's combine our previous filter and our current lag. So I'm doing this by clicking these on and off. Every time you click one of these, it changes your display flag and adds it to your setup. But if you control click on one of these, you can just see one of your chops graphs at a time. So I'm gonna just bring in our previous one and our current lag. And we're just going to kind of look at what effect we have on this. We want to have like a nice, kind of like a more of a slope on our onset of our gust and have it decay longer. We can just adjust this lag out value. Do you see if I adjust that? It actually makes it decay a lot slower. So I'll set this to something like 0.5. And then we'll actually, sorry, I'm going to set this something like 5. And then what we'll do is on the onset, on the left-hand side, we're actually gonna just increase this to a value of about 0.5. So you can see that we've sort of like taken our noise situation and allowed like it to die off slowly, and then a gust happens and then it dies off slowly, and another gust happens and it kind of just dies off slowly like that. So we can actually use this now as the, this will now be what is driving our oscillation we look at it and kind of see it fit underneath this new kind of like lagged out noise that we've created here. And so now if we kind of go and look at it, it's sort of hard to see this right now when we're only looking at our two leaves. And so what I'd like to do is actually maybe just grab a few more leaves. Oops, how did I get up there? Let's go up to this. this. If we're looking at our two leaves, I kind of want to see a few more leaves at this point. So let's just grab, let's maybe go up to here where we created our, where we actually blasted out our branches. I'm just going to create a few, I'm just going to grab a few more. So instead of just two, I might go over to this section nearby and just hit the S key and select a few leaves and hit the delete key. And we'll just use this as I'm going to hit the escape key and just wire this so that it's another input on our switch. This just makes it a little bit easier to kind of art direct the little tiny chunks of leaves instead of dealing with the whole thing. Now this is trying to recalculate this motion of X view. I'm just going to turn that off first. I'm just going to move away from the geometry spreadsheet, move away from the motion of X view to the geometry spreadsheet so that it doesn't like try and work on that graph just yet. And I highlight this, delete non-selected. You can see we've got our leaves here. And so now if I go down to our leaf animation, we should see all of these leaves sort of behaving in unison. And did I, yeah, I got to switch my switch, switch to switch input two. And it does take a little bit to cook through the, through the chop net. And that's just something you kind of have to wait for, because it just needs to, it needs to like, you know, basically cook through the entire timeline, every time it does it, I'm getting a error here. Let's see channel noise zero not found. Hmm. It looks like this here. This is a it's saying it's not finding the noise attribute but I see that we do have a noise. We have noise to here. Not sure what's going on there. Let me, let's, let's try this. Let's just get rid of a couple of these leaves and see if it recooks correctly. No. Okay, let me just try switching this back to our two leaf setup and see if it likes that one because it was just working a moment ago. And it seems like it likes that I'm not exactly sure why it's going to be okay with. I'm not exactly sure why it's going to be okay with our, our two leaf setup here but not with a larger trunk let's see if just switching this back is going to make it work out okay. And that is going to be a crash. I'm pretty sure. Yeah, for sure. So I have another copy of Fudini open because I thought this would happen. This is something that kind of happens when you're working in shops a little bit as you get it does need some love. It's an older system. It's very cool, but it does. It could use some updates and some stability. So I'm going to open up the project fire we're just done. So let's go to, let's go here and I think this is the lesson recording file today and open that up. Hopefully whatever was going on with that crash was what was responsible for that channel stop not working correctly. I'm hoping that that's the case because I haven't run into that one before. But you do kind of run into little weirdnesses with chops every from time to time. I think it was because it is working for me right now. Is it cool. Yeah, yeah, Nice. And my setup is just cooking real quick here. So. All right, so I've got my little chunk of leaves here and we're just going to turn on the leaf animation. Oh, and everything is moving so much smoother. So whatever was going on in Houdini now when I click play, it's all everything is just playing back nice and nice and nice and fast for us. Cool. So now that we've kind of got that going on, let's just kind of see what it's doing along with our animated branches as well. So I'm gonna go down to the bone deformer here and we're going to, I'm gonna just template the animated skeleton underneath so we can kind of observe how these leaves look like they're behaving along with the motion of our tree. There's a couple of things we need to fix. First off, all the leaves are sort of animating in unison with one another. I'm going to just disable the growth animation for it now. I'm just going to grab those four nodes and disable them. So all the leaves are flapping in unison. And they start flapping as our tree takes that gust. That's nice. But they're also all oscillating around the same axis. So we'd set that x-axis that they're all rotating around. You can see that these leaves at the end here, if I just go back over here, these leaves all sort of rotating around the world x axis and we kind of want to get them to rotate around their local x axis. So let's actually just make a little bit of an adjustment to our leaf animation here. So where we're saying vector axis, we're just going to use that matrix notation that we did before. So we've got our matrix, and we're just going to set our axis equal to m set m dot m dot xx m dot x y m dot x z. That's the battleship method of locating your vector values out of a a matrix. And now if we play them, you can see that those leaves are actually flapping kind of, you know, perpendicular to their stem. So if we kind of look at it, sorry, Mark, can you hit control plus on your? Oh, yeah, the new version of the new copy of Houdini. Yeah, one sec, control plus plus plus plus. There we go. That better? So I think that's great. Cool. So yeah, I just did this, what I like to call the battleship method of whatever, finding the components of the matrix that we want to extract a vector from. So our x-axis is now kind of, our x-axis from that matrix is now what we're gonna be using. And you can see that these leaves are now flapping up and down about the axis perpendicular to their stem. So we kind of fixed that. The other thing we want to fix is that these leaves all appear to kind of be flapping at the same time. I mean, it might not be 100% obvious, but you know when you get really close, you can kind of see like it looks like clusters of leaves are all kind of flapping at the same time. And so we can use a little offsetting in in our trap net to kind of combat that a little bit. So I'm going to switch back to our I'm going to switch back to our quad view as quickly as I can. So I'm just going to click this and I'm going to do alt right bracket here. Alt right bracket here. And then this is going to be two and three up here. I'm going to pin one, two. Actually, this is two and this is one and this is two. And I'm just going to dive into the chopper here. I also want my geometry spreadsheet back up and my motion effects view. So I'm going to alt-right bracket this and we're going to choose the motion effects view and the geometry spreadsheet. So where's that? Inspectors geometry spreadsheet. So over here on our motion effects view, you can see we get this nice busy graph of all these data points overlaid over one another. And what we want to do is actually just do a little bit of an offset. So these noises are not just like right on top of each other and mimicking one another, but we actually have a little bit of a variation between them. So I'm going to just bring this down and I'm doing this right after the, oh, I can do it right before the math note, I suppose, doesn't really, actually might matter. I'd like to, if we do this before the math node, then the modulation we're doing with this amplitude is going to not be affected by our time shift. So that'll kind of to keep things a little bit more organized. But I just throw down a shift here. So the shift, I wire that in like so. And then we're going to just use this scroll offset will allow us to time shift all of these channels. And we can do it on a per channel basis by just doing a random variable and seeding it with the channel number that we're on. So we just do that with $rand, $c is the special little local variable we got to remember to do that. So if I do that and click, you can see it offsets all those graphs at once. And if I zoom into our, if I zoom into our, see where we, by zoom into our leaf animation, you can see that now all of those leaf animations look like they are very much offset from one another. And it just, it just enough to sell the fact that they're all like fluttering independently of one another like so. Cool. So what you can see those at the beginning, they're all kind of frozen a little bit. And we're probably not going to see that because we're going to be animating our tree on during this first couple frames. But if you did want to kind of, you know, if you did want to adjust that, you could throw down like a extend. And extend works just kind of like cycle post offset functions do in 3D software where you can, you know, make the left behavior of your graph kind of cycle based off of what you already had. And you might see a little bit of a jump in your animation here, but honestly, we're not gonna see it, but you could, if you did see like kind of an obnoxious little like glitch in your animation, the first couple of frames, you could smooth that out if you wanted to, but I'm just gonna leave it like that for right now. So we'll just have it set to cycle. Other options you could use, I'm just gonna pin this. I keep getting popped into my, it keeps popping me out to my grid, my psych view, and I don't want that. So I'm just gonna pin my leaf animation view over here. So we've got this going on. And the next thing I wanted to do is, let's just take a look at what all of this sort of looks like with our leaf or a branch animation that we have going on as well. So I'm gonna kind of merge these two together. And let's actually switch back to, no, yeah, we'll just continue looking at this smaller chunk of leaves for right now and just kind of back out. And I'm going to just run a little bit of a flip book. So I'm just gonna bring this down and run a flip book. So you can see, I'm just kind of looping it as it plays back. You can see that our leaves have like a little bit of a flutter. And then around frame like, around frame 96, we're gonna get like a larger gust that comes through and is gonna really pick up the amplitude on that leaf flutter. You can see it's coming. It's starting to build up to it. And we should start to see a big gust come through. And what's happening is this is the next thing that I kind of wanna solve for is that that big gust comes through. And it causes these leaves to flutter, but the leaf flutter kind of happens after the big gust occurs. And when I was looking at these kinds of things, it actually seems like that leaf gust is sort of, the leaf flutter kind of anticipates the gusts that really pushes the branches. I think that the leaves start fluttering a little bit before the branches start doing their thing. So I think to kind of make this feel a little bit more consistent, we could provide a little bit of a time offset the noise and feed that back over to the branch side to allow the branches to let the leaves flutter a little bit before they take off and do their crazy bending around. So let's just, I'm going to just close down this play blast that we have right here and let's just do a little bit of some modifications on the right hand side here where we're messing with our noise. We haven't messed with our noise at all, but what I want to do here is actually kind of get another lag that's similar to what we had going on on the other side. So I'm going to let's just hop up here. I'm going to switch to input two so that we're back to the two leaves setup. And we'll just take a look at those charts. It's just easier to see those graphs a little bit better when there's only a couple on top of each other. So if we go into our chop net, we could view our our lag of our noise. So we've got our noise coming right here. I might just allow the leaf flex, the branch lag to kind of come back down a little bit quicker. So let's just, this is gonna be the new noise that we feed over to our branch. Just gonna dial this back down to a value of three. So those kind of, we had our leaves, our leaves flutter kind of dies off a little bit slower then the branches flexing will. So we're gonna kind of do that. We're gonna modify that lag a little bit. And then the next thing I wanna do is shift it. So let's throw down a shift. And I like to look at these two with each other. So we've got our OSC right here. And I'll just grab, let's go ahead and turn off these two and look at our shift. So I want to push this noise that we're creating back in time a little bit. I can just use the scroll offset. So if I push this scroll offset off to the right, it will basically, let's just set it off to a value of about 0.5. This will allow the amplitude to pick up and the frequency to start picking up in our leaves before the bending of our branches occurs. You can kind of see that it's just trailing behind it a little bit. And then what I might do is, if there is any kind of off value over here, I'm just gonna throw down another one of these extends to kind of just make sure that everything's cool here. Now, this extend is set to cycle. I'm just gonna set it to mirror just so that it kind of keeps things a little bit more smoother on that extension point. And then we'll just merge this back in instead. So now we have this updated noise value. We need to apply it back to our branches out here in SOPs. So I'm gonna just bring these over. Let's bring this one up. So we've got this stuff coming out of the channel. We just need to, I'm just going to attribute transfer the noise back over here before we do the wind animation. So let's just run an attribute transfer. Over here, I'll just put it above fixed axes, let's say. And so our noise is kind of going to take a detour, come and do all this stuff and then come back and get updated right here. So if I, and this does look a little bit sloppy, I guess if I grab all these and all these, except for those and kind of bring this all down, that might be a little bit, I don't know, upward, streams that go upwards kind of bother me sometimes. So I might make space for it like this. I don't know, it all ends up working at the end of the day. So now if I actually transfer back onto our branches, this new noise that we created on the left. And let's visualize that. So we're over here. I might just increase the distance threshold to like 20 or something just to really make sure that it's encompassing our whole tree. And let's look at what our noise values are doing over here. We can see before the attribute transfer, we can see lots of noise values passing through and changing quite abruptly. And now after we apply this, you can kind of see that noise is changing much more gradually. Not seeing it change it. Yeah, you can see like a gust will come on quickly and then it'll take a little bit longer to fade off. Just gonna check and see what effect that's having on our branches. Let's look at the wind animation. So yeah, you can kind of see it. It has a kind of mellow that out. There we get that big gust and it kind of everything just kind of fades down a little bit slower. I'm just going to check out what our leg is doing. Yeah, cool. And to see this really kind of, it really kind of come together when we kind of see it with the leaves as well. So at this point, let's just turn on all of our leaves, let them process through this chop setup and see what it looks like when we bring them all together. So I'm going to grab this and oops, I'm going to switch it to, I'm going to switch away from my motion effects view because I'm superstitious about having it up when I have thousands of leaves being grafted to it. And then switch the switch to zero. And it's going to just take a little bit to, you know, kind of cook through that channel, that chop net. And we may have another crash. I don't know. to see. Hopefully we'll get lucky. I've got another copy of Houdini waiting for me in case anything goes wrong. Okay, we've got progress down here. We've moved to 25 seconds. That's good. And this is where I open up my task manager and just kind of look at it and see if the CPU value is changing and the memory value is changing. Usually that means to me that progress is being made somewhere in there, hopefully. All right, and we got a crash. I had a feeling that might happen. It seemed like it was taken a a little bit long. So let's just open that back up. Is it in my recent files? Let's see. Yeah, it is. Thank goodness for one minute auto saves in Houdini. Everybody hanging in there okay. If I lost anybody. No, that was great. Cool. This should really be once this opens back up this should really be like what the setup is for the this this is I thought I think that was the final step that I needed to take to get this. to take to get this to kind of do the thing. Let's see here, I've got this set. I'm gonna just go up here. Let's switch this back to input zero. We are transferring our noise back. That's good. And I'm gonna, let's just for right now, let's turn back on our growth animation and everything. And let's just come down to the bottom here where our tree animation is happening and just let it kind of cook through that. Hopefully it doesn't have as hard of a time as it did last time. So here we got it. It's growing and as far as I can tell, it looks like, yep, the leaves are fluttering, so everything's there. Let's just flip book this. I'm just gonna switch back to our camera view and we can kind of see it all happening at once. Yep, crashes, so crashes with, crashes with chops are inevitable. I really love that system and I hope that someday it gets like a refresh because honestly, I feel like there are some things that are just easier done in chops. When I was originally doing this course, I tried to build the solver to do this, where I was integrating time and all sorts of stuff like that to advance through the sign function at different rates of speed. So you basically have to integrate time and having that run in a solver and not being able to visually see it playing back in, or visually see a chart for me. I'm a very much a graph person. Not being able to see that graph, I found super challenging. So I ended up at one point even taking a single point and graphing it in the viewport to try and rebuild more or less a solver version of CHOPs in the viewport to see how my frequency was changing over time. So I just kind of like picked an axis and said, all right, cool. Now we run the solver, you advance the point over very small increment and then draw a polyline that more or less represents what we would be getting out of CHOPs. Eventually that just got so tiresome and it just was a pain to deal with so I ended up just ditching it and going for the chop setup because you do when it is working you get that graph that is updating you can see the oscillations you can see the offsetting that you're doing and you can more or less composite those graphs together and I really thought that that was just like the way to go for this. So even though it does crash sometimes it just is really good for graphic for graph-minded people who do like if you're doing motion design based in like graphs and stuff like that, CHOPS is really handy for that kind of thing. So now the growth of our tree is coming up and you can see that there's a little bit of mild flutter but then when this first gust starts to come in around frame 96, you can see that these leaves anticipate a little bit and start picking up their flutter as that gust starts to happen. They kind of increase and get pushed out of the way. So that's sort of the basis of the wind setup. And it's not, it's obviously it's, it's really kind of, there's probably a lot of tweaking that would need to be done to, you know, adapt this to like maybe a very different leaf shape. You might want to use a totally different method of applying noise. I just thought that it was nice to kind of see that kind of thing. I've used noises to chop space noises to mess around with creating custom like kind of wind gust-like behavior before we did a project at my work. I think I have it up here. I'm just going to pull up my pull up the website real quick. And if I refresh already been chewed website this is where I work. We did a project with glue Vuitton and these flowers right here where I did a chop space wind system that I was driving these flower petals with. So kind of like instead of just using your regular old pop wind, we were doing it, we were applying emotion effects to like an overall amplitude to kind of like create larger gusts within a finer noise field to kind of get that fluttering like effect for some of those flower petals. So chops is really handy to use sometimes for sure. And our playblast is almost done here. And you can see that, yeah, we get that fluttering as it kind of pushes our leaves around and they kind of die off a little bit. And yeah, so that is the basis of that, the simple sort of rig setup. I call it simple because we'll look at the more advanced example just in a second here. But, you know, using this level based system where or we're parenting our rig to the child. We're assuming that our parent branch levels, we're assuming that each, that our parent branches are based off of what level they're on. And so now when I did my other example with the, when we're modifying, let's see if I pull it up over here. In this other example, where we're using our custom tree branch placement, we're gonna be making different assumptions about how this was, about how we're gonna be doing this parenting setup. So I do wanna do it live. It will probably go over a little bit, but if you can hang around, that'd be awesome. And I can kinda show you how I built that other setup by just modifying what we have right here. So we've got our win setup. We're not really gonna worry about that right now. For now, I just wanna jump up and save this as a different file because this is sort of like the base rig. And then now that we're gonna make a modification to the labs tree tools, I just kind of wanna save this off into new files. So I'm gonna save this for save file, save. And then we're gonna say file save as, and I'm just gonna call this lesson three, lesson three custom. At this point, I would definitely say like save a new file. This is, we're gonna be drastically sort of changing things here. I'm gonna just have this grab my old cache file. Actually, it's not gonna matter, cause we're modifying this. So I'm not even gonna worry about what this cache is doing. Just gonna untick load from the disk and hit escape and hop up to the top here. Up to where our branch generators are. So let's start with our trunk generator. And we're gonna do the two things that we kind of, I kind of mentioned to avoid in our first lesson, which is we're gonna use, we're gonna place branches on different levels and we're gonna use the custom tree branch placer. So let's just over here on our tree trunk generator, I'm gonna just, let's just disconnect the rest of our tree for right now. And I'm gonna just put in a, let's say a curve. And it's cool because the tree trunk generator takes a curve. You can actually draw a curve and have it be the profile of your trunk. So I'm gonna switch to, let's see, spacebar, I'm hitting spacebar three and let's grab the manipulator for the curve tool and I'll just draw like a nice trunk that I would like to have like so. And then if I turn on the trunk generator, let's see, I think I might be in, let's see what happened here. Spacebar one, what are we doing? What's going on here? Our curve. I think I drew way too small of a curve. I'm going to go back out to my camera view right here. Yeah, it's so small that it's just, it looks ridiculous. So let's just undo that and reset operations here. And I'm just going to draw from this viewport. Think it'll be good enough. Just going to draw my custom trunk like so. And let's check that out. That's looking a little bit better. One thing that you might note is that the orientation at the bottom kind of gets a little bit messed up. I would just at this point kind of grab the anchor here. And if I do switch into side view and kind of look at it, if I grab the handle here, I'll just like align this handle with the grid. So I just turn on grid snapping over here and I'm just gonna snap this handle to somewhere on the grid. And you can see that that really just orients the bottom of this pretty good. If I switch to maybe the other side view, there might be a little bit off. I'm not sure. It seems like it gets it pretty good. Any little extra discrepancy down here, you just push it into the floor and you'll be good to go. So that's sort of a custom, this is sort of a custom trunk that we're supplying, but suppose we wanna have this branch off and give it our own little kind of branch going off to the side. This is where the tree branch placer comes in. Branch placer. And we're gonna do a similar operation here. We're just gonna draw and occur where we want. we want another branch coming off to the right right here or something like that. So I'll throw on a curve and wire that right here and I'm actually uh yeah let's wire that into this furthest right hand point of the branch placer and I'm going to draw starting from the trunk away from the trunk otherwise it'll get kind of backed up and confused. So if I do that and highlight this you can see the tree branch placer by default rotates it. If I go to the draw on branches tab and just set the angle and roll back to zero. We kind of get that back to where it was. And then it started using the viewer state thing to place branches. I don't want to place any branches right now. I'm just going to leave that. And then, yeah, suppose now we want to just generate branches on here. I could grab a couple of these and throw them down. Let's just do this first generation right here. You can see that the tree branch generator is generating branches that are only on this branch level that we created right here, the second level, this first level rather. And I want these branches to continue to be spawned off of the trunk because I'm almost treating the trunk like a branch in itself, even though it's kind of extending off to the left here. So if I go to the tree branch generator and say branch on level zero and on level one, then we can kind of see that our branches are kind of growing off in all these different directions. you know, accompanying their, accompanying that geo. Let's, we've got a branch that's growing into the ground here. I'm just going to go to the, maybe the pruning settings under general prune and just prune by downward facing angle and stuff like that. This is just for demonstration purposes and everything, but I'm going to just bring back the length of the generated branches a little bit as well. And so from here. Now, when I was testing this, I'm just going to get rid of this third branch generator real quick. If I just wire this into our splines and we can kind of see what our rig does with this information. If we go down here to our point where we're doing the, the attached joints operation, you can see that we get all these lines kind of going off in all these different directions. And if we go all the way down to our animation. Well, it seems that it gets, oh, it gets upset because I think that it's trying to do something with let's just, I'm going to bypass this noise transfer so we don't have to worry about what's going on in shops over here. Because we've totally kind of, we've got to, we don't have like a successful tree over on this side to be even be processing at this point. But right here, if we get onto our trunk animation, and I'm just gonna hit this select key, and we just kinda look at what it's doing, you can see our trunk kinda comes up, all these branches have a really random long polygon, a polyline that's attached to the second branch level. And it's just, maybe these are working out okay over here, but this is just not working out right on the left-hand side. And so what I thought to do was just, Let's look at the attributes that are coming out of here. What we had done before was we were making our branching parent-child relationships based off of what branching level they were at. We've changed that now. We're now supplying branches to any branching level that we want to. My thought was that what we could do is actually apply our, adjust our rig to actually track which branch ID is the parent of any given branch. So I've got a little diagram here that I'm gonna do in Photoshop this time because I epic pen, I just wanted to copy and paste this diagram that I drew last week. So last week we were creating branching levels and these were all sort of, we were making assumptions saying that like, level two can only connect to level one, level one can only connect to level zero. Well, now we need to actually track the parents. So let's just kind of make another little diagram over here. And I'm just gonna grab the brush and let's go to this new layer here. And I'm just gonna draw that from scratch. Just add a little plus here. And so now this is what we've got for a tree. We've got level one right here. And then level two is actually this branch coming off to the right that we just drew. And now the next generation of branches that we have, which is level three, is going to be branching off of both the level zero, the trunk, and this level two. So we've kind of broken this sort of assumption that we're making right here. This is not happening anymore. So what we can do is we do have branch IDs. So if we do kind of look, we can say, we know this is going to be branch ID zero. This main trunk is going to be branch ID zero. And this is going to be branch ID one. At least it should be. We've placed a branch here. should be branch ID one and so on and so forth. And then when we scattered, more or less, inside the tree tools, it's doing a scatter operation. So at some point, this branch is gonna know that its parent is supposed to be one, and this branch is gonna know that it was scattered on branch ID zero. So we'll have branch IDs for all of these branches. This will be like two and three, four, five, six, so on and so forth. So all of these branches, we're just going to track what branch it was scattered on and build its ID, its parent ID attribute accordingly. So we're going to use a, we're going to say, we're going to have a parent ID. And we're going to use that parent ID to set our valid attachment groups and name our valid attachment groups based off of what the branch ID value is for any given parent ID. ID. So for example, branch seven right here, we know its parent ID is branch ID one equals branch ID. And we know that for, for example, right here, its parent ID is equal to branch ID zero, this one, because it's attaching to it's, we know that it was scattered on this and on the trunk. So let's go and check out what we got going on in our labs tree tools that we can modify to create this type of behavior. Cool. So let's first look at what the tree branch placer itself does. I'm going to pull back up my geometry spreadsheet, alt-right bracket, and then alt-8. And if we go and look here, we can see we've got branch ID. We should have at this point branch ID, 0 and 1. If I go and visualize our branch IDs, we can see here that we run into our first problem. The first problem is that we don't have two different branch IDs. We've got two different levels. We've got a branch level 0 and a branch level 1 if we scroll through our spreadsheet. But for whatever reason, True Branch Placer doesn't have, it wasn't set up to create its own branch ID that we could use in this setup. So what we need to do is we need to do that ourselves. So I'm going to modify this by right clicking on the asset and say allow editing of contents. And then we're going to jump inside and there's this huge network. It's going to alt click my viewer to split it back the way I had it before all the crashes. And you can see that this is the inside of the tree branch place. And it looks pretty scary, but most of it is doing shaping stuff right here really where the magic is happening is up in this little section right here. What we're doing is we've got these two these two chunks. One of them is where the drawn branches are happening and the other one is where the placed branches are happening. You can see that our curve right here is coming in. The curve, the input curve, is our previous, it is our, oops, the input curve is our trunk and we know that that input curve has a branch ID of zero. So what we need to do is just actually take the maximum value of our previous branching levels or branch IDs and just add one to it. So we can do that using an attribute promote. So I'm just going to pull this off to the side and create a little knot and we're going to create an attribute promote right here. And on this attribute promote, we're going to be promoting the branch ID to detail attribute and we're going to change it to the max branch ID max. And this way we're going to know whatever the highest level of branch ID was achieved on the previous, you know, generation of all the branches that are feeding into the system. We're going to know what the maximum level of branch ID is based out of this detail attribute that we're creating here in our case it's just zero, but this will come in handy later. So what we do is inside here, I had to kind of dissect this. This took me a while. But at one point in here, there's a little attribute transfer. And this attribute transfer is the culprit for what's happening with our branch IDs being wrong. You can see that right here is transferring the previous branch ID back onto our placed branches and our drawn branches in these two nodes right here. So if we just split off this stream, we can use this to set a new branch ID. And we can also use it to set our parent ID at the same time. So I'm going to just bring this off to the side. And I'm going to just throw it on an attribute wrangle. And so this attribute wrangle is going to take whatever this, whatever our newly created branches that we're feeding in right here, and we're going to look up into the second input and make a new branch ID based off of whatever the maximum branch ID was over here. So we're gonna say that our branch ID, I at branch ID is equal to a current primnum plus one plus the detail attribute from our second input, so input one, and we're looking up the attribute branch ID max underscore max, max, I think this will be said there. So now you can see that in our geometry spreadsheet, this new branch has branch ID one applied to it. Now we need to do this in that we just need to feed this back in over here. So if I bring this back in over here, you can see we've kind of just made a little detour out of this, modified it and brought it back in. Now we just need to do that over here as well. So I'm just going to bring off a little thing like this. And actually, I need to grab this one. We're just going to copy that wrangle and we're going to bring it bring this in over here like so. So we're just kind of making that detour twice one for each side for the drawn branches and the placed branches and placing them back in here. The other thing that needs to be modified is down here there's another attribute transfer that's happening and it is grabbing a bunch of it's grabbing all the attributes that we just created but we want to make it so that it doesn't overwrite the branch ID that we just created. So we're going to say not branch ID. And when we hop back out here and look at our tree branch position, we can see that we get two different colors. That's a good sign. We got our branch level zero and branch ID zero. And we scroll down and you can see branch level one and branch ID one. But the other thing we wanted to do, based off of our Photoshop doc, was also track what our parent ideas. And our parent ID is stored because we're scattering, we already had our branch ID and we reset it. So if we have that branch ID, we can just initialize our parent ID to be whatever the branch ID was before we modified it. So if I go back in here, and we just hop up to this thing, we can just right before we adjust our branch ID here, we're just going to create a new attribute called I at parent ID. And we're gonna set that equal to I at branch ID. So that's just, you know, carrying that attribute through. And I need to do this for both ranges. I copied this wrangler, I'm just gonna copy this line and paste it over here. I could have done an absolute reference copy, but I wasn't thinking of it. So now that we've made these modifications, We also need to adjust it so that we're not overwriting our parent ID here as well. So insert a parent ID there. And what I like to do at this point is I'm just gonna put a little knot here and take this one and push it way off to the side and then grab these four nodes that we created and put them in a mint colored box to know that this is the thing that we tweaked in order to get this setup to work properly. So we can hop back out here. Our tree branch placer should be working correctly. The only other thing that we have to do is modify the tree branch generator to understand what its parent ID was. And similarly to how we did it right here, we just set one line that said parent ID equals branch ID. I'm gonna just increase the scale here. Sorry. So we when we said parent ID equals branch ID, we just want to kind of take this line and copy it into our tree branch generator so if we just jump down to the tree branch generator we're going to also allow editing of these so let's right click allow editing of contents and jump inside here. And this is another scary network, but you can see right here in the middle, we got a copy to points happening. And that's where we're copying all of our new. We're copying these new lines onto our initial points here that were that we're gathering. So we just need to track that parent IE right here. I'm just going to throw it on another wrangle. And I'm going to wire that in here and paste in the same line. We're just tracking parent ID. I said parent ID is equal to branch ID. That's it. So here I'm going to also put this one inside of a nice minty, spear minty colored box where we update the and add the parent ID to our setup. And that should be all we need to do to get this to provide the data that we need. The only thing we have to do now is just modify a couple of nodes down here to get it to do the attachment correctly because our attached joints still aren't working correctly. So we need to take into consideration that we're using parent IDs instead of branch it instead of levels and just make mods to these so when we the first thing we need to do is just modify set attached group. I'm going to just option drag these off to the side to keep an old copy for our reference. And then I'm going to just color these two nodes red to denote that we made a change here. Under a attach group, we were previously making a dynamic attach group called level whatever our branch level is, level 0 attached, level 1 attached, something like that. In this one, we just want to do a branch ID attach. So we're going to just change this label to be something that means a little bit, something more meaningful or call it branch ID underscore percent D attached. And then instead of using our branch level to dynamically replace the string inside of this group that we're creating, we're going to call this branch ID instead. So we're doing that. And that should be good to go for there. And if you just middle mouse click on this, you can see that we get like, we're getting tons of branch IDs. we're getting a branch ID group for every, branch ID attached group for every single branch in our entire system. So we'll delete those later once we're done with them. We just need to kind of use them in this next node where we do our attachment. So in attached joints, same thing, very similar. We just want to change the kind of wording right here. We're doing branch ID attached. So as per net branch ID attached to attach to that branch ID group we just created. And then instead here, we want to actually attach to the parent ID that we created in our, when we were modifying our labs tree tools. So we're going to say parent ID. And that's going to allow our diagram to behave accordingly. Now, if we look at the attach joints group, we're not seeing these strange polylines that are kind of moving across the screen and attaching to this other branch we placed over here, it's all working correctly. So if I come down here and we go to apply animation trunk, you can see that now all of these branches are all tied together in a predictable way that makes a lot more sense than it did just a couple of moments ago. So that's kind of how I modified the lab street tools to get them to work with this new setup. The only other thing I would do right here is just insert a group delete to get rid of all these groups because we only have three levels of branches here, but you can imagine you'd get quite a few unnecessary point groups if you had quite a few branches. So we'll just throw in a group delete and throw that in right here. And we're gonna just delete any group. See if we got branch ID, blah, blah, blah, blah. Where's a branch ID, anything with branch ID underscore and then use stars as a wildcard. And that should delete all of the extra branch ID groups. And if we go back down here, We should have all that stuff working, our wind working and everything like so. And it looks like I just wanna get this wired back into my setup here. So I had, if you do want to add another level of tree branch generation, you're gonna want to kind of copy this obviously to make your updates to this instead. So we do a couple of generations here. And on this one, I'm gonna say I wanna branch on. We're just going to remove that so it's only branching on the previous level and we can see we get a much more, we get more of our branches here. Then let's just grab this wire that in here. And I'm going to delete these two other branch generators, but I'm going to wire this in first. We get our leaves back. So, and I want to wire this into our material. So and if I go down here, I'm going to just let's cross our fingers and see if we get see how we do with our full setup. Obviously, I'd want to have a little bit more on leaves on maybe a few more generations of branches and leaves and stuff. But we should have that full wind setup working with our new tree here. And let's see our leaves making any movement here. Yeah, our leaves are fluttering. It's very subtle, but you can see them. Maybe we'll make them make them bigger. We'll make this like a tropical tropical plant or something like that. Increase the leaf size. There we go. And so yeah, that is how we can use the custom, we can customize the lab street tools to have them work in a way that is logical with our updated rig that we created here. And that is pretty much all I got for, for that is everybody, how's everybody doing. Great. Yeah, it looks so good. Cool. I know that that one was a little bit. I know that these kind of got gradually more and more complicated as we went along, but I think that hopefully there's a lot of interesting little tidbits in there that you can use in various other parts of your Houdini-ing. Oh yeah, I mean I think that even though it's complex, it's just there's so much learning in there that can be taken to so many things. Yeah. And the result is gorgeous. So the chops was so interesting. I know it crashed a lot and I hope you don't feel bad about that. not you. Obviously. Yeah, no, I was kind of expecting that, like, it would do that kind of stuff. I Yeah, sounds like it. You're rehearsing. It didn't happen yesterday, but it did happen quite a bit in some of my other rehearsals. Yeah. And I guess taking zoom into account is always like an unpredictable little thing there. Yeah, it's weird because I feel like OBS has been taking up a lot a lot of GPU resources. It looks like Zoom is coming. Oh, I didn't realize you're doing it. Also OBS. Oh yeah, no, I have OBS. I'm recording a local copy. Just so if you wanted a hybridized copy or whatever, I have it here. Got it. Yeah. It was weird. It was acting a little bit weird and then it crashed, but then when it came back, it was performing great. So it was like fluttering real time and everything again. So that was fantastic. Yeah. Does anybody have any questions? Any questions? Larry has a question in the chat. So yes, all the hip files, all the hip files will be uploaded. The hip file from the video that I showed at the beginning, all those, all the, all the videos that I've shown will have the hip files provided. So you'll be able to get in there and mess with it. And honestly, yeah, like following along and modifying these, I was, I was actually not even planning on doing it during the live lesson. I was just going to be like, and here's my file, and this is what I did. And but I tried, I tried going through it last night and it didn't seem like it was that hard. So, I mean, it's just a couple of modifications. But yes, I definitely will be providing this file will be on the course page. You'll be able to just grab these nodes and paste them into other projects. And if you're feeling like extra saucy, you can create versioned up digital assets. So you can actually version forward the HDAs that labs provides. And I tried to do that on my end and I got it working. But then when I wanted to come teach this lesson, it was defaulting to the new nodes that I had created. And I had to actually take that out of my system and revert back to the bread and butter labs tree tools because they created too many problems with me trying to create a tutorial around them because it was always trying to grab the most recent one that I had. So you can kind of modify those and save them for yourself. It is, however, like I find modifying HGAs and like updating HGAs to be kind of a convoluted process. Yeah, I feel like I don't do it enough where it's not like in my muscle memory. So I don't. But if you are comfortable with that kind of stuff, you definitely could follow along and make these mods to them and save a new tree tool set and it should work pretty good. The other disclaimer that I would put on there is that if you're doing the tree branch placer, I would place branches one at a time. Instead, in the tree branch placer, you do have the opportunity to place multiple branches and multiple drawn branches. I would definitely choose to, you know, if you wanted to place more than one branch, I would use multiple of this node as opposed to trying to do it all on one node. Just because I'm not sure how it breaks down in there if it falls apart with tracking the parent IDs and stuff like that. So you just want to use one note at a time when placing custom branches. Cool. Got a question for you, Mark? Yeah. So the the chop stuff, I love how you explain the chop stuff that that was I need to get deeper into chops anyway. But one thing that I'm thinking of on this, and this would be a a very different approach is going into volumetric velocity fields. And I'm curious if you've actually tried going that route with a kin effects rig. And if you've encountered hurdles, just because of the like you were talking about the orientation of stuff, because with the velocity, it's dealing with the points in a different way. It's not dealing with orientation. It is, but isn't at the same time, not in the same way. But I'm curious if you've messed with actually trying to run a volumetric field through there to get a wind versus doing the chops. Yeah, that's a good question. I don't think I have, but I do know that, you know, when at the beginning I kind of threw down a attribute noise and just had the position kind of warping around like that. What I do know is that if we send in our capture stuff, if we send in our capture transforms, and then we do an animation and update, but we don't update those transforms and then feed our, then we update that deformation after, we're looking at, we did these corrections right here. We did these corrections right here, just directly modifying the position of a kin-infects rig without touching the transforms will create that skewing effect inside of the geometry when it gets reboned or formed or whatever. So you might need to run another rig doctor or use some logic to kind of measure the change in the angles of the primitives to compensate for a direct manipulation of the point positions as opposed to modifying the transforms themselves. That makes sense. Gotcha. Yeah, that makes sense. Okay. I have a quick question. I'm curious, I was thinking you were talking before about wanting to make the trees dance, Deborah. If there was a way that to use chops to instead of providing the noise to have an audio file. Oh, you got, you got, I was just gonna say, you got to it before me. I was gonna say another homework assignment for someone is to get a music track in there and have the leaves dance to the music. Yeah, yeah, for sure. Yeah, that would be, yeah, that would be cool. Yeah. Yeah, the sky's the limit. And going back to thinking about the question with using the volumetric, I mean, applying the noise as a float value, you can always look up into a pyro sim and grab some density attribute or measure the speed, the length of the velocity vector to convert that into a float attribute and use that as your noise. and everything. I mean, it's funny because there's like infinite possibilities, but there's still our limits you have to like work within. But I think there are ways around it if you get creative with. I have a question. If the transforms, they're all a matrix, but it's composed of vectors inside of that matrix. So couldn't you make a velocity field like a pyro sim and just affect one of the vectors in the matrix? You could, but I think that you might end up with non-orthogonal, I think is the term where they're not 90 degree oriented for one another. Yeah, they would probably twist across each other in a weird way, although it could be an interesting look. Yeah, it could be cool. You could have it do that twist And then pull them out. If you, if you actually convert them to an orient, it'll normalize and then convert it back to a matrix. So you could, you could like, you know, have it mess with one of the vectors, recompute the transform and then, and have it just create a new transform based off of that adjustment. But then you'd get that, you know, right handed orthogonal. I keep doing this right handed rule thing. That's what these are the axes. You can kind of see my hand. Right. Right. Yeah. Yeah. Yeah, there's there's so many things and it's crazy because when they you can get some very weird shearing and stuff to happen and I don't necessarily understand enough under the hood of what's going on with these matrices to know what exact effect that's going to have but it might look pretty cool for sure. Yeah, and I wonder if it would be easier if it was a you can make 2d sends like make the pyro Like just like a 2d sheet and I wonder if that would be easier for the that problem the orthodontic problem. Yeah, but um, yeah neat I love it Stop giving me ideas to waste my time with Yeah, do it, David. Oh, you know, by the way, while I have this open, I was doing, I wanted to show you like one thing when we're over here, when I was messing around with this, I did actually at one point clone cubes on here and just did copy it. Oh, yeah. If we just throw a box down. And why are this in here. You have basically actually, if I can I see that. that you kind of have us by night happening here a little or actually I got a wired in over here. I think yeah, there you kind of get a little bit of that us by night type thing we were talking about last week where it's all these, you know, nice parameters that are, you know, un unrolling themselves in a really classy looking way, which is kind of cool. And that's exactly what I did for the last piece, the psychedelic cube once it was exactly that. Yeah, cool. Yeah, I love that. I love the idea of using this for things that aren't tree related. I think that was really cool. The what you did on with that post with like using it in water. It's just, it's so cool because that's the beauty of Houdini is that you're not restricted by a plug in its black box and you can only use for one specific task you can cross breed this with anything you want and it like, and that's the thing is like, you know, the number one use case for for kin effects. The number one most relatable use case for kin effects is character animation, modifying character animation. But under the hood, you've got a tool, a set of rotational tools that are so robust and so powerful and well thought out that you can like apply to all sorts of different things that are not even trees, you know? Like just lines or spines or, you know, any type of geo you can imagine, you can use it in Belem. I used it to wrap up that, those flowers that I was showing in that example, I used them to kind of wrap up that flower. I think I kind of followed an example that I saw during one of XK Studios talks at one of the hives. They do a lot of really cool flowers. Yeah. They fold the flowers up and stuff, but you can use KinFX to just drive really like realistic looking initial states for vellum, just wrap everything up and then just let it unfold from there. Kind of stuff. like the ultimate art direction tool. Yeah. Yeah. Thank you so much. Any other questions from the audience? Did you guys enjoy it? I think so. That was great. Yay. Really good. Thank you. Yeah, thank you everyone for hanging in there and checking it out. And yeah, check out those project files and hit me up on Discord. I'm totally happy to help problem solve troubleshoot all that stuff. And I really want to see work from this class, you guys. So I hope to see some stuff in the discord this week. So practice is really important. But yeah, thank you so much, everybody. Thank you so much, Mark. This concludes the course and went by really fast. And I hope everyone had fun including you, Mark. Yeah, absolutely. We'll have to come up with another one do it sometime. Excellent, excellent. Okay, have a great weekend everyone. Thank you." + } + ] +} \ No newline at end of file