Thursday, January 20, 2011

GUI Design

Here's an early sketch of the plan for the GUI. Note I have left lots of extra room to allow for more features, time permitting.

Mercury Reference Videos

Some cool videos I found with people playing with mercury.  Note its high surface tension, blobbiness, high reflectivity, and tendency to break into small spherical droplets.  The mercury also appears to leave very little residue and to be of higher viscosity than water:






Playing with Mercury

In my project, I'll be exploring how I can use the computer to interact and represent a mercury-like fluid in real-time, an example of material which can often not be interacted with in a non-virtual environment, either because of safety concerns (as is the case with mercury) or because the material simply doesn’t exist.   The project will take advantage of recent speedups in processing power to allow for real-time rendering of mercury and similar viscous fluids using an implicit surfaces representation and fluid dynamics.  Specifically, I would like to simulate the “blob-like” nature of mercury as well as other physical properties such as high surface tension.  The ultimate goal of this project is to then interface with a haptic device (the Phantom Omni to be specific) to provide the user something that will hopefully look and feel like real mercury or at least like something novel.

So far I've mainly been reading up on various literature and working on setting up the basic MFC GUI framework (more on this coming soon).  As far as I can tell, the basic game plan is as follows:

Implicit Surface Formulation
  1. Use a relatively small number of particles to create a particle-based viscoelastic fluid simulation, tweaking the parameters (e.g. no plasticity, no stickiness) till I get something that looks reasonably like mercury - or at least something that appears to have high surface tension
  2. Use the particles to get an implicit (metaball) formulation of the surface - e.g. the sum of spherical gaussian functions, the center of each located at the center of the particles.
Rendering
  1. Now, to render the implicit formulation, constrain "floater" particles to the implicit surface and use repulsion and fission to adaptively get a uniform distribution.
  2. Polygonize these points into a triangle mesh.
  3. Render the mesh in real time with OpenGL using smooth shading and environmental mapping for the reflection.
Interaction and Haptics
  1. Allow for interaction with the liquid, e.g. mouse strokes exert an external force on the particles
  2. Interface with the Omni haptic device to allow for applying forces and force feedback
So that's the basic plan.  As you can see, there is quite a bit to do, barring any unforeseen issues.  However, hopefully by sticking to a tight schedule, I will be able to accomplish most (if not all) of these goals on time.