Meshing Tips#
Starting points and fixes for the Meshing node. Every parameter mentioned here is documented in the node list!
Where To Start#
These are starting points, not recipes. Every project is different.
The settings referred to can be found in the Meshing node after checking the Higher quality meshing checkbox.
Calm water, pools, glasses.#
Leave Particle radius at its default and turn on Smooth SDF, raising Iterations until the surface settles. Add Smooth Mesh to take the stepping out.
Splashes, impacts, pouring.#
Raise Min neighbors until the stray spray stops leaving scraps of mesh behind. Reach for Curvature Flow rather than Smooth SDF, since it takes out noise without flattening the splash, and bring its Velocity Range in from the top so the fastest liquid is left alone. Add a light Smooth Mesh pass.
Honey, drips, thin sheets.#
Viscous liquid wants to read as smooth and continuous, so turn on Curvature Flow to take the particle noise off the surface while the strands keep their shape, and add some dilation on Reshape to fill those strands back out. Raise Adaptive radius so the thinnest parts stop flickering between frames.
Liquid inside a container.#
Turn on Snap to Colliders so the liquid sits flush against the walls. If you only want the top surface and not the shell wrapping around the container, turn on Clipping as well and raise Clipping Margin until the shell is gone. You can also cut the mesh with shapes of your own. Connect a shape or an imported model to the Clipping geometry input pin and every part of the mesh sitting inside it is removed, whether the liquid collides with it or not.
Mesh going into a game engine.#
Turn on Simplification, check Use max triangles and set the count to your budget. Turn on Preserve droplets so the small stuff isn’t flattened along with the bulk liquid. Raise Max iterations if you’re not reaching the target.
Common Problems#
The mesh flickers where the liquid is thin.#
Raise Adaptive radius, so the particles out there grow enough to keep holding a surface as they move. If the flickering is somewhere that isn’t sparse enough to be getting much of that growth, raise Density threshold as well: it sets where the growth tapers off, so raising it both brings more of the liquid into the effect and increases how much the particles already in it grow.
There are holes or tears in the surface.#
If you have raised Min neighbors, drop it back first: it throws particles away outright, and a thin region can lose the ones that were holding its surface together. Otherwise raise Reshaping on whichever smoothing operator you have running, until the holes close. If they remain, turn on Reshape and use a positive Open/Close amount big enough to cover them. If it’s happening everywhere, raise Particle radius a little.
Stray floating fragments of mesh.#
Raise Min neighbors, which removes the particles before they ever reach the field. A negative Open/Close amount on Reshape removes small islands after the fact.
Smoothing is eating the volume.#
Add some dilation on Reshape. It runs after both smoothing operators, so it has the last word on the field and puts the volume straight back. Curvature Flow also holds volume much better than Smooth SDF in the first place, so switching may mean you have nothing to correct for.
The mesh looks stepped or faceted.#
That comes from the triangles being locked to the grid, and no amount of field smoothing will reach it. Turn on Smooth Mesh and make sure Smooth normals is on.
Splashes are getting flattened along with the noise.#
Switch from Smooth SDF to Curvature Flow, lower its Max curvature, and mask it by Velocity Range.
The surface is broadly lumpy rather than noisy, and Curvature Flow isn’t touching it.#
Gentle rolling barely counts as curvature, so that operator will never see it. This is the job Smooth SDF is there for. If it persists, the simulation underneath may just be too coarse for the project, which is a Voxel size issue on the Simulation node rather than a meshing one.
The liquid doesn’t sit flush against a collider.#
Turn on Snap to Colliders. Raise Snap Distance if vertices further from the boundary need pulling in too.
Simplification isn’t getting down to the triangle count I asked for.#
Raise Max iterations. Each round can only collapse edges that don’t get in each other’s way, so a busier mesh needs more rounds to reach the same target. Raise it until you’re hitting the number and no further, since rounds that run once the target is met do nothing but still cost a little performance.
Simplification is destroying the small details.#
Turn on Preserve droplets and raise its Density threshold.