Houdini 20.5 Fluids

Point variable viscosity: honey

On this page

Note

This project is based on the Fixed viscosity: honey tutorial. Please go through the lesson and save the file under a new name:

  1. Press ⌃ Ctrl + ⇧ Shift + S to save the scene.

  2. Enter a new name, e.g. honey_variableviscosity.

  3. Click Accept.

As a natural product, honey can have very different properties. Honey can be more liquid, extremely viscous and sticky, and even solid. Variable viscosity adds this little extra to a simulation, because it considers that there can be small differences in sugar content and temperature. These differences create areas with slightly higher or lower viscosity.

The honey simulation in the video is based on the parameters and values described below. The colors represent the fluid’s viscosity values.

Variable viscosity

You can find the relevant physical parameters in the FLIP Container SOP node under Attributes.

Note

For variable viscosity it’s not necessary to define a custom attribute-field pair.

  1. Turn on Viscosity and expand the tab.

  2. Turn on Varying Viscosity.

Random viscosity

You can get random viscosity values by introducing an Attribute Noise SOP.

  1. Add the Attribute Noise node between the source object’s output and the the FLIP Source node’s 4th input.

  2. Under General, change Attribute Names to Float. In the text field, enter viscosity.

  3. Make sure that Attribute Class is set to Point.

  4. Under Noise Value go to Range Values and choose Min/Max.

  5. For Min Value enter 1500, for Max Value enter 2500.

  6. You can check the values in the Geometry Spreadsheet pane. The average value should be around 2000.

  7. For even more randomization, turn on Animation ▸ Animate Noise.

Display variable viscosity

You can visualize the different viscosity values through an Attribute Adjust Color SOP node. Add this node after the FLIP Solver SOP.

  1. Go to the Adjustment Value section.

  2. Change Pattern Type to Remap Attribute.

  3. If you don’t like the color gradient, click the Presets gear icon on the right, and choose a new gradient from the drop-down list, for example Black to Orange.

  4. Under Remap Attribute ▸ Source Attribute, enter viscosity.

  5. Go to Source Range. For the first value, enter the Attribute Noise node’s Min Value, and Max Value for the second parameter field: 1500 and 2500.

Add viscosity attribute to the surface

The Attribute Adjust Color node translates the viscosity values into a Cd color attribute and shows it on the fluid surface. The image below shows the viscosity attribute transferred to a particle surface.

  1. Add a Particle Fluid Surface SOP node and connect it with the output of the Attribute Adjust Color node.

  2. Under Output ▸ Transfer Attributes add Cd to the list of already existing attributes.

See also

Fluids

For beginners

SOP WORKFLOW

Particle Fluids (SOP)

Viscous fluids (SOP)

Optimization (SOP)

FLIP Configure tools (SOP)

Particle Fluids (DOP)

Viscous Fluids (DOP)

Oceans (DOP)

Optimization