switch expression

   2435   1   0
User Avatar
Member
2 posts
Joined: Oct. 2015
Offline
Hey guys!

Ok so I am working on a little particle sim where I attach metaballs to particles and they are denting geometry. It's working pretty well however I would like variation in the dents created. I have made a couple of different shapes from combining metaballs and I would like each particle to be born with one of the variations. I then have these variations plugged into a switch and I added the expression rand($F) which does indeed mix up the assigning of metaballs however every time the switch changes the metaball applied to the particles it changes it on EVERY particle even once they have been birthed which results in this constant flickering in the dents. Soooooo very longwinded but is there a way to keep one variation assigned with each particle once birthed? Do i need to use a different expression or a different node maybe?
Thanks so much for any help!! : )

James
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
Sounds like you need to create a random float attribute on your particles , then in a sop solver have a meta ball strength set by that value. The action would only happen on a NUMHIT value == 1 ie the particle hits something.

Rob
Gone fishing
  • Quick Links