14

This is follow up question based on {this post}, indeed.

The question is how to attach color attribute to fluid particles?

For example when a part of colored fluid (as explained {here}) separates, how to keep the assigned color moving with the particle?

For demonstration check the following:

enter image description here

Developer
  • 1,607
  • 3
  • 20
  • 30

1 Answers1

2

The answer depends on how much control you want to have over the color. In Cycles you can use the Geometry node's Position output as a factor between two colors or two shaders, and this will give you a variation between them.

If you want control over the angle you can then route that Position output into a Normal node and connect the Dot output into the Factor of the two colors - rotate the sphere to change the angle.

If you want it to be driven by the distance from an Empty then look into Drivers.

And finally, as another possibility for coloring/texturing liquids you might look into how to create matcap materials in Cycles.

Mentalist
  • 19,092
  • 7
  • 94
  • 166