Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Anchor
SimpleColoring
SimpleColoring
Coloring that does not depend on the simulation

...

This is the simplest way, but also the least flexible. Once your liquid or fire/smoke simulation has completed, you can map textures over it.

...

  • you can plug textures in your mesh's material,;
  • you can modulate or replace your fire or smoke color with textures,;
  • you can color your particles by plugging a texture in the Color Map slot of the Particle Shader.

...

This is why this type of coloring works mostly for static images, or for applying simple color gradients or adding color noise to the fluid.

Coloring based on the simulated data

...

You can get the colors from the actual simulated fluid which creates much more natural looks.

Have colors or materials flow with the fluid simulation

...

You can setup your simulation to carry colors or texture coordinates around and you can use them to shade the simulation.

...

Phoenix offers two workflows which have pros and cons for different situations:.

RGB workflow

...

This workflow is good for mixing colors, creating new colors in the mix, and having colors dissipate over time.

...

  • Set up how the RGB will appear in the simulation:
    • You can emit them from Sources in many different ways - you can set up different Sources to emit different RGB, or even a single Source can emit different RGB based on a texture or on the vertex color of the emitter geometry. If you emit from particles, you can even use the Particle Texture to read particle data such as sizes, colors or speeds and emit fluid with colors remapped from this data.
    • You can create color using a Phoenix Mapper as well. See the How-To's section at the bottom of the Mapper page for ways of using it.
    • You can also create color using the Voxel Tuner or the Particle Tuner. They resemble the Mapper, but allow you much more per-voxel or per-particle control.
    • If you use Initial Fill Up from a Simulator's Liquid rollout, or Initial Liquid Fill from a node's Phoenix properties, the created liquid would be colored using the Default RGB color from the Liquid rollout.
  • As the RGB flows through voxels or gets carried around by particles, you can control how it mixes. If you want it to mix more, you can increase the RGB Diffusion option for liquids or use the Backtrace advection method for fire/smoke, or the Multi-pass advection otherwise.
  • The RGB of the completed simulation frames can be rendered by mapping your Fire or Smoke Color to the RGB channel, or by reading the RGB channel using the Particle Texture or Grid Texture and plugging it into your Particle Shader or your liquid mesh's material. This workflow also allows for more complex scenarios, where you could simulate black and white RGB, read it via a Grid Texture and use it as a mask for a Blend material - this way the parts of the mesh with black RGB can get one material, and the ones with white can get a completely different material - here is a tutorial that uses this technique.

...

  • Set up how the RGB will appear in the simulation - currently you can emit TexUVW from a Source, and it can be inherited from the emitter geometry's UV mapping. You don't have to plug any textures in the Phoenix Source in order for TexUVW to work.
  • During simulation, TexUVW will get smudged and twisted, so you can control or counter this from the TexUVW Dynamics settings.
  • Rendering TexUVW happens the same way as in the first section of this page - when colors do not depend on the simulated content. Just having the TexUVW channel present in the simulation caches is enough to fit over the fluid any textures you map in the Fire/Smoke Color options, or over the Mesh material. Note that for the Fire/Smoke rendering these textures need to be connected the the simulator through a Maya Projection node in Perspective mode.

...