Search Unity

Interactive and realistic cloth/liquid touch

Discussion in 'General Discussion' started by Ethwood, Aug 31, 2019.

  1. Ethwood

    Ethwood

    Joined:
    Nov 6, 2016
    Posts:
    39
    I've been pulling my hair out on a perfect solution for this. I've been trying to learn liquid physics but couldn't quite get it right.

    Basically there's a game called Slime Simulator where you can interact with the slime using your finger and it creates "Holes" or Ripples in the slime in a very realistic way according to how you touch the screen. After a few seconds, the holes you make disappear and the slime reforms back to original shape. Different kinds of slimes have different speeds of reformation.

    From what it looked like, I could still spot glitches in the manipulation of quads when I was twisting the slime around, which confirmed that the slime is indeed a mesh being deformed and not just screen effects. The mesh seems to be "pushed down" - creating a hole if I just tap on the slime.

    So far I've tried Catlikecoding's tutorial tutorial and could achieve simple mesh deformation.

    Whereas I'm actually looking for something like this (GIF)- https://gifyu.com/image/KP0Z

    I know I'm close to this. Problem is, the tutorial's solution uses the mouse pointer's raycast as point of max force, attenuating downward force to nearby vertices uniformly.

    But in the mentioned game, a finger shape is shown as user presses on the screen. Also, the attenuation to nearby deformation is pretty sharp, just like real slime.

    What's the best way to approach this? Should I look at liquid physics assets? Or should I look at mesh deformation?
     
  2. Ethwood

    Ethwood

    Joined:
    Nov 6, 2016
    Posts:
    39
    Anyone? Even pointers would be big help right now
     
  3. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    You might be able to get that result using obi cloth. I do not think obi fluid is the right tool for it, its too rigid
     
  4. Ethwood

    Ethwood

    Joined:
    Nov 6, 2016
    Posts:
    39
    Thanks for your input. Unfortunately, I already used Obi Cloth for my current simulation, but it cannot quite replicate the effect shown in the reference slime video.

    Obi Cloth does give me a head start with mesh manipulation though.

    All I need to get a hint on is what principle was most likely used for mesh manipulation in the reference slime video above.

    Somebody suggested vector fields, but wouldn't that be too heavy a feature for a mobile device in realtime?

    I understand this is a unique situation, so I'm okay with researching and rolling my own solution, I just need a guidance on what to look at.