Liquid / dough / sand simulation

Hi everyone,

I have made some scripts to simulate Liquids / dough / sand like materials. You can watch them at work below.
I tried to optimize them to use less computing power, at the moment you can change a few parameters if it works slow, the behaviour of materials will change slightly and it will work faster. The physics engine gives some strange reactions when trying to make something like this. For instance changing the size of colliders was effecting the behaviour of the materials in very surprising ways, and those colliders do not even collide with anything. So I had to find some workarounds. The samples in the video are all in 2D, however the scripts can be used for 3D too. But it would be too resource consuming to fill an volume with those, so at the moment small 3D applications can be done with a good FPS.
(Edit :They are available at the asset store)

Kind of cool and mesmerizing to watch. Now if we had multi-core / multi-threading PhysX support, you could create even larger, more complex and realistic simulations. :wink:

We can but hope… That and the full 64 bit support.

The scripts are now available from asset store. Also here is the second demo video showing floating objects and surface waves:

Looks Cool, going to get it now. My new notebook can handle. 16GB ram. That would run smoothly.

Dear Nathan, thank you for your interest. You do not need lots of memory or fast CPU to run them. We tested on iPod and works fast with low number of elements, enough to make a liquid based game. If you want 300+ elements you will need a cutting edge computer, normally a rather old computer works very fine.

cant you make the mesh connect ? if they are close to each other ?

I am working on meshes at the moment. It seems that it will be too much CPU hungry if we merge the meshes, maybe I can find a workaround.

:smile:

Yah, now you’re talking! :wink:

As you may have noticed that video is dated Aug 12, 2008, so I would not hold my breath. It is excellent, simulating 60K particles with SPH.

would be great if u give a ripped version for the free users or for those that dont have enough money :smile:

When you say 300 components for a fast computer, do you mean 300+ “spheres” that I see in the simulation?

Anyway, nice job :wink:

Dear nevaran it does not seem possible to do such a thing at the moment.

reissgrant Yes 300+ spheres, or points. Maybe I can finish the mesh merging function if I have time.

Which computational method does Ti Liquid Scripts use for simulating fluids? Is it smoothed-particle hydrodynamics?

Dan Dixon Ti Liquid Scripts use particle methods, not SPH. However we are developing a new generation of liquid simulation that we call Surface Dynamics, and it uses entirely different methods, and much faster and more realistic. Please check http://forum.unity3d.com/threads/117955-Practical-Breakthrough-for-Liquid-Simulation It will hopefully be complete in a few weeks.