tyFlow Forum
Particles Change Color on Collision? - Printable Version

+- tyFlow Forum (https://forum.tyflow.com)
+-- Forum: tyFlow Discussion (https://forum.tyflow.com/forum-1.html)
+--- Forum: General Discussion (https://forum.tyflow.com/forum-2.html)
+--- Thread: Particles Change Color on Collision? (/thread-4449.html)



Particles Change Color on Collision? - Chrissonator - 09-10-2024

So, I want to make particles change color and move with a collision object, I've searched everywhere, but have had no luck with finding anything...

For example, if I have a layer of bathroom tiles that are white, and the tiles change to blue as an object passes through it. Smile In other words, creating the effect seen at 0:33 in this video:




RE: Particles Change Color on Collision? - RomanB - 09-10-2024

Hello. I would also like to know more and will add to the question. I can't figure out how to achieve a certain effect. I understand how to do it in "particle flow" and even more clearly in "thinking particles", but it is more difficult for me to understand the logic of "ty flow". Namely, how to paint the surface with particles (for example, the effect of getting wet from rain) and, secondly, how to paint the particles themselves from a raster image from the surface (mosaic effect). Is it difficult to do? Sorry about my poor English.

In "thinking particles" this is done clearly and simply. That is, both effects - you can paint particles born on the plane with the material applied to the plane. And you can also activate a mask on the object's material with a stream of particles when a particle approaches (or collides) with the object. The adipose of the spot in the mask from the flying particle is adjusted and so you can, for example, depict wetting from splashes.

(09-10-2024, 04:32 AM)Chrissonator Wrote: So, I want to make particles change color and move with a collision object, I've searched everywhere, but have had no luck with finding anything...

For example, if I have a layer of bathroom tiles that are white, and the tiles change to blue as an object passes through it.

If I understand your question correctly, you can probably send the tile particles to a new event and change the material and forces there. You can send them to a new event using the collision operator.


RE: Particles Change Color on Collision? - d4rk3lf - 09-10-2024

@ Chrissonator
Surface test is your friend.
Just use that operator and reference the object that will change particles (you have various options: Distance, volume inside, volume outside), and just send particles to next event with different color (or material).
If you have some forces (wind, speed.. etc), make sure you copy them to event 2 also, so particles keep moving when entering second event with changed color.

@RomanB
I am not sure I understood all your questions (some reference images or video could help)... but it's really easy to scatter particles using texture.
Inside Position Object operator you have texture option, and you can instance any texture from material editor, and particles will be positioned on brightest spots of the texture (or opposite, if you want it like that)


RE: Particles Change Color on Collision? - RomanB - 09-10-2024

(09-10-2024, 12:56 PM)d4rk3lf Wrote:  
@RomanB
I am not sure I understood all your questions (some reference images or video could help)... but it's really easy to scatter particles using texture.
Inside Position Object operator you have texture option, and you can instance any texture from material editor, and particles will be positioned on brightest spots of the texture (or opposite, if you want it like that)

Thanks for the response. I will add pictures with a more detailed explanation of the desired effect a little later.

(09-10-2024, 12:56 PM)d4rk3lf Wrote: @ Chrissonator
Surface test is your friend.
Just use that operator and reference the object that will change particles (you have various options: Distance, volume inside, volume outside), and just send particles to next event with different color (or material).
If you have some forces (wind, speed.. etc), make sure you copy them to event 2 also, so particles keep moving when entering second event with changed color.

The collision operator would also work, I think.


RE: Particles Change Color on Collision? - RomanB - 09-10-2024

(09-10-2024, 12:56 PM)d4rk3lf Wrote: @RomanB
I am not sure I understood all your questions (some reference images or video could help)...

I answered in a separate thread I created now. I added images there.


RE: Particles Change Color on Collision? - d4rk3lf - 09-10-2024

(09-10-2024, 01:35 PM)RomanB Wrote: The collision operator would also work, I think.


Yes, but personally I avoid collision as test operator, simply because, if particles are fast, then they might be way over above collision, then in the next frame, way bellow collision op, so it won't detect them. 
Then in order to to fix it, I would need to make TyFlow work to 1/2, or 1/4 timestep, which will make simulation twice or four time slower. 

Surface test covers more space for detection, have much more options to control it (my favorite "surface inside"), and I never noticied it's any slower then collision operator. 

Collision operator I mostly use only for... collisions. Smile


RE: Particles Change Color on Collision? - RomanB - 09-10-2024

(09-10-2024, 06:35 PM)d4rk3lf Wrote: ...Surface test covers more space for detection...

Yeah, I didn't think about that.


RE: Particles Change Color on Collision? - Chrissonator - 09-21-2024

(09-10-2024, 12:56 PM)d4rk3lf Wrote: @ Chrissonator
Surface test is your friend.
Just use that operator and reference the object that will change particles (you have various options: Distance, volume inside, volume outside), and just send particles to next event with different color (or material).
If you have some forces (wind, speed.. etc), make sure you copy them to event 2 also, so particles keep moving when entering second event with changed color.

My next question would be... can the particles then be converted to VDBs and then colorized the same way? As I'm wanting to create that gaseous cloud effect where the particles change colors as the ship passes through it.


RE: Particles Change Color on Collision? - jacksonjohn - 11-07-2024

It sounds like you're looking to create a dynamic color-changing effect for your bathroom tiles when a collision object passes through. You may want to explore using shaders or particle systems in your game engine (like Unity or Unreal Engine) to achieve this. Consider implementing a trigger collider that detects when the object enters the tile area and then changes the tile's material color. Good luck!
free iq test with instant results