15-11-2022, 12:10 AM
(14-11-2022, 04:44 PM)josemendez Wrote: This is because MeshColliders are "hollow": they have no volume, once an object is pushed trough its surface it won't be projected back outside.
For this reason, Obi implements DistanceFields as a more robust, faster alternative to MeshColliders:
If you want stiffer constraints, make sure you're using sequential evaluation mode (as opposed to parallel) since that converges much faster (see "Evaluation mode" in http://obi.virtualmethodstudio.com/manua...olver.html). If constraints are not stiff enough even in sequential mode, then you can resort to using more substeps/iterations, but yes that will have an impact on performance.
Yes, both are needed: distance fields consume more memory, cannot be scaled non-uniformly and modifying them at runtime is extremely slow, just to name a few disadvantages. However, they tend to be much more robust than MeshColliders and are also a lot faster when querying distance to a surface, which luckily is all particles need to do.
Distance fields aren't something unique to Obi, they have been used in games for decades, and coexisted with both analytic and mesh-based colliders for a lot of time. Each approach has its own strengths and weaknesses.
kind regards,
Thank you so much for replying so quickly! It all makes sense.
Using sequential instead of parallel made the softbody a lot stiffer immediately.
I also realised I hadn't disabled the jobs debugger and the saftey checks, which improved performance.
I will try the distance fields as soon as possible. It feels like it takes a combination of parameters for the desired result.