Jump to content

Flip colour changing upon collision


pyro_x

Recommended Posts

Hey everyone,

i have an issue that i need a quick fix for, i have a flip simulation (water fountain) which i need it to change colour as it collides. For instance starts white and when it collides the collided fluids turn red???

Link to comment
Share on other sites

I think there are two options that I can think off.

1.

Use a sop solver and a attribute transfer to transfer color attributes onto the particles. If you don't reseed, those particles should remain their color values.

2.

Unless you feel very comfortable with micro solvers, you can also solve it in the volume realm. You can use the same method that is used to create the 'stick on collision' method. Where a copy of the collision field is extrapolated. This creates an area around collision objects where you can test for certain values within the fluid. Then if the test is positive you can set the current voxel of a color field to a given value. You also need to advect this color field along with the fluid using the velocity field and finally project it to the particles and read it back on the next frame.

I think this method is the most robust, especially because it supports the reseed option but will take more time to setup.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...