drGonzo Posted April 15, 2010 Share Posted April 15, 2010 Heya - First of all, excuse my silly questions, I am coming from 10 years of Maya and I am going through growing pains with Houdini. I am trying to get particles to change color each time they collide. So every time they collide they should get a new random color. I have them change color on the first collision using a collision group and color POP but after that I am stuck. Can any one provide some suggestions? Quote Link to comment Share on other sites More sharing options...
johner Posted April 16, 2010 Share Posted April 16, 2010 On the Attributes tab of the Collision POP there's an option to "Add Num Hit Attribute" which keeps track of the number of times a particle collides with something. Giving each particle a random color based on a combination of it's id and numhit attributes ($ID and $NUMHIT local variables) should do it. Quote Link to comment Share on other sites More sharing options...
old school Posted April 16, 2010 Share Posted April 16, 2010 Here's an example file that shows how to randomly color points by $NUMHIT. It also shows how to color points based on the hit surface point color as well. This latter method requires you to create an attribute mapping for the 3 float vector hitCd. color_particles_by_numhit.hip Quote Link to comment Share on other sites More sharing options...
drGonzo Posted April 16, 2010 Author Share Posted April 16, 2010 Excellent! Thanks guys. Much obliged. Quote Link to comment Share on other sites More sharing options...
drGonzo Posted April 16, 2010 Author Share Posted April 16, 2010 Old skool, how did you change the color of the nodes? That is very handy! Quote Link to comment Share on other sites More sharing options...
drGonzo Posted April 16, 2010 Author Share Posted April 16, 2010 how did you change the color of the nodes? That is very handy! Never mind, got it ;-) Quote Link to comment Share on other sites More sharing options...
wiz79 Posted April 19, 2010 Share Posted April 19, 2010 Ah yes the ole numhit color change.. This makes me nostalgic and happy =) 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.