Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Does Obi Disregard Convex Mesh Colliders?
#6
(17-08-2020, 09:45 AM)virtushda Wrote: Thanks for the explanation, that makes sense.

Just going out on a limb here, but would it be too costly to essentially transform particles into non-scaled SDF space and then back?

This is already being done for all colliders, since contacts must be generated with both collider data and particle data on the same space, and multiple colliders might collide with different solvers (thus different spaces). So particle data is transformed from solver space to collider space when generating contacts, then all contacts are transformed back to solver space.

Thing is, distance between points is invariant under rotation and translation, but not under scale. So even when transforming into SDF space, the distances we read back from the SDF are all wrong, because they were pre-calculated from a non-scaled mesh and then stored. For uniform scale values, we can scale the value stored in the SDF, but this trick does not work for non-uniform scale.

A transform that preserves distance between points is called a rigid transform. If you've ever used the Unity.Mathematics package, you will see there's a RigidTransform struct that only contains rotation and translation, no scaling (for this very reason: https://docs.unity3d.com/Packages/com.un...sform.html). Once you throw scaling into the mix, you get an affine transform.

See: https://en.wikipedia.org/wiki/Rigid_transformation
Reply


Messages In This Thread
RE: Does Obi Disregard Convex Mesh Colliders? - by josemendez - 17-08-2020, 11:04 AM