Fluid simulation coloring issues

I am trying to make a rainbow fluid simulation, and am running into issues. The node setup and proper coloring of the simulation is below-

As the simulation hits the “floor” the rainbow effect spreads out to fill the bottom of it and the colors at the top of the simulation no longer form correctly as it stretches to fit the bottom. The screenshot of this is below-

I need the colors at the beginning of the simulation to remain until the end. It is not necessary for me to have the pool at the bottom which I assume is what’s causing the issue as the fluid spreads. I tried to raise the height of the emitter/ fluid objects but instead it just causes the fluid to drip and doesn’t keep the same thickness and consistency.

Any help is greatly appreciate and I apologize if theres a similar thread, I read various ones and couldn’t find the answer.

ALSO- can anyone help with how I begin the simulation after frame one so it can appear out of nowhere, and also how you make the fluid dissolve with time?

Thank you

I will assume you’re using the new fluid sim in blender 2.82.

For beginning after frame one, for your Flow object, flow behaviour set to Inflow, just below that Flow Behaviour pull down is a check box Use Inflow. Apply a keyframe to it to “turn it on” at a specific frame; at frame 0 uncheck it, tap the I key while the mouse is over that box which sets a keyframe, then move to frame 60 and check it, then type the I key again.

If you’re using the old blender there’s some similar setting you can keyframe to turn it off and on.

For the color problem, I’m a newbie when it comes to mapping textures but I’m guessing that you need to provide some input to the Vector input of your Gradient Texture. Maybe try the Texture Coordinate from the Input section? This video may help:

1 Like

To make the fluid dissolve with time put an outflow object under it, so that it touches/makes contact with it, and keyframe it as well. It acts like a drain.

1 Like

Thank you for sharing, the blender version I’m using is 2.81 beta, it has a way to key frame "flow"settings on the inflow object, but no matter what I do the simulation always starts at the first frame. I do not understand, and am wondering if it is a software issue?