More selected projects

Surface Tension :: Fluids in space

"Surface tension in liquids is simply the interactions between the molecules of a liquid. The molecules at the surface do not have other like molecules on all sides of them and consequently they cohere more strongly to those directly associated with them on the surface which forms a surface "film". The net effect is an inward force at its surface that causes the liquid to behave as if its surface were covered with a stretched elastic membrane."

produced by: Daniel Gábana Arellano

Inspiration and motivation

'Surface Tension' is the first work in my series 'Fluids in space', which is inspired by the behaviour of fluids in a zero gravity environment such as space. Since this phenomena is difficult to achieve on Earth for obvious reasons, this work attempts to faithfully reproduce in a virtual environment the experience of how it would be to manipulate liquids in the absence of gravity.

While the aim of this project was to reproduce real fluids dynamics in a 3D virtual world, the capabilties of the computer used and OpenFrameworks are not powerful enough to reproduce real-time fluids dynamics. In order to produce the most realistic effect possible, I realised I must leave aside the computation of fluids dynamics and instead create a realisation of 3D bubbles that appear to be moving through space.

What is surface tension?

The phenomena of surface tension in liquids is explained as 'simply the attractive interactions between the molecules of a liquid'. The molecules behavior is to group closely together with other molecules on their sides, an arrangement which requires the least energy. When a drop of liquid is released in a zero gravity environment, surface tension is created as molecules arrange themselves in a sphere shape that minimizes the overall surface energy of the liquid and gives the appearance of having a film on the top of it. A sphere shape is the result owing to the fact that this shape has the minimum surface area and minimum surface energy due to its symmetry in all directions.

As we know, surface tension also exists on Earth and is very important for life and relevant in modern technologies such as raincoats or car wax. Without surface tension, even the smallest objects would sink underwater as they would be more permeable. For example, large particles such as dust or debris would not float on the water, instead sinking to the bottom where they would have the potential to disturb or even collapse the marine ecosystem. 

Technical details

This project was particulary challenging for me because it represents a new field of research which has previously been unexplored. This is the first time I have ventured into a Physics-based project and it has been a great learning experience. The physics engine I used in creating the simulation is Bullet Physics, which I've found to be a great library to simulate physics. It's also available in many programming languages such as C++, Java or JavaScript. The shaders used to make the soft body look like water was taken from the ofxLitSphere addon. This addon ported from the software vvvv by Alexey Roudenko and is based on the MatCap technique from ZBrush. In order to create a realistic bubble-like object, soft bodies were used which can be manipulated in terms of how stiff or wobbly they behave. Since the Bullet Physics engine uses its own 3D objects, I had to develop my own hands for Leap Motion made out of bullet spheres that would be able to collide with the soft bodies created. The interaction with the liquid bubbles needed to be gentle and slow, since fast or sudden movements would break the surface tension.

However, the software and hardware capabilities available to me did limit my work. My compture hardware was not fast enough to fluently process the code, sometimes resulting in slow processing and rendering. This also limited the functionality of OpenFrameworks as it would crash if too many soft bodies were processed or manipulated simultaneously. 

References

Surface Tension definitions:

http://hyperphysics.phy-astr.gsu.edu/hbase/surten.html

https://en.wikipedia.org/wiki/Surface_tension

OpenFrameworks addons used:

https://github.com/NickHardeman/ofxBullet

https://github.com/alexeyroudenko/ofxLitSphere

https://github.com/genekogan/ofxLeapMotion2