thestuntman Posted March 30, 2014 Share Posted March 30, 2014 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 Quote Link to comment Share on other sites More sharing options...
sho Posted March 30, 2014 Share Posted March 30, 2014 The '@' group syntax doesn't take white space. So your "@hitnum > 1" needs to be "@hitnum>1". Quote Link to comment Share on other sites More sharing options...
thestuntman Posted March 31, 2014 Author Share Posted March 31, 2014 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 Quote Link to comment Share on other sites More sharing options...
Guido Zanni Posted May 8, 2014 Share Posted May 8, 2014 Hi, try to checking "Accumulate Hits" in popcollisiondetect and in the popgroup put "ingroup = i@hitnum>0;" 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.