PaintSOP as particle source

   4587   3   0
User Avatar
Member
23 posts
Joined: Nov. 2007
Offline
Hello everybody,

I have a chance to upgrade to Houdini at work if I can show its potential. So far I'm doing well, but I've come across a problem with probably a very simple solution. Here's what I need:

Particles need to be emitted from a surface, but not the same amount everywhere. So my plan is to use the PaintSOP to paint the amount. I've gotten particles to emit according to a texture map, but that's not what I need.

In essence, I need to get the color value (somewhere between 0 and 1) of a point and then pass that to the birth probability. When I do that, how ever, I get either 1 or 0 (depending on how I do it), but it always stays the same value across the whole surface and never gives me any of the gray scale values.

I basically know what to do, just not how to do it. Could anyone please help me? I really want to impress my boss so I can use Houdini at work. Thank you very much in advance!!!
User Avatar
Staff
809 posts
Joined: July 2006
Offline
There's a few different ways to do this. Basically you paint a custom attribute, then use that to drive the probability of a particle being birthed, either by first sending that through a Scatter SOP to generate source points, or using the attribute directly in the Source POP.

I put a couple together in the attached example.

Attachments:
paint_emit.hipnc (62.3 KB)

User Avatar
Member
23 posts
Joined: Nov. 2007
Offline
You rock, thanks for the big help! I wasn't too far away from getting it, just need that extra understanding of how Houdini thinks.

If you don't mind, I do have a question about how Houdini understands this. I saw that you entered a Distribution Attribute name in the SourceSOP. Is that what's in the end driving the emissions? I'm surprised that the birth probability is at default.

Also, how does the scatter understand the gray scale values? Does the emission then depend on the number of points on the surface that the scatter created?

I'll post the results once I'm done with the effect. Thank you again for helping me out.
User Avatar
Staff
809 posts
Joined: July 2006
Offline
zarroun
If you don't mind, I do have a question about how Houdini understands this. I saw that you entered a Distribution Attribute name in the SourceSOP. Is that what's in the end driving the emissions? I'm surprised that the birth probability is at default.

From the help for the Source POP:
Distribution Attribute
When Emission type is “Prim center (attribute)”, “Edges (attribute)”, or “Surfaces (attribute)”, the attribute to use as the probability of emitting a particle.

Birth Probability
Number of particles to emit per source point.

So (I think) the choice of using a particular primitive to emit from in the first place is driven by the Distribution Attribute, the number of particles to generate once that point/prim is chosen is based on the BirthProbability.

Also, how does the scatter understand the gray scale values? Does the emission then depend on the number of points on the surface that the scatter created?

By unselecting “Scatter Based on Primitive Area” you can use an alternate attribute to drive the scatter. By cranking up the “AttributeBias” to 1 you make sure points only get scattered according to that attribute.

Then you end up with a whole ton of points scattered based on your emit attribute. Since the Source POP uses “Points (random)” to birth particles from, it's more likely to emit from areas where points were scattered more heavily. So the end result is pretty much the same as using the Distribution Attribute, but you never have to promote the attribute to prims or anything.

I'll post the results once I'm done with the effect. Thank you again for helping me out.

You're very welcome, look forward to seeing the results.
  • Quick Links