Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Is it possible to swim in Particles?

Discussion in 'General Discussion' started by ml785, Dec 3, 2021.

  1. ml785

    ml785

    Joined:
    Dec 20, 2018
    Posts:
    119
    Hi,
    I've been looking at a bunch of different water simulations.
    I'm interested in simulations that you can swim in but that also mimic water physics with collider and rigidbody interactions.
    The most realistic water physics I could find was simply water systems that are actually a bunch of Particle Systems with water shaders.
    However.. I am not used to particle systems. My question is, is it feasible to set up like a swimming pool of a bunch of water particles and have the player swim in them?
    I have never seen it done before, and I can't find any google results of this application, so I assume it doesn't work right.
    Thanks.
     
  2. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,553
    The reason why you don't see it often in finished projects is because water is computationally expensive and tricky to get right, and there are many ways the simulation can go sideways.

    Here's demo from 2008



    You could try doing something similar. It will probably be wrong in many ways in practice. Also, this water is a screen-space effect. Meaning issues with lighting, shadows, etc.
     
    ml785 and Antypodish like this.
  3. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    974
    It is tricky business, but there are plugins that can achieve this.

    Here's two:
    https://assetstore.unity.com/packages/tools/physics/zibra-liquids-200718

    https://assetstore.unity.com/packages/tools/physics/obi-fluid-63067

    Used to be free NVidia's flex system on asset store but they killed it:
    https://assetstore.unity.com/packages/tools/physics/nvidia-flex-unity-plugin-samples-1-0-beta-121316

    That's for actual particles. If you're fine with surface you can get something much more lightweight, like:
    https://assetstore.unity.com/packag...ts/kws-water-system-standard-rendering-191771
     
    ml785 likes this.