Combining colors in a fluid

In the next steps, you’ll add another emitter to the container and make each emitter create different colored Density. You’ll see how different colored Density interacts in the container.

To combine colored fluids in the container

  1. Select the fluid container and choose Fluid Effects > Add/Edit Contents > Emitter.

    Maya creates a second fluid emitter called fluidEmitter2 and places it at the center of the fluid container, in the same position as the first emitter.

  2. With fluidEmitter2 still selected, select the Move Tool (Hotkey: w) and drag the emitter to the right of the container, so the emitters no longer overlap.

    Make sure you keep the emitter inside the container and on the plane by dragging only the X and Y manipulators. If you move the emitter outside the container, it will not emit.

  3. Open the Attribute Editor in the right panel of the Maya window, and click the fluidEmitter2 tab.
  4. In the Fluid Attributes section, turn on Emit Fluid Color.

    A message appears prompting you to set the fluid’s Color Method to Dynamic Grid.

    By setting the Color Method to Dynamic Grid, the color values you place in the container grid are recalculated by the fluid dynamics solver and changed during simulation. This means colors can interact during the simulation.

  5. Click Set to Dynamic.
  6. Click the Fluid Color color swatch in the Attribute Editor.

    The Color Chooser opens.

  7. In the Select blue from the Color Chooser.

    Move your mouse off the Color Chooser to close it.

  8. In the scene view, select fluidEmitter1, the emitter in the center of the container.
  9. In the Attribute Editor, turn on Emit Fluid Color for fluidEmitter1.

    You are not prompted to set the contents method to Dynamic Grid, because you already set the container to Dynamic grid when you modified fluidEmitter2.

  10. Click the Fluid Color color swatch.

    The Color Chooser opens.

  11. Select green from the Color Chooser.

    Move your mouse off the Color Chooser to close it.

  12. Play the simulation using the playback controls at the bottom of the Maya window.

  13. Stop the playback and go to the start of the playback range.