Getting Started with Houdini Engine: Output Attributes

Share this video
  • Duration: 11:03
  • Views: 2082
  • Made with Release: 17
  • Works with Release: 17 and greater

Besides Meshes and Particles, a Houdini Digital Asset can generate other types of data and attach it to our Output inside Cinema 4D.

Besides Meshes and Particles, a Houdini Digital Asset can generate other types of data and attach it to our Output inside Cinema 4D.

What kind of data, and how we can use it, is something you will learn in the tutorial.

If you like Colours, numbers and attributes, a promise you a very fun time. If you’re not a fan, well… watch it anyway.

Less...

Transcript

- Just like with the Cinema 4D's primitives, for example, cubes, spheres and whatnot, there is a hidden UV map. You can't see it when the object is in its primitive state. If I press C, you will see that the UV map is exposed. Now there's a good reason for that, and that is because when the object is primitive and because you can vary the number of polygons. Let me turn on my display. And UVs are dependent on the number of polygons of an object. It has to be generated automatically, and that's why if it was in the manual mode, it will create some sort of confusion. Now in the same way, the output generators have various hidden components. So let me show you what I mean. I'm going to get rid of the cube, and I'm going to load a very specific asset, a simple Voronoi Fracture. I'm very proud I made this. And it has, let me select it, one input. I'm going to create a sphere and select my asset and drop this sphere in here. Now let me make my sphere invisible. You can see that we have one output generator, and there's nothing over here, no tags whatsoever, but you can see that it's fractured. So if I zoom in, you'll see it's nicely fractured. Let me show you something. If I drag this and make a copy, and then make it editable, I'm going to press C on my keyboard. When it becomes a mesh object, a simple polygon object, all the data that was hidden previously has been exposed. What we have here is a phong tag. We have a normal tag. We have three vertex weight maps, and you can see whenever I select one, the colors change, the actual gray scale values change. And then we have two selections. We have the outer and the inner. And both of them are active groups, and then we have a UV tag. So whenever we have an output that is supposed to have some sort of data coming from Houdini, and again that's based on the asset design, that information is hidden, and can be exposed when made editable. Now you'll ask me, yes, but now that I've made it editable, then this little polygon object here does not answer to the asset generator. Yes, but we can do something else. What I'm going to do is drag these on the output generator, nothing else, and I'm going to delete this. I don't need it anymore, but you can't see anything happening now. But let me show you a couple of tricks you can do here. Number one, I'm going to create a material, and in the material in the color channel, I'll turn off the reflectance. I'm going to use a Effects, Vertex Map. Click on the Vertex Map, and in the Vertex Map I'm going to drop this one here. Now if I apply this material and render, you will see that the colors get propagated. Now how can we use this to actually transfer color from Houdini? Because we all know that color is three numbers, one for red, one for green, and one for blue. And currently, a vertex map can only hold one number, not three. Three numbers is called a vector three. We can combine these three vertex maps into an RGB color. How do we do that? Well, one method is the following. I'm going to create a layer shader. Click on the Layer shader and I have my vertex map, and I'm going to name this red. I'll make a copy just by dragging the icon underneath. I'm going to name it green. And then do the same and call it blue. I'm going to select each one and drop the proper vertex map. One thing you need to see is that there is a very specific naming here, which says, point color G for green. This is a standard name we use to transfer color information from Houdini. When this asset was created, it applied a color variable the so-called CD variable, which is a color in Houdini. And Cinema 4D in order to understand that information converts this into three separate colors so point color G for green, click on this and drop the blue. This is step one. Step two, we need three colors. Color red and I'm going to make it red. Go up, drag this from the icon to make a copy. Call this green. I'm going to drag it and then I'm going to change it. Double click, call it blue. Click on this, make it 100% green. Click on this, make it a 100% blue. Two more things, we need a substrate, a color, which is black underneath, and then we need to do the following. I want this to mask the red. I want this to mask the green. And I want this to mask the blue. And finally I want the transfer to be screen, screen and screen. Now having the material being applied, previously if I render, I have a colorized Voronoi map. Let's see what happens if I change some parameters. Select it. Let's go down here. Let's find account, change this number so we have more fragments. Let's render, and you will see that with this setup, although it's still linked to the asset generator, the colors are created properly. Let me show you one more thing that is quite interesting. So we have this output. What I'm going to do is create a fracture object. Now I'm going to do is not going to work. I'm going to make the fracture object a parent of the output generator, and I'm going to say, I want you to explode segments. And then with the fracture selected, I'm going to add a random effect, and you can see that everything moves together. And the reason is basically that I need to do two things. Number one, this specific asset has a little setting here where it says create output groups. I'm going to turn this off, and again nothing happens if I render of course we still have colors. And I need to add one more thing. As usual, when nothing else works, always put it under a connect object. So get the connect object, turn off the weld, make this a child, and there you go. And if I render, you will see that everything stays in place, the colors and everything else. And if I make the random effecter work in Turbulence mode and press Play, you will see that we have a dynamic animation here, and we have color and everything else. And this is one of the ways you will use it. So make it editable, copy the vertex maps or the other data. We will talk about the other attributes for particles and meshers as we go on, and we will discuss it in detail on the forums. For particle outputs, the process is ever so slightly different. So let me load a simple particle generator. Good, and we have these particles that are generated. Lovely. Now if we try the same approach, I'd get the particle and copy it, and make it editable, and nothing really happens because particle generators do not work in the same way that meshers work. But how do we deal with the data that comes through? Now, first of all, when we talk about particle outputs, there's only a specific number of attributes that come across from Houdini, and that is the position, the color, the velocity, the mass, the age, the life as in life expectancy, and the id. Now, mind you the id is a very important part of the particle asset. Because Houdini has a different way of dealing with particles, essentially Houdini doesn't differentiate between points and particles, and particles, as far as Houdini is concerned, is just points with attributes. We need to make a distinction in Cinema 4D to translate points with attributes into Thinking Particles, and that happens only if the points that come from Houdini have an id attribute, and that is spelled id in small letters, not capital, id. Now let me show you how you'd go and extract that data. I'm going to create a Null, create an Xpresso, and go here and add a PGetData. So as you can see here, we have all the different attributes that I think a particle can have. How do we set this to read these particles? All we have to do is do a P pass, link it, and in the P pass, I want to drop only the group that is associated with this output. So I'm going to do it in the following way. Go to the Thinking Particles Settings, and you will see here that if twirl open that little arrow, I have a particle group which has the same name as this, and I have to drop this group in here, and now this specific group is going to go through to the PGetData node, and we can extract all the information by using the position, the color, the velocity, the mass, the age, the life, and the id, which is not recorded here, but it's a general attribute for each thinking particle. In this way, you can do whatever you want with the data that comes with the particle.
Resume Auto-Scroll?