Jump to content

POP Collisions, hitnum and POP Color


thestuntman

Recommended Posts

I am trying to group, and then color particles in that group based on the number of times they have collided with geometry.

 

In the file I have posted, one of the particles is changed to the color I want before it even collides at all.

 

I am using Static RBD Solver for the bounces, and this works fine, and a POP Collision Detect to handle the collision detection.

 

When the particles do collide, it seems that the "hitnum" attribute for each particle is being updated correctly according to the Details View, but when I attempt to use this in a POP Group node with "i@hitnum > 1" as the source group, followed by a POP Color, nothing is working correctly.

 

I have tried numerous other methods and nothing has worked. You should get the idea from my DOP network what I am trying achieve though

pop_collision_color.hipnc

Link to comment
Share on other sites

OK that makes an improvement although I am still not able to group the particles based on the number of times they have collided (0,1 or more than once).

 

I've attached another file that shows what I want to do a little more clearly.

 

I have also tried unchecking "Accumulate Hits" from the collision node and use a POP wrangle just after the collision node to create my own variable to track hits (i@totalhits += i@hitnum), and then using that in the group nodes, but this number seems to act strange and does not behave like it should (it jumps from 0 to 3, and goes as high as over 200, even though there is nowhere near that many hits).

pop_collision_color.hipnc

Link to comment
Share on other sites

  • 1 month later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...