Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to increase stiffness?
#1
I have a soft body that I want to attach to a 3d object. When I work at the scale I want (size of around 0.1 units), it has zero structural integrity. I tried decreasing the mass of the particles but that didn't work. If I work with meshes around size of 1, then I can attach the soft body to an object and it has some structural integrity but it still flops around too much. Tried tweaking lots of params  (e.g. deformation resistancebut still the same. In older versions there was a control to increase connections between particles that has gone now. What I really want to achieve is to be able to interpolate between a rigid and a soft body, e.g. increase the stiffness of the spring programmatically between each particle. Can't see any kind of functionality like this exposed though. Any ideas?
Reply
#2
Hi!

(16-04-2025, 07:27 PM)softphysics Wrote: I have a soft body that I want to attach to a 3d object. When I work at the scale I want (size of around 0.1 units), it has zero structural integrity.

Scale should not affect perceived stiffness. How are you making the softbody smaller?
- Scaling solver down?
- Scaling input mesh down at import time?


(16-04-2025, 07:27 PM)softphysics Wrote: I tried decreasing the mass of the particles but that didn't work. 

Mass has no influence whatsoever on the stiffness of a softbody (or any other object). It simply scales the acceleration received/applied when interacting with other objects, since F = ma.

(16-04-2025, 07:27 PM)softphysics Wrote: If I work with meshes around size of 1, then I can attach the soft body to an object and it has some structural integrity but it still flops around too much. Tried tweaking lots of params  (e.g. deformation resistancebut still the same. 

What exactly do you mean by "size"? transform scale? import scale? simulation (solver) scale? world-space size in meters?

The main parameter in Obi that controls the maximum stiffness that can be reached by the solver is the solver's amount of substeps. Using more substeps will make the softbody stiffer when it's as stiff as possible (deformation resistance = 1).

Constraint iteration count (specifically, shape matching constraints) and their evaluation mode also have an impact on stiffness. In the solver component, make sure shape matching constraint evaluation mode is set to sequential. Then crank up the amount of substeps until results are acceptable.

The manual contains a very in-depth explanation of how the engine works internally and how substeps/iterations/mass affect the simulation:
https://obi.virtualmethodstudio.com/manu...gence.html

(16-04-2025, 07:27 PM)softphysics Wrote: In older versions there was a control to increase connections between particles that has gone now.

This parameter was used to manually make sure all particles were connected to their neighbors. This is automatically taken care of in newer versions, so the parameter was removed as it mostly was a source of user error: setting the connection radius too low would cause orphaned/unconnected particles, setting it too large would enormously increase simulation cost - eg. by connecting all particles to every other particle. There was only a small range of "right" values, that are automatically determined now.

(16-04-2025, 07:27 PM)softphysics Wrote: What I really want to achieve is to be able to interpolate between a rigid and a soft body, e.g.

By definition, a softbody cannot be completely rigid. The reason is that a softbody is composed of many individual pieces that can move freely: in Obi's case particles, other engines use tetrahedra, voxels, etc. Then these individual pieces need to have their relative motion limited in some way. This is usually done by performing multiple passes (called substeps or iterations in most existing engines) over all pieces, propagating position/velocity between them. In order to completely remove all relative motion between pieces - that is, making them behave as a rigid- requires an infinite amount of passes, and hence infinite computational resources.

Rigidbodies on the other hand are made of a single piece - this makes them a lot simpler and faster to simulate as they can only move and rotate, but of course they cannot deform.

Your best bet is to reduce your soft body's blueprint resolution as much as you can - to make each simulation pass faster - and use more substeps. This may get the softbody rigid enough that it can be though of as a rigidbody for your purposes. See the included "DeformableBarrels" sample scene.

(16-04-2025, 07:27 PM)softphysics Wrote: increase the stiffness of the spring programmatically between each particle. Can't see any kind of functionality like this exposed though.

This is what deformation resistance does. However even if each individual spring is infinitely stiff (deformation resistance = 1), they only affect a pair of particles, so the corrections they perform must be propagated to neighboring particles over multiple passes as I explained. If the amount of passes you use is too low for the amount of springs in your object, the remaining error in the simulation manifests as extra softness and/or jittering, depending on the engine you use. Note this -or slight variations of this- is how all realtime physics engines and most offline engines work.

kind regards,
Reply