On this page | |
Since | 17.0 |
Vellum Solvers are a type of POP Solver that include support for internal triangle and edge collisions and explicit constraint geometry.
The Geometry data stores the dynamic attributes of the simulation as point attributes. It also stores the collision geometry, so the triangle or poly-line mesh is used to detect and resolve collisions. However, the way the points are held together is determined by the separate Constraint Geometry data. The Constraint Geometry data should have a one-to-one point correspondence with the Geometry. Polygons in the Constraint Geometry are interpreted as rules to maintain certain properties of the source points, such as distance or bend angle.
POP Forces can be wired into the solver-inputs to adjust the behavior of the object.
Usually an empty Vellum object is created using a Vellum Object DOP and patches of geometry are added to this object with Vellum Source DOPs.
Parameters ¶
Common ¶
Enable Collisions
Controls if any collision detection is done at all.
Self Collisions
Controls if self collisions are detected.
Time Scale
Scales the effective time of the Vellum solve. This can be used to create bullet-time like effects where the physics of the Vellum solver run at a different rate than the Houdini playbar. A value of 2 will cause cloth to fall twice as fast, and 0.1 will slow it to a tenth the speed.
Velocity Damping
A more brute force approach to reducing dynamic velocity. The velocity is scaled directly by this amount, causing sudden movements to be quickly damped.
Iterations ¶
Substeps
Each frame will be broken into this number of substeps. Additional substeps are required for fast moving collisions or sudden forces.
The default substeps can be very aggressive, usually if the Vellum solver is too stretchy, raising substeps to 2 or 5 is a good first start.
Constraint Iterations
Within each substep, this number of passes will be taken by the constraint enforcement operations. Stiff constraints can require more iterations to converge. A good starting point is the diameter of the geometry - the number of edges between the farthest points.
Smoothing Iterations
The default constraint iterations use a Gauss-Seidel approach that is fast to converge. However, if it doesn’t fully converge due to too high stiffness, or impossible configurations, it will leave the error as bad looking triangles. The smoothing iterations use a Jacobi approach which is slower to converge but leaves error spread out in a more attractive fashion. The default of ten passes helps smooth out error, but might need to be increased if the overall Constraint Iterations is very high.
Collisions ¶
Collision Passes
Number of collision detection passes to perform. These are interleaved between the constraint iterations. Since collision is expensive, it is best to minimize this. But frequent interleaving helps avoid tent-poling effects where a small collider is fighting with the no-stretch constraints. In practice we find 10 to be correct for most situations, and substeps often being a better solution to increase quality.
Post Collision Passes
After all constraints are performed, a final round of collision detection is done. Collisions are often the most noticeable failure mode, and it is ideal if the next frame can start with non-intersecting geometry. Thus a final cleanup pass can achieve these requirements. We have found that “number of stacked layers + 2” is a good estimate for this number. This allows the effect of the underlying collider to ripple through the stacked layers fully.
Polish Passes
In any collision pass, any colliding pair may not be fully resolved. This number of additional collider-pair passes will be run until they are resolved. Since these are only performed on active colliders (and no new collision search is done) this is very cheap.
Layer Shock
The layer
integer point attribute is used to flag point as belonging
to different layers of cloth. Higher numbers refer to higher layers.
Layer Shock will make lower layers this many times heavier during collision
evaluation, ensuring the higher layers will move out of their way. The
rest of the dynamics are unaffected by this, and the difference is fixed
regardless of the number of layers between the two. This can be thought
of as a way to dial between one-way layering of sims and fully coupled
sims.
Friction ¶
Static Threshold
A threshold at which to apply full friction. When the ratio of the tangential velocity and the normal impulse is less than this, the tangential velocity will be fully eliminated through friction. This is roughly tan() of the slope angle that will allow sliding under gravity.
Dynamic Scale
If the static threshold fails, this controls what percentage the tangential velocity will be reduced in the dynamic friction case.
Enable External
A scale factor on the amount of friction effect to apply for collisions with external geometry.
Enable Self
A scale factor on the amount of friction effect to apply for collisions with self geometry.
Static SDF Enable
A scale factor for the volume collider’s static friction. Useful to create frictionless grounds.
Dynamic SDF Enable
A scale factor for the volume collider’s dynamic friction. Useful to create frictionless grounds.
Advanced ¶
Integration
When integrating points forward by their velocities, curved motions like swinging pendulums will be mispredicted and be damped by the constraint projections. A second order predictor recovers more of this curved motion and maintains more energy in the system.
In any case, if collisions are detected the system will fall back to first order to avoid excessive bouncing.
External Forces
The Vellum points will receive forces from DOP forces. Turning this off will remove this effect, and the points will only be affected by POP forces.
Default Mass
If no mass
attribute is on the incoming geometry, this will be used as the
default value for the points.
Usually mass should already be set by the Vellum Constraints SOP.
Default Thickness
If the incoming simulation or collision geometry has no pscale
attribute, it will be set to this value.
For simulation geometry, usually thickness should already be set by the Vellum Constraints SOP. For collision geometry, creating a pscale
point attribute manually will override this thickness value.
Secondary Constraint Pass ¶
Enable Secondary Constraint Pass
If this checkbox is turned on, all constraints in the specified Constraint Group will be solved in a separate, interleaved pass to the remaining constraints.
There are two main uses for this option. First, there are some expensive constraint types that do not need to be solved as frequently as the rest of the constraints, so enabling this option and choosing a low Solve Frequency can improve performance. For example, cloth bend constraints on high resolution cloth with low bend stiffness such a silk or cotton. You need to ensure that you're solving distance constraints every pass so the cloth doesn’t stretch. However, bend constraints are expensive and don’t need to be as strong, since silk and cotton have very low bend resistance and wrinkle easily. Solving the bend constraints as a secondary pass will give you strong performance gains. However, this method isn’t practical for stiffer material such as leather.
The second use case is constraints that cause frequent changes in the constraint topology,
which causes the solver to re-order the constraint solve, possibly causing jittering in the
remaining constraints. An example is organic tissue represented by tetrahedra and attached
together with sliding Stitch constraints. As the sliding causes changes in the constraint
topology the tetrahedra might jitter slightly as the constraint solve order changes. Moving
the Stitch constraints to another pass by setting Constraint Group to @type=ptprim
and
increasing the Solve Frequency to 1 will retain the same stiffness but eliminate tetrahedral
jittering due to changes in the solve order.
Constraint Group
The constraint group(s) that should be solved in the interleaved secondary pass. This parameter accepts standard group syntax, so can contain explicit group names and ad-hoc groups, often specifying one or more constraint types with something like @type==bend
. Any constraint not contained in these groups will be solved in the primary pass as usual.
Solve Frequency
The frequency at which to solve the secondary pass. A setting of 1 will solve the secondary pass as often as the primary pass, while a setting of 0.25 will solve once every four passes of the primary pass (one quarter of the time).
Multi-Pass Solve ¶
Enable Multi-Pass
The multi-pass options allow a substep to be repeated until certain conditions are met. The current conditions are designed to fix issues that are caused by disabled points causing geometry to be caught and cause the undisabled points to generate stretching. Since collisions always pre-empt constraints, the result is cloth or hair stretching. Points adjacent to auto-disabled points will be themselves disabled if too much stretching is detected. The solve step will then be repeated in the hopes this frees up the geometry.
Maximum Passes
The maximum number of times to repeat the substep. If no new points need to be disabled, the process will stop immediately.
Disable Stretch Ratio
The amount of stretch at the end of a solve step that will trigger points to be eligible for disabling. This is to detect when failed collisions are pulling the Vellum object apart. By failing additional points the object usually can be released and result in a better result than continuing to stretch.
Collisions ¶
Disable Failed Collisions
If points fail to resolve their collisions after the post-collision passes, they will be flagged as disabled, allowing them and any primitives attached to them to move collision free.
Reset Collided Points
If a disabled point detects it is no longer in a tangled situation, and is connected to non-disabled point, it will re-activate itself. The hope is that it has moved back to the correct side of the geometry.
Initialize Overlap Distances
The overlap_self
and overlap_external
attributes will be created
and initialized to respect the initial setup of the solver.
Note if the attributes are already present, they will not be initialized. If the configuration has changed due to modeling operations you may need to delete those attributes.
Update Overlap Distances
The overlap_self
and overlap_external
will be updated to reflect
the current configuration. The only decrease with this operation,
so to initialize set to a large initial value.
Tetrahedral Open Faces
The unshared faces of a tetrahedral mesh will generate collision geometry if this is set. Sometimes one wishes to use both a triangle shell and a tetrahedral mesh, making this operation redundant.
Motion ¶
Max Acceleration
Various acceleration limiting options can be used to prevent the simulation from being over-eager to obey non-realistic forces. These can otherwise result in large energy spikes.
Fallback to First Order Integration on Collision
If Max Acceleration is exceeded for a point, assume it signals a sharp, discontinuous collision where the second order prediction will be wrong and add erroneous motion, often in the form of bouncing. In this case, fallback to first order integration for the affected point.
Note
Grain and Fluid particles are always considered for fallback to first order, not only in the case of collisions. While this control is helpful to calm down simulations and avoid stray particles, it can decrease overall splashiness of grain and fluid motion. Increasing Max Acceleration can restore that splashiness.
Limit Acceleration in Velocity Update
Cap the amount that velocity of a particle is allowed to change as a result of any of the dynamics. This is useful to prevent some instant motion being mis-identified as a massive force, and thus avoid fly-away particles.
Limit Displacement on Collision
During the collision resolution, if the collision correction moves a particle more than the acceleration amount, cap the effect. The hope is to fail more gracefully when a part of a model snags on the cloth and is pulling it in a surprising fashion.
Disable Broken Welds
When a weld breaks, the two new points start off next to each other.
If the surfaces do not separate naturally due to whatever triggered
the break, they may trigger collision detection and be pushed out,
causing an explosive motion when breaking occurs. This option
sets the disableself
attribute when points are de-welded to avoid
these self collisions. Note that this may cause layered cloth to
self penetrate, however.
Normalize Stress
Normalize the stress computation over time, so that the computed values are more predictable as the Substeps parameter changes.
Breaking Frequency
How frequently welds and constraints are tested to see if they have reached their breaking point. Higher rates will give more accuracy to the solve, but changes to the topology from a broken constraint can slow down the solve considerably.
Never
Do not test for any breaking.
Per Frame
Check only once every frame, regardless of number of substeps.
Per Substep
Check every substep.
Sliding Method
The method used for finding the next closest position on the target geometry when sliding Attach to Geometry or Stitch Points constraints. Closest Point simply chooses the closest point on the target geometry to the projected sliding position. This approach is fast but can improperly jump across concavities in the target geometry. Traverse Polygons starts from the current target primitive and successively walks outwards, finding the closest point on the surrounding primitives. This approach is more expensive but handles concave target geometry better. Traverse Triangles (Optimized) is similar to the previous option in its improved handling of concavities, but can be many times faster as it uses specialized triangle distance functions. However, it can only be used with target geometry consisting of triangles.
Tip
Target geometry with quadrilaterals can be triangulated with the Divide SOP.
Sleeping ¶
Enable Auto Sleep
Particles that remain near-stationary for sufficient time will be
put to sleep by setting their stopped
attribute to 1
.
You can use the Pinned visualization to visualize which points are sleeping.
Velocity Threshold
How slowly particles need to be moving before they are eligible
for sleeping. The amount of time they remain below this speed
is accumulated in the deactivation_time
attribute. If they
exceed this speed, the deactivation_time
is reset to zero.
Sleep Delay
How many seconds particles need to remain at or below the velocity threshold before they are put to sleep. See the POP Awaken DOP for methods to wake the particles back up again.
Grain Collisions ¶
Vellum grains use a separate collision pass to deal with collisions between the grains. These parameters control that behavior. They are similar to those on POP Grains
Search Scale
Potential intersection particles are any within this scaled distance
of the average of the two particles pscale
attribute. This
is an overestimate because usually collisions are not updated
during the constraint iterations, so it needs to record not
just the currently colliding particles, but those that may
start to collide due to the earlier iterations.
This also effects the range of the attraction force in clumping.
Max Neighbors
The maximum number of particles that will be considered when searching for potential collisions over the substep. Capping this is useful to avoid excessive computations, if too many particles are created at one spot. This parameter is ignored if OpenCL Neighbor Search is enabled, in which case all neighbors are considered within the radius determined by Search Scale.
Assume Uniform Radius
The pscale
attribute is used to determine the radius of each
particle. If all particles have the same radius, faster acceleration
structures can be used to find neighbors.
Ignore Neighbors with Same Name or Piece
Ignore any neighbors that have the same non-empty name
or non-negative piece
point attribute.
This option can be enabled to create separate clusters of grains that only interact
with other clusters, often in conjunction with a Shape Match constraint to give
rigid behavior.
Enable Constraint Averaging
When multiple particles collide at the same time, this will average out all the constraints. This is effective in ensuring stability, but does not preserver momentum. Thus, when combined with internal forces, such as clumping, bunches of particles may accelerate under their own force.
Repulsion Weight
A weighting for how much the particle collision forces are weighted. A value of zero will disable particle collision.
Scale with the repulsionweight
point attribute.
Repulsion
How strongly particles are kept apart. Higher values result in less bouncy repulsion.
Attraction Weight
A weighting for how much the particles will naturally stick together when close. A value of zero will disable particle clumping.
Scale with the attractionweight
point attribute.
Attraction
How strongly nearby particles stick to each other. Higher values result in a less bouncy adhesion.
Enable Mass Shock
Artificially scales the mass of particles according to their position with respect to gravity. By making particles higher up lighter, stacks of particles will converge faster and be more stable.
Shock Scaling Power
The amount of scaling to perform. Higher numbers increase the contrast between successive particles. A value of 0 will cause no ratio between particles, a value of 1 a 15% ratio between two particles stacked vertically.
Too high a number makes higher particles extremely light and destabilizes the system.
Shock Axis
The up-vector used to define a gradient of particle masses.
Should be in the direction of stacking, so usually is opposite to that of gravity.
Fluids ¶
Vellum fluids use a density constraint to keep fluids incompressible, as well
as provide viscosity and surface tension. Any particle with a non-zero phase
attribute is treated as fluid.
Kernel Radius Scale
The radius of the kernel used for fluid calculations. In general the default value of 4 is recommended, but it can be increased or reduced slightly for different effects. In particular this value can effect the size of the drops created by surface tension, with larger values creating larger drops and fewer individual particles. Note that larger values will result in slower simulation and more memory usage for neighbor lists. Also values much below 3 or above 5 can lead to instability.
Viscosity
The viscosity of the fluid. Low values for viscosity help keep the simulation stable,
while higher values can simulate liquids like honey. A per-particle viscosity
attribute
can be used to multiply this value for variable viscosity. Fluid particles will different
phase
values will be solved independently for viscosity, allowing multi-phase fluid
behavior.
Collision Viscosity
The viscosity of the fluid in contact with an SDF collision. This value is only used when the solver has a ground plane or a collision object created with the VDB Collider SOP.
Viscosity Solver
The type of viscosity solve to perform. Explicit is fast but can be unstable for high particle counts, high viscosity, or low substeps. Implicit is slower but remains stable even for higher particle counts and viscosity values.
Viscosity Tolerance
The tolerance for the viscosity solve when using the Implicit solve. Lower values are more accurate at the cost of more iterations.
Max Viscosity Iterations
The maximum number of iterations for the Implicit viscosity solve.
Surface Tension
The surface tension of the fluid. Higher values for this setting reduce the curvature of the fluid
and cause it to form blobs. A per-particle surfacetension
attribute
can be used to multiply this value for variable surface tension. Fluid particles will different
phase
values will be solved independently for surface tension, allowing multi-phase fluid
behavior.
Adhesion
The adhesion of the fluid. Higher values for this setting cause the fluid to stick to the
normal surface of collisions, without any friction effects. You can increase Collision Viscosity
to have collisions' velocity affect the fluid in a friction-like way. A per-particle adhesion
attribute can be used to multiply this value for variable adhesion. Fluid particles
will different phase
values will be solved independently for adhesion, allowing multi-phase
fluid behavior.
Note
This value is only used when the solver has a ground plane or a collision object created with the VDB Collider SOP. The Sticky parameter of that node scales the Adhesion value, so should generally be set to 1 get adhesion effects.
Spatial Sort Interval
Vellum fluids and grains perform many calculations involving nearby points. Generally performance is greatly improved by ensuring that points that are near other in 3D space are also near each other in memory. This option enables a spatial sort of the particles at the specified interval of frames.
Note
This sort will change the point numbers of the particles, so it can be useful to add an id
attribute before simulation.
Minimal Solver ¶
Solver Mode
Specifies the type of solve to perform. Full provides the full Vellum feature set. The Minimal mode has reduced functionality, is optimized for fast Substeps, and is particularly useful for large grain and fluid simulations.
The Minimal mode has several limitations:
-
External collision geometry must be prepared with a VDB Collider SOP.
-
Changing constraint topology in not supported (e.g. breaking constraints, adding or deleting new constraints). However, emitting grains or fluid is supported.
-
Attach to Geometry constraints and Animated pins are not supported.
-
The built-in Wind forces only work on grains and fluid.
-
POP Forces are evaluated per-frame.
OpenCL ¶
Kernel Options
Specify any desired compile flags for the kernel.
Note
The Apple OSX OpenCL compiler requires only a single space between kernel options!
Finish Kernels
When Finish Kernels is disabled, no attempt is to wait for the OpenCL kernels to complete before continuing the next solver. This lets them run in the background until their results are actually needed. To simplify debugging or timing, it is useful to ensure kernels are finished to make sure errors are detected in the right spot.
Recompile Kernels
When loading kernels from disk the kernel is cached to avoid regenerating it every solve. Turning this on forces the re-loading and recompiling of the kernel. This is useful if #include files refer to code that has changed, or the kernel file is changed in an external text editor.
It should always be disabled when prototyping is complete.
OpenCL Graph Coloring
When doing graph coloring, a fast parallel OpenCL algorithm is used. Unfortunately it may require 10× more memory than the rest of the solve on tetrahedral meshes. Thus, systems that might fit in memory for solving will not succeed the color pass. Disabling this forces all graph coloring to be done in a slower sequential manner, preserving RAM for the actual solve.
OpenCL Neighbor Search
Perform any neighbor searches for grains and fluids using OpenCL, which is faster than the CPU but can use a bit more GPU memory.
Examples ¶
VellumSmokeSheet Example for Vellum Solver dynamics node
This example demonstrates combining a Vellum simulation with a Smoke simulation to create a billowing sheet.
See also |