Luismarmay Posted March 15 Share Posted March 15 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: Gas Match Field – Creating a new field (color) based on vel. Gas Particle to Field – Transferring the Cd attribute from the particles to the new color field. Gas Diffuse – Attempting to blend the colors within the field. 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 1 Quote Link to comment Share on other sites More sharing options...
hannes603 Posted March 16 Share Posted March 16 flip_blur_Cd_blend_create_new_field.hip you can for ex just blur it with pc open... nice setup so far ! Quote Link to comment Share on other sites More sharing options...
paranoidx Posted March 19 Share Posted March 19 Nice approach! Here are my constructive notes: Using volume transfer for color can be computationally expensive because the color field in a volume requires three scalar fields A gas microsolvers does not compute in VDB format, which is sparse and can save both storage and memory. The Particle Cd attribute is a more efficient alternative to a three-scalar volume field for color. Consider enabling profiling to evaluate the performance and resource usage of your current setup Quote Link to comment Share on other sites More sharing options...
Luismarmay Posted 10 hours ago Author Share Posted 10 hours ago On 3/19/2025 at 5:52 AM, paranoidx said: Nice approach! Here are my constructive notes: Using volume transfer for color can be computationally expensive because the color field in a volume requires three scalar fields A gas microsolvers does not compute in VDB format, which is sparse and can save both storage and memory. The Particle Cd attribute is a more efficient alternative to a three-scalar volume field for color. Consider enabling profiling to evaluate the performance and resource usage of your current setup Thanks! ill check out your notes, normally i would work with particle Cd attribute but i was worried that i wasnt the best approach if i wanted to see that mixing inside the fluid, not only over the surface so i thougt that maybe doing the process with volumes would allowed me later to obtaint a volume field that i could render but after some research, i think i might need a differetn sim witch pyro to "emulate" that effect... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.