jon3de Posted June 9, 2016 Share Posted June 9, 2016 hi, I want to control the emission of my particles via attrib. E.g. Cd, or a custom attrib it doesnt matter. In the attached example file I animated some points to get white after frame 30. When I use Cd for emission after that in the pop network it spawns particles everywhere on the surface until frame 30 is reached and than it uses the attribute as expected. Can I control the emitter in the particle network with attributes like if (@Cd> 0.5) ---> spawn!! if not - dont spawn anything. Or with a custom attribute like if(@heat > 30 ) spawn particle....etc. Or is this better achieved in another way in houdini? Thank you in advance. kind regards Jon attrib_as_emit_value.hiplc Quote Link to comment Share on other sites More sharing options...
mestela Posted June 10, 2016 Share Posted June 10, 2016 There's a few ways to tackle this. One way is to put down a pop kill, use the drop-down to choose kill by condition, and modify the example to kill if the colour is black: dead = (@Cd.r == 0) ? 1 : 0; (btw, thats a shortcut way of writing this which you might be more familiar with: ) if (@Cd.r == 0) { dead = 1; } else { dead = 0; } Another way that a workmate showed me that I'm using more and more, is to keep as much control in sops before the popnet. The default behaviour of the pop source is to scatter over the input geo; but if you change the mode to 'all points', then it's up to you to feed it points that move around like the pop source scatter does. A scatter sop can do this. The advantage now is that you can use all your usual sop tricks, and get non-sim based, very accurate control of your emission. In the attached example I made @density based on colour, have a scatter sop that is driven by density, but was surprised to find that even with density at 0, it still scatters points. No matter. A blast that kills points where @density=0 fixes that, and can feed that directly to the pop sim. Setting the seed on the scatter to @Frame so its constantly jittering, and we're done. This might cause issues if you're emitting really fast particles and need nicely distributed emissions in sub-frame regions, but it's never bothered me so far. -matt attrib_as_emit_value_fix.hipnc 1 Quote Link to comment Share on other sites More sharing options...
jon3de Posted June 10, 2016 Author Share Posted June 10, 2016 Thank you very much for looking into that and for the additional infos. Try to solve as much as possible in sops makes really sense to me I will keep this in mind. Jon Quote Link to comment Share on other sites More sharing options...
oaschwab Posted September 11, 2020 Share Posted September 11, 2020 I know this post is old but someone like me might stumble on this and find it helpful. Like most things in houdini this is unnecessarily complex. I asked them about this and they said they designed it to be used with the pop replicate. I've attached an example file. Basically scatter points all over your object. I've added normals and converted them to velocity vectors on the scattered points. Add Cd noise. Inside the Pop Network chose birth from All Points. Then add a pop replicate node after that and chose your emission attribute from there. particle emission.hiplc 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.