A downloadable system

This project aimed to create interactive fluids.

It uses a mix of shader and scripts to achieve the final look.

The script handles the actual moving of the fluids. Water is broken down into cells that store the velocity and density of the water at that point. When a cell is given velocity, its end position is calculated. The system works backwords to determine how much velocity and density there was in the water would have moved over. The velocity and density are then stored as the vertex colour of the water.

The shader then uses the vertex colour to offset the mesh appropriately. The velocity is also used to offset the normal maps, to further give the illusion of movement. Fluids can be given bass movement as well that moves a normal map at a given speed. The shader was setup to allow for any type of fluid to be created, for example magma or molten metals. 

When an object collides with the water, its velocity is used to determine how much velocity to apply to the water. A ripple effects is then created by taking the surrounding cells and setting the started velocities outwards.