Detect fluid/particle contact

   2930   4   1
User Avatar
Member
9 posts
Joined: April 2013
Offline
Is there a way to detect when fluid contacts an item. For example to make a cube change color when fluid reaches it.

Also is there a way tell how much fluid is in contact. For example if cube is 1/2 submerged in water to have it change to a different color.
User Avatar
Member
390 posts
Joined: Jan. 2012
Offline
these are called wetmaps. the basic workflow for them is to color your flip fluid white, and color the object black. then use an attribute transfer to transfer the color from the flip fluid to the object.

then you need to keep track of the wetmap over time. ive attached what i think is the easiest / fastest way to do this.

if you have a really high res flip sim however, it can be kind of slow to run through this process, in which case you can just render out each frame of the wetmap without history, and then in comp take the maximum of the current frame and all previous frames.

Attachments:
forrunfastman001.hipnc (950.8 KB)

.
User Avatar
Member
9 posts
Joined: April 2013
Offline
Thanks Zdimaria,

It is nice, but I don't think it will work for what I want, or I don't see how.

I think I need some sort of event item.

I am trying to do a pipe break simulation. I want to quickly show the user the items that got wet by coloring them Red. This will eventually be attached to code to log all the items that had water damage and at what time.

Is there an SOP like an event, that can change or trigger other item properties when that event occurs?

None of this hast to look very pretty.
User Avatar
Member
390 posts
Joined: Jan. 2012
Offline
if i understand correctly you could really use this technique. you would just create a primitive attribute set to $F and store the min of that each frame. At the end of the simulation, you have a list of all of the faces in your scene, which ones have gotten wet, and at what frame that happened.

as far as triggering item properties, im not really sure what you mean by that. can you give an example of exactly what youre trying to trigger?
.
User Avatar
Member
9 posts
Joined: April 2013
Offline
Example of trigger event.

When water touches > 50% of a box an emitter on the box lets out a puff of smoke.
  • Quick Links