Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Obi7 | Fluid collision with skinned mesh
#8
(30-08-2024, 02:22 AM)sam3dx Wrote: Let me sum up the task then. Let's say I have a character which is a SkinnedMesh generated on runtime and it could be a very fat person or a really thin one because of the blendshapes used for customization. My task is to pour a glass of water (really small amount of liquid in compare to the skinned mesh size) on this skinnedmesh and I want to have as much precision on this mesh vs water interaction as possible. Is it somehow possible using the current OBI stack of tools at all? And if it's not - what would be the most approximately close result I can achieve?

Hi,

It's possible, as just explained above: add a collider to each bone, that covers the mesh area affected by the bone. This is standard practice in games. Distance fields will do the best job of approximating the actual mesh geometry, out of all collider types.

To illustrate this using an actual example, see how the characters in Elden Ring are approximated using capsule colliders for physics interaction and hit detection purposes:


Of course, capsules are *a lot worse* than SDFs at approximating each bone's local geometry (specially if you use only one capsule per bone, you could do it the brute force way and get a very close approximation using many capsules/spheres per bone) but you get the idea. Depending on how you're generating the skinned mesh, how extreme your blend shapes are, and how often you're changing the body type, you may be able to have pre-generated distance fields that are simply scaled to follow the blend shape deformation, or may need to write a script that generates the colliders entirely at runtime after the final body shape has been decided.

kind regards,
Reply


Messages In This Thread
RE: Obi7 | Fluid collision with skinned mesh - by josemendez - 30-08-2024, 07:40 AM