On this page


Imagine, you want to simulate water and a viscous substance like shampoo. One method is to set up two individual fluids. Another method uses the Vellum Configure Grains SOP node’s Phase attribute.

A description of how to set up individual fluids can be found on the Interaction with other Vellum constraint types page. The video below shows a high-resolution simulation.

Fluids with

  • equal Phase values, but different Viscosity and/or Surface Tension settings often stick together in touching areas.

  • different Phase values, but no Viscosity difference will interact, but behave like two fluids with no friction between them

  • different Phase values, and Viscosity and/or Surface Tension will separate more and hardly stick together.


Create a fluid volume

  1. On obj level, create a Geometry OBJ node, and dive into it.

  2. Add a Box SOP node, and rename it to fluid_volume.

  3. Create two Vellum Configure Grain SOP nodes, and rename them to water and shampoo.

  4. Select the Vellum Configure Grain SOP nodes.

  5. Turn on Create Points from Volume.

  6. Set Type to Fluid.

  7. Adjust Particle Size to 0.04 to control the number of particles.

  8. Change Mass to Calculate Uniform.

Adjust the fluids

  1. In the water node, set Viscosity to 0.5.

  2. In the shampoo node, set Density to 2000, and Viscosity to 3000.

  3. Also in the shampoo node, change Phase to 2 to get a better mixing effect.

Split the particles

  1. Add four Blast SOP nodes.

  2. Select all Blast SOP nodes.

  3. Under Group, enter @P.z<0. This expression only selects particles with negative Z positions.

  4. Set Group Type to Points.

  5. Now, select blast3 and blast4 only.

  6. Turn on Delete Non Selected to select only particles with positive Z positions.

Merge particles and constraints

  1. Create two Merge SOP nodes.

  2. Connect blast1 and blast3 (geometry) with merge1.

  3. Connect blast2 and blast4 (constraints) with merge2.

Adjust the Vellum Solver

  1. Add a Vellum Solver DOP node.

  2. In the Solver tab, set Substeps to 10.

  3. Decrease Constraint Iterations to 20 and Smoothing Iterations to 0.

Create a container

  1. Add another Box SOP node and change Size to 2, 1.5, 1.5 to enclose the fluids.

  2. Rename the node to container.

Connect the nodes

  1. Connect the nodes as shown in the image below.

  2. You can also add two Color SOP nodes to separate the fluids visually.

Example file

Vellum Fluid Phase Attribute

This example demonstrates how to create two interacting Vellum fluids with different viscosity and surface tension settings through the Phase attribute.