Houdini 20.0 Vellum

Vellum fluids and soft bodies

On this page

One of the main strengths of Houdini’s Vellum technology is its interoperability. Very different material types can be simulated within a common framework: grains are able to deform soft bodies, cloth reacts on water and (almost) rigid bodies, and fluids with different physical settings will interact correctly. The following workflow guide describes the interaction between soft bodies and water: mushrooms fall into a shallow layer of water. The impact deforms the mushrooms and creates vivid splashes. All this happens in slow motion at 240 fps - 10 times slower than normal.

Here’s a preview of the simulation. The scene contains roughly 2.4 million particles to get enough detail and splash structures.

DOP or SOP

The first question is whether you should use a DOP or a SOP setup? With DOPs, the advantage is that you can use shelf tools to create the network. SOPs have to be assembled manually, but you can place all nodes within one Geometry OBJ node. Houdini’s mid-term aim is to move dynamics (pyro, fluids, Vellum) setups to SOPs and provide at least the same functionality as their DOP counterparts. SOPs can be seen as the more modern technology. Therefore, the project’s workflow descriptions are for a SOP-based version. If you're interested in DOP or shelf tool versions, please visit the Fluid setups page for more information. The parameter settings remain the same for both DOP and SOP.

Independently from which method you're going to use, the workflow is split into several tasks:

  • Import the mushroom geometry.

  • Turn the mushrooms into Vellum soft bodies.

  • Define a thin water surface.

  • Set up the solver and bring fluids and soft bodies together.

  • Create a fluid particle surface.

  • Cache the simulation data.

Importing the mushrooms

You're, of course, not limited to mushrooms and any other object will work as well. You can also use any supported file format, e.g. ABC, FBX, or OBJ. In this scene, several mushrooms are randomly placed and arranged to get interesting splashes. The objects can touch each other, but make sure that they don’t intersect. Another thing to consider is scale. In this example, the objects come as pre-assembled Alembics.

Note

If you have a Quixel Megascans account, you can download the mushrooms. The asset id is pdvcB (Bolete Mushrooms).

  1. In the Network Editor, make sure you're on obj level.

  2. Press ⇥ Tab to invoke the TAB menu. The TAB menu contains all available nodes. To add a node, look inside the subcategories or enter a name fragment in the search field.

  3. Create a Geometry OBJ node. In the TAB menu, enter geo and choose the node.

  4. Double click the node to dive into it. All following steps are performed inside the Geometry SOP.

  5. An Alembic SOP lets you import an ABC file. For FBX or OBJ files, add a File SOP.

  6. Go to File and point Houdini to the Alembic file with the Floating File Chooser.

Unpacking the mushrooms

To separate the mushrooms and make them available to the Vellum framework, the objects have to be unpacked and converted:

  1. Add an Unpack SOP and connect it to the upstream Alembic node.

  2. Although it’s not necessary here, go to Transfer Attributes and enter path. This attribute provides the paths to the individual objects inside the Alembic file.

  3. Add a Convert SOP and connect it to the Unpack node’s output. It happens very often that assets from external sources come as Polygon Soups. However, Vellum can’t handle this kind of geometry. Set Convert To to Polygon to prepare the mushrooms.

  4. A Transform SOP lets you compensate for scale. Connect the node with the upstream Convert SOP and adjust Uniform Scale if necessary, e.g. to 0.03. With Translate and Rotate you can reposition the object group.

Soft body mushrooms

In this scene, the mushrooms' secondary motion should be exaggerated. The soft bodies will have a rubber-like behavior to make the objects more deformable. When the mushrooms are compressed, they interact with larger parts of the fluid and create bigger splashes. The wobbling will also intensify the slow motion effect. However, the final settings are also a matter of personal preference. Please take the settings, given below, as suggestions. Stiffness settings are normally subject to some testing, because they also depend on the Vellum Solver SOP node’s Substeps and Constraint Iterations.

Note

The Stiffness values, given below, work for the described scene. It is very likely that you have to perform several tests to find working settings for your own objects.

  1. From the TAB menu, choose Vellum Configure Strut Softbody. This macro creates a setup of two Vellum Constraints SOP nodes. The first node’s Constraint Type is set to Cloth and defines the base material. The second node defines the mushroom’s inner structure and here, Constraint Type is Struts.

  2. Connect the Transform node’s output to the first input of vellumcloth1 to transfer the mushrooms' geometry.

  3. Select the vellumcloth1. The relevant parameter for the mushrooms' behavior is Stiffness. You can find parameters in the Stretch and Bend subpanes. Keep the stretch stiffness and set the Bend ▸ Stiffness parameter’s associated dropdown menu to 10000.

  4. From the Mass dropdown, choose Calculate Uniform. You now have access to a Density parameter. There, enter 1000.

  5. Go to vellumstruts1 and change Constraints Per Point to 2 to create a denser and more rigid constraints mesh.

  6. For Stretch ▸ Stiffness enter 2 and set the dropdown menu to 1000.

The result doesn’t look very convincing, but in conjunction with an appropriate Time Scale and the fluid particles you will get a natural behavior.

Water volume and domain

The water volume is defined through a box here, but it can be any other closed shape as well. Furthermore, the water has to be enclosed to prevent it from flowing apart. When the simulation starts, the fluid volume is compressed due to gravity and spaces between the particles. After 5-8 frames, the fluid normally settles. The fluid volume’s dimensions depend on the mushroom’s scale and position.

You also have to take into account that the splashes require some space to develop. The strength of the splashes also depends on factors like water depth, impact speed of the mushrooms, and the water’s physical properties. The water volume has to be large enough to catch (most) the splashes, but this also means more particles and longer simulation times. During testing, however, water volume and particle count can be kept small to get faster results.

Note

The following scale values are just suggestions and you're free to use other settings.

  1. From the TAB menu, create two Box SOP nodes. One for the water and one for the surrounding container. Both boxes will be corresponding, so that adjustments in size have to be made only once.

  2. Rename one box to water_volume and the other to water_domain.

  3. Set the water_volume node’s Size values to 1.5, 0.015 and 1.

  4. The water_volumne box expands to the positive and negative Y axis. To make it expand only in positive Y direction, (RMB)-click Size.Y. From the menu, choose Copy Parameter.

  5. (RMB)-click Center.Y and choose Paste Relative Reference.

  6. The parameter turns green and contains the expression ch("sizey"). This expression tells Houdini that all changes, made on Size.Y, will also affect Center.Y.

  7. Append /2 to the expression to half the value and finally set the box’s bottom to 0. Whenever you change the box’s height, it`s automatically aligned with the scene’s baseline.

    Domain and water volume should have the same X and Z dimensions. The domain’s bottom has to be placed at 0 as well. Again, some values are connected through relative references.

  8. Select water_domain.

  9. For Size.X enter ch("../water_volume/sizex") to get the X scale value from water_volume.

  10. For Size.Z enter ch("../water_volume/sizez").

  11. Go to Center.Y and type ch("sizey")/2 to align the domain with the scene’s baseline.

Water properties

Water properties determine the look and feel, but also the number of particles. Very viscous fluids, for example, don’t behave like water anymore, but perhaps like oil, cream or syrup. The number of particles is relevant for the amount of detail you’ll get. Don’t be afraid of high particle counts, because under-resolved fluids often look unrealistic and lack droplets.

  1. From the TAB menu add a Vellum Configure Fluid SOP. A close look reveals that this is actually a Vellum Configure Grain node.

  2. Connect the first input with the output of water_volume. The particles are created from the box’s volume.

  3. Particle Size is responsible for the number of particles. For testing, use values between 0.01 and 0.005 - depending on the size of your domain. The value shouldn’t be too high, because you might lose all the detail and won’t be able to evaluate the simulation. For the final simulation, values around 0.002 should create a decent amount of particles.

  4. In the Physical Attributes subpane, turn on Viscosity and Surface Tension.

  5. For Surface Tension use a value around 50. Surface tension contracts the fluid and keeps the particles together. In conjunction with Viscosity you can avoid large amounts of tiny droplets.

Merging the streams

All Vellum nodes provide three output streams for Geometry, Constraints, and Collisions. The streams from mushrooms and fluid have to be brought together and then linked to the Vellum Solver. Furthermore, you have to connect the water_domain as a collision object.

  1. Add three Merge SOP nodes and rename them to merge_geo, merge_con and merge_col.

  2. Connect the vellumstruts1 and vellumfluid1 nodes' first inputs to merge_geo.

  3. Repeat step 2 for the second and third outputs, and merge_com and merge_col.

  4. Finally, connect water_domain with the input of merge_col.

The Vellum Solver

The solver is the simulation’s centerpiece and performs the actual simulation. The solver is also responsible for all time-related parameters. The solver handles softbodies and fluids simultaneously, but both materials require different settings.

Note

In other SOP-based workflow guides, a Vellum Source DOP is introduced. This node provides fast access to the Emission Type parameter. There you can choose, whether you want single-frame or constant emission. In this example, all particles are created at once at frame 1 and Emission Type is not required.

  1. From the TAB menu, add a Vellum Solver SOP.

  2. Connect the three inputs with merge_geo, merge_con, and merge_col.

  3. Open the Solver tab.

  4. Set Time Scale to 0.1. With a standard frame rate of 24 fps, time is stretched by a factor of 10. So, the effective frame rate is 240 fps.

  5. Increase Substeps to 10 - this is a good value for fluids.

  6. Set Constraint Iterations to 20. These iterations are applied per substep and should therefore create sufficient stiffness for the softbodies.

  7. Fluids don’t need Smoothing Iterations, but they help to balance softbody constraints. 5 is a good compromise.

Deleting stray particles

The basic scene setup is ready to simulate and get a first impression. Click the button. Most probably you observe stray particles, leaving the domain. These particles should be deleted. In the image below you can see particles, leaving the domain box at low resolution.

  1. Double click the Vellum Solver to dive into it.

  2. Inside the node, open the TAB menu and add a POP Kill DOP.

  3. Connect the output to the FORCE node’s input.

  4. Open the Boundary tab and turn on Enable.

  5. From the Bounding Type dropdown menu choose Bounding Object.

  6. Go to SOP Path, click the chooser icon and choose the water_domain node.

  7. Finally, turn on Invert to delete outside particles.

Surfacing

Surfacing is a very individual process and it can take some time to achieve a satisfying result. The tips, given below, are not universal and you might need different settings with other simulations. One of the biggest issues with fluid particle surfaces is jittering. This effect often occurs with slow motion simulations, where distances between particles hardly change over time. There are sometimes moments, where holes appear and disappear in the next frame, and reappear one frame later. Or nearby particles are treated as one drop, then as separated droplets, and again as a single structure.

Another reason for jitter effects is an insufficient amount of polygons, controlled through the Particle Fluid Surface SOP node’s Particle Separation parameter. Particle Separation should at least equal the Vellum Fluid node’s own Particle Separation. Slightly smaller values catch more detail and smaller drops. On the downside, the mesh becomes heavier.

Another method to counteract jitter effects is to keep as many particles together in drops as possible. To achieve this, you can start with high Influence Scale. This parameter determines the maximum distance at which particles interact. Droplet Scale has to be smaller than Distance Scale, but can be close. Droplet Scale describes the distance between particles and surface. What you get is a rather thick mesh. The parameters from the Filtering tab can help you to make the mesh thinner, smooth out surface irregularities and - that’s important - reduce jitter effects. Note, that filtering removes detail, so try to avoid very aggressive values. Particle surface thickness, however, can also be used to mimic certain types of fluid. Milk or juice, for example, are often associated with thicker drops.

Vellum

Cloth

Softbody

Fluid

Constraints

Collisions

Other

Advanced