Search - User list
Full Version: Particle shader
Root » Houdini Indie and Apprentice » Particle shader
nangusa
Hi, I'm new to this forum and Houdini. I'm learning from 3dBuzz tutorials and The magic of houdini book, but I'm doing it slowly, so I have some questions I hope you be glad to answer.

First, I have a SOP POP Network on which I emmit from source POP, then split particles based on $AGE onto another group. I then colored each group and it works fine (I'm modeling a missile trail. The first group is the missile blast and the second splitted particles are the smoke trail)

I don't know how to assign different shaders to each group of particles. I'm rendering as spheres (Render POP). I've tried the Material SOP by assigning each group different shaders but it doesn't work, Mantra renders the particles by the POP Color assigned to each group, which tells me the grouping of particles is ok, but I wonder how to assign shaders to each group.

Thank you,
nangusa
nangusa
Hi, I'm new to this forum and Houdini. I'm learning from 3dBuzz tutorials and The magic of houdini book, but I'm doing it slowly, so I have some questions I hope you be glad to answer.

First, I have a SOP POP Network on which I emmit from source POP, then split particles based on $AGE onto another group. I then colored each group and it works fine (I'm modeling a missile trail. The first group is the missile blast and the second splitted particles are the smoke trail)

I don't know how to assign different shaders to each group of particles. I'm rendering as spheres (Render POP). I've tried the Material SOP by assigning each group different shaders but it doesn't work, Mantra renders the particles by the POP Color assigned to each group, which tells me the grouping of particles is ok, but I wonder how to assign shaders to each group.

Thank you,

Problem solved. I've instanciated spheres for each group of particles by using a Copy SOP outside the POP Network, and assigned different materials to each copy group.

I don't know if it's the best approach by it just works.
old_school
That works fine.

The other more sophisticated and far more powerful way to affect shader properties is to use geometry attribute inheritance in the shader (both Surface and Displacement). That is the game that all Houdini power users play and it is dead simple to do if you know your way around Houdini nodes.

If you have an attribute that is the same name and type as a parameter in your surafce shader, that parameter will be overridden by the geometry attribute. Simple.

This is how the “Cd” vertex, point, primitive or detail attribute is picked up btw.

But…
Darn $AGE and $LIFE as farty back-door hacks in to the life and life attributes. Legacy crap (and I mean PRISMS legacy crap) makes it not possible to inherit $AGE and $LIFE in to a surface shader. You have to use an Attribute Create SOP to create a new geometry attribute to inherit either $AGE or $LIFE in to your surface shader. This is the only exception so might as well get it out there and over with.

—-

See the attached file for a typical VOP surafce shader working example of overriding the diffuse by a custom attribute and opacity based on the attribute age with a ramp.

You can add any attribute you wish and inherit in to your surface shader using this method: my_color <vector 3>, my_displace_amount <float>, my_noise_frequency <3 float vector>, etc… I've seen some production scenes with over 100 geometry attributes overriding shader properties.

Again the rule is simple. Just have to match the name and type (int, float, float 3, float 3, vector 3, vector 4) of the geometry attribute (of any of vertex, point, primitive or detail) in the Parameter VOP and watch out for typos.
nangusa
jeff
That works fine.

The other more sophisticated and far more powerful way to affect shader properties is to use geometry attribute inheritance in the shader (both Surface and Displacement). That is the game that all Houdini power users play and it is dead simple to do if you know your way around Houdini nodes.

If you have an attribute that is the same name and type as a parameter in your surafce shader, that parameter will be overridden by the geometry attribute. Simple.

This is how the “Cd” vertex, point, primitive or detail attribute is picked up btw.

But…
Darn $AGE and $LIFE as farty back-door hacks in to the life and life attributes. Legacy crap (and I mean PRISMS legacy crap) makes it not possible to inherit $AGE and $LIFE in to a surface shader. You have to use an Attribute Create SOP to create a new geometry attribute to inherit either $AGE or $LIFE in to your surface shader. This is the only exception so might as well get it out there and over with.

—-

See the attached file for a typical VOP surafce shader working example of overriding the diffuse by a custom attribute and opacity based on the attribute age with a ramp.

You can add any attribute you wish and inherit in to your surface shader using this method: my_color <vector 3>, my_displace_amount <float>, my_noise_frequency <3 float vector>, etc… I've seen some production scenes with over 100 geometry attributes overriding shader properties.

Again the rule is simple. Just have to match the name and type (int, float, float 3, float 3, vector 3, vector 4) of the geometry attribute (of any of vertex, point, primitive or detail) in the Parameter VOP and watch out for typos.

Hi Jeff. Thank you very much for the explanation. I did create a VOP surface shader and used a geometry attribute to drive shader's opacity based on $LIFE of particles, and I was wondered why I can't use it directly, so your explanation is very usefull to me now.

I'll check your file later and comment.

Again, thank you.
nangusa
Jeff,

Your example is exactly what I needed to understand.

Thanks.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB