Change ColorAttribute of Object based on Particle Collision?
2126 10 0- aw_iv
- Member
- 8 posts
- Joined: 9月 2021
- Offline
Hey there,
I have a simple setup where I generate a bunch of particles and let them drop on some spheres. I would like to achieve to change the Color of the Spheres based on hit by a particle.
With hitprim I was abled to change the color of primitives of the spheres but I would like to check based on the selected primitiv to select the whole Object.
Also I would like once the color changed from e.g. Black to Red to keep the color even after the particle passed through and left the object. And on top of that, if possible to add some time delay. So once the particle hit the object it takes like 20-30 Frames till the spheres to fade into that new color (but not sure if that is possible)...
Any idea how to achieve that or is there a different way. I tried with attribute Transfer but couldn't get it to work. Any help would be much appreciated.
I have a simple setup where I generate a bunch of particles and let them drop on some spheres. I would like to achieve to change the Color of the Spheres based on hit by a particle.
With hitprim I was abled to change the color of primitives of the spheres but I would like to check based on the selected primitiv to select the whole Object.
Also I would like once the color changed from e.g. Black to Red to keep the color even after the particle passed through and left the object. And on top of that, if possible to add some time delay. So once the particle hit the object it takes like 20-30 Frames till the spheres to fade into that new color (but not sure if that is possible)...
Any idea how to achieve that or is there a different way. I tried with attribute Transfer but couldn't get it to work. Any help would be much appreciated.
- Hatchery
- Member
- 138 posts
- Joined: 3月 2016
- Offline
- aw_iv
- Member
- 8 posts
- Joined: 9月 2021
- Offline
- Hatchery
- Member
- 138 posts
- Joined: 3月 2016
- Offline
- aw_iv
- Member
- 8 posts
- Joined: 9月 2021
- Offline
- Hatchery
- Member
- 138 posts
- Joined: 3月 2016
- Offline
Yes, see _Alt file - you can change i@stopped to i@whatever but just need to update the name in the other wrangles and attribute delete node. Also the only problem with this is as the point passes through it stops being close enough to colour the sphere, if you wanted to maintain the colour then TBH its probably going to need to be redone done in a solver.
Or a quick and dirty meathod might be just to do a seperate copy of the pop net and use the point from that? Really depends what you need to happen and look like (also example attached)
Or a quick and dirty meathod might be just to do a seperate copy of the pop net and use the point from that? Really depends what you need to happen and look like (also example attached)
Edited by Hatchery - 2022年2月5日 07:43:29
Love Houdini
- aw_iv
- Member
- 8 posts
- Joined: 9月 2021
- Offline
- Hatchery
- Member
- 138 posts
- Joined: 3月 2016
- Offline
This is handy for a full list of built in attributes: https://mrkunz.com/blog/08_22_2018_VEX_Wrangle_Cheat_Sheet.html [mrkunz.com]
Love Houdini
- aw_iv
- Member
- 8 posts
- Joined: 9月 2021
- Offline
Thanks for the cheat sheet. I have an other question if you don't mind. You said that there might be a way to redo this in a solver. So do you mean by not using Particles for this at all? Cause I still can't get exactly the behavior I want. I would rather have that the particles are able to pass through the object and "infect" multiple spheres on its way down. I mean without using the stopped attribute is there a way to tell Houdini once the Object got hit to start the "timer" with the fade to red and stop at Red=1 ?
- Hatchery
- Member
- 138 posts
- Joined: 3月 2016
- Offline
- aw_iv
- Member
- 8 posts
- Joined: 9月 2021
- Offline
-
- Quick Links