ParticlesGPU Stick on collison

The Palette tool ParticlesGPU has “Hit” settings for “Die on Contact” and “Bounce on Contact”. I’m digging into ParticlesGPU to figure out how to make this “Stick on Contact” which is an option for the traditional Partical SOP. Has anyone modified ParticlesGPU tool before? Anyone know how to make this happen?

Found it.
Within the ParticleGPU OP there are two script OPs: “glsl1_pixel” and “glsl1_pixelMAC”.

When you are running on osx “glsl1_pixelMAC” is used and when you are on Windows “glsl1_pixel” is used. You can edit both files at line 167 to add additional conditionals for a hit. In my case I just modified the else statement to “velocity *= 0.0;” instead of “velocity *= -1.0;” Now when I select “Bounce on Collision” it will just stick.

After some more testing this isn’t the best solution. By multiplying the velocity by 0 I negate any affect the optical flow may have on the particles. In My case a better solution will be to check if the particles is at the floor and then clamp the y axis velocity to zero. This would allow the particles to slide along the floor when moved by opticalflow force. Something like
“velocity.y = 0;” instead of “velocity *= 0.0;”

1 Like