dagoose Posted January 24, 2017 Share Posted January 24, 2017 Hi, It's driving me nuts ... sounds so simple but just can't get it to work. Lets say I have an box which are emitted particles into. Now I define a pop group via a bounding and want to delete 25 particles every frame in the bounding. Thanks for yout help. delete_rand_particles_per_frame.hip Quote Link to comment Share on other sites More sharing options...
Atom Posted January 24, 2017 Share Posted January 24, 2017 Try using a PopKill instead of a PopWrangle. You can specify the group and use the Random tab to randomly remove some particle in the group. Quote Link to comment Share on other sites More sharing options...
dimovfx Posted January 24, 2017 Share Posted January 24, 2017 (edited) or if you still want to use wrangle, try with something like float seed = @id + @Frame; if (rand(seed) < 0.025) @dead = 1; Edited January 24, 2017 by sasho78 Quote Link to comment Share on other sites More sharing options...
dagoose Posted January 25, 2017 Author Share Posted January 25, 2017 Quote Thanks you guys! I am guessing that the rand function is supposed to return an equal spread ... still it is very hard to control the amount of particles getting deleted. Quote Link to comment Share on other sites More sharing options...
eetu Posted January 25, 2017 Share Posted January 25, 2017 In cases when you need to randomly delete strictly a given number of elements, one way is to sort the elements randomly and then delete N first ones. If you need to maintain the point order, you could probably sort a separate copy of the particles, select first N to a group and match that back to the originals according to id. Or script it. 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.