Jump to content

Fluid Color mix


leviswolf

Recommended Posts

Hi,

I've been doing some R&D on mixing multiple fluids with different colors and densities. The most common approach, as far as I know, is using a SOP Solver to transfer Cd between particles, allowing the colors to blend. However, I'm concerned about how this will look in the render.

Once the particle simulation is meshed, it becomes a closed surface, which might prevent the internal color mixing from being visible. This led me to consider alternative approaches, such as rendering the inside using a VDB. I'm not entirely sure about that part yet.

Because of this, I decided to try mixing colors using microsolvers instead of relying on a SOP Solver with attribute transfer, aiming to generate a color field. My approach consists of:

  1. Gas Match Field – Creating a new field (color) based on vel.
  2. Gas Particle to Field – Transferring the Cd attribute from the particles to the new color field.
  3. Gas Diffuse – Attempting to blend the colors within the field.
  4. Gas Field to Particle – Transferring the blended field back to the particles.

This method seems to work, but I noticed that the actual mixing is happening due to Gas Field to Particle, which interpolates Cd every frame. While this gives me a decent result, the Gas Diffuse node doesn't seem to have any effect, and I have limited control over the blending process.

At this point, I'm stuck. Any ideas or suggestions on how to improve this approach?

Thanks!

Here's the file if someone wants to check it out, thanks!

TestColorMix.hip

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...