Two Color Water

OK, I thought this would be a simple idea, but it’s turning out to be very difficult. I want two streams of fluid (2 seperate inflowssources). Each stream is a different color, and each stream also changes so that the beginning of each stream is a different color than the end (ie the leading edge is always blue, and the back is red). I thought this would easily be controlled by animating the color of the inflow materials. But the fluid color is controlled by the domain, not the inflow.

So only one color is possible for both fluids. I tried to make the domain box have two materials, but I apparently can’t have two materials on one object and animate them. To animate it appears to have to be one material for the whole object. Besides, only the first material on the domain shows up as the fluid.

Next I tried animating the domain material color. I can get the fluid to change color, but all of the fluids change color at the same time, not from the back to front (ie not newest fluid change and older fluid stays but everything at one time.)

Then I thought of trying to use the color ramp. I got the fluid to be two different colors, but no more, even when there were six or more colors on the ramp. If I could animate the color ramp that would be fine, but I can’t seem to animate the color ramp to change positions throughout time. Is that possible?

Does anyone else have any ideas of how to accomplish this? I’m running out. Thanks everybody.

It sounds like it’s limited by the way blender is written. There may be a way around it, but I can’t think of one. My advice: either jump into a python textbook or find someone who knows python, because it sounds like a scripting problem to me.

try setting mapping to ‘win’ and using an image texture. you can line up the texture with the scene using the ‘background image’ feature

I think you could use nodes to blend one material setting into another. Like, do a black and white version as the setting for how much one material blends into another. You can set the color blending with a blend texture set to a an Empty for positioning, which can be animated.

See if this setup makes sense and is helpful:

Attachments


You may get some idea from my Slow Color Smoke

Thanks guys, there’s some good suggestions here. I’ll check them all out, thank you.

I especially never would have thought of using an empty to guid a texture acting as a template. I’ll have to give that a shot.