Episode 19- Attributes Attributes Attributes.
This week I tackled learning more about attributes in Houdini. To be honest, I’m still not totally clear on how to assign them in any situation, I only know a couple of niche ways to assign them, but hey, I’m still learning. Let’s walk through what they are and why they’re so stinkin’ important in Houdini.
I’m pretty sure I’ve talked about them before, but I feel like my grasp on what they are and how they work has changed somewhat since the last time I talked about them, so let’s just go over them again. (And probably again and again several more times, I’m a slow learner.) Ok, so at their most basic form, an attribute is a value assigned to a name. You can call these badboys anything you’d like. So they’re literally just a number attached to some name. And once you create one in a node tree it just floats out there in cyberspace, quietly existing until you reference it. So depending one where you created the attribute, what it’s attached to, and what the attribute is named, you can reference it to do stuff.
Cool.
This is all good and fine- but what’s the practical application of an attribute you ask? Lot’s of shit, my dear Watson.
Ok, so remember 2 seconds ago when I said that you can name them anything you’d like? That’s mostly true. There’s also a number of attributes that Houdini recognizes as certain things. “Presets” if you will. To find this out, you literally have to read the manual, there’s nowhere to look them up in the program as far as I can tell. So I guess I just have to memorize them and know what each one does. I guess.
Let’s take one of the preset attributes- CD. This stands for Color Density (I think). So as you might imagine this attribute handles color values. So if you assign a CD attribute to a piece of geometry, it would display 3 values for each point on that piece of geometry in the geometry spreadsheet view- Red, Green, and Blue values.
What does this do? Well, nothing yet. But the data is there, and now we can manipulate it. So let’s say our geometry is something simple like a cube. If I highlight half of the cube in the view port, I’ve selected a bunch of points on the geometry. I can go back into the spreadsheet of all the geometry data and see all of the points I’ve just selected. Now if I wanted to I can change those values and manipulate the red green and blue values of those points I could.
But it’s much more complex than that. Selecting individual points by hand is useful for teeny-tiny edits to a model, but what if I have a scene with hundreds of thousands of something? Let’s say I have a scene with falling rain in it and I want to change the color values of all of the thousands of rain particles I’ve animated. I’m not going to want to spend hours doing that by hand. No way man. So we’re able to reference anything with an attribute attached to it and use different nodes in our node tree to select certain attributes on a model or a system of models and manipulate them procedurally.
What I did this week was take last week’s model of pretty dots and deleted just the original geometry that my node tree was built off of. I then replaced it with just a flat grid. So we have all of those dots from last time populated on a grid rather than a sphere shape. Then, just below the grid in my node tree I brought in a node called an “Attribute Paint” node, which allows you to define an attribute, (Houdini slang for create an attribute) which we called density. We called it density because next in the node tree was a node called a scatter, which happens to have an option to toggle on a density attribute for the data flowing through it. So once we toggle that on and we’re selected back on our attribute paint node, we can paint in areas on our grid of high density, which the scatter node then identifies as places to manipulate the data associated with the “density” attribute. So drew a J and it looks like this:
If I lost you in that explanation, I’m sorry. I’m a little lost myself. But I’m slowly understanding the applications of attributes. More to come next week, my brain hurts.
Jake-out