force_table_of_contents #
Deflects curves away from collider surfaces, applies friction near the surface, and restores the original curve length afterward. Collision is evaluated against an SDF volume — curves are reconstructed point-by-point from root to tip, reflecting off the surface when they penetrate.
This is a procedural collision resolver, so it makes no claim for temporal stability. For temporal stability, collisions must be resolved during a simulation, either directly during the primary simulation, or with this node in a sop solver. See the ground smoosh example for more details.
Curves #
Curves may be sampled at a higher rate than they come in for better collision resolution. The higher resolution collision positions will then be interpolated back on to the original curves to preserve topological consistency.
Collisions #
Curves are resolved in such a way that curves will reflect off collision surfaces and will not result in instabilities around the length, unlike a standard point collision method.
Both polygons and SDFs are supported as collisions. If polygons are provided, they will be converted to an SDF.
Soft Collisions #
Soft collision depth controls how sharply the collision activates. At 0, collision is binary (in or out). Higher values produce a gradual blend into the reflected direction over the specified depth, softening the transition.
Sometimes it is preferable for a curve to be allowed to slightly penetrate a collision body. Enabling Soft Collision will blend in the collision behavior over a certain depth into the SDF.
By default, this is set to be the amount of Surface Offset so that the original collision surface is still considered ‘hard’.
This can be a useful tool for reducing high frequency jitting over time when colliding with high resolution SDFs.
Collision Correction #
Collision correction optionally pushes colliding points outward along the surface normal, helping curves clear the surface rather than sliding exactly along it.
Deflection #
After a collision, the accumulated deflection orientation is tracked and blended into subsequent points. This causes the curve to continue bending away from the surface rather than immediately returning to its rest direction.
Stiffness #
By default, hair_collision will bend directly at the collision site. This can look awkward for dry hair, so the stiffness parameter can be turned up to blend the collision into the rest of the curve to have a more natural feel.
Friction #
Points near the collider surface have their position and velocity blended toward the collider’s velocity field. This simulates surface friction — curves close to the skin move with it.
Friction activates within a configurable distance from the surface, with an optional soft falloff zone for gradual blending. Position update can be disabled to affect only velocity.
When friction is applied, the surface velocity will be copied to the curves within a capture distance.
Optionally, the friction can be applied to position directly.
the velocity will be sampled from the vel field of an existing SDF, and if polygons are provided, v is expected to be set.
Troubleshooting #
The main issues to consider when troubleshooting are:
- Curves being ’trapped’ just inside the collision surface: Consider enablng Collision Correction or Deflection.
- Collisions are too high frequency and jittery over time: Consider enabling Soft Collision or increasing the Voxel Size to get a lower resolution collider.
- Points on curves are all smashing together or are creating high-frequency, jagged shapes after a collision: Consider enabling Overlap Relaxations.
- Curves are inside the collision shape: Ensure the SDF is high enough resolution to generate capture the gradient to the surface. Small, thin collision shapes require very high resolution SDFs. Also ensure that the curves don’t start inside the collision shape.