Login | Register 
FEATURES
APPLICATIONS
DOWNLOADS
EDUCATION
BLOG
WIKI
FORUM
STORE

ParticlesGPU Stick on collison

Still a little green? Ask your beginner's questions here

ParticlesGPU Stick on collison

Postby newfieldslab » Wed Jul 10, 2019 6:21 pm

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?
newfieldslab
 
Posts: 9
Joined: Wed Oct 10, 2018 10:11 am

Re: ParticlesGPU Stick on collison

Postby newfieldslab » Thu Jul 11, 2019 1:49 pm

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.
newfieldslab
 
Posts: 9
Joined: Wed Oct 10, 2018 10:11 am

Re: ParticlesGPU Stick on collison

Postby newfieldslab » Thu Jul 11, 2019 4:50 pm

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;"
newfieldslab
 
Posts: 9
Joined: Wed Oct 10, 2018 10:11 am


Return to Beginners

Who is online

Users browsing this forum: Google [Bot] and 24 guests