Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question Is there any information or tools available for the simulation of fluids such as water in ECS?

Discussion in 'Physics for ECS' started by yifanchu183, Aug 27, 2022.

  1. yifanchu183


    Jul 4, 2019
    I need some help to implement fluid simulation and to be able to interact with other entities in DOTS physics.Thanks
  2. hippocoder


    Digital Ape Moderator

    Apr 11, 2010

    It's certainly doable in DOTS Physics, the Unity version has source so you'd be able to probably get something going that's performant. Havok would perform faster if using primitives, but for the best performance you'd want to code SPH from scratch in DOTS.

    The real problem isn't the behaviour but trying to get it at a decent performance by spatially dividing up the work, and good luck with that!

    In any case, once it's working you can render the particles to a buffer, blur it, generate a normal map and so on - that's the general way fluids are done with physics.

    You didn't indicate how much realism you needed, the depth, and so on. All these factors will change how much work you'd need, so I gave a pretty basic response.