5.1
Applying Techniques to Maya
Applying this
method to the creation of a tool in Maya is not as straight forward
as replicating each step in the paper with the software. The first
hurdle is met when dealing with Maya’s fluid tools. Maya does
include a working set of fluid tools including 2d and 3d Navier-Stokes
solvers. What it lacks is the ability to generate a realistic 2d
overturning wave using these tools.
‘Maya
has a N-S solver suitable only for fluids situated inside a rectangular
computational box, and that won't be able to handle free-surface
simulations, like breaking waves. Unless somehow you constrain the
density inside a region of the box to be very large (that would
be the water) and in the rest of the box very small (that would
be the air) and then have a surface tracking/capturing device, like
a level set or a volume fraction, implemented as well.’ [8]
With this implemented
the wave would exist as level-set data and would need an appropriate
algorithm for building the surface of the water.
‘The
level set method defines the surface as the zero level set of a
scalar field, which is, say, positive inside the liquid and negative
outside it.’ [1]
With this method
the wave is described with a 3d voxel grid, or ‘scalar field’,
each element either containing water or no water at any given frame.
To convert this data into a renderable surface each voxel must be
sampled and a surface must be constructed for each frame.
‘The
surface is reconstructed at any time by means of an implicit surface
reconstruction algorithm like marching cubes, for example. We should
note that merging or splitting of the surface is “built-in”
for such methods and one doesn’t need to do anything fancy
in order to deal with them.’ [1]
Marching cubes
is a method of constructing surfaces from scalar fields first described
by W.E. Lorensen and H.E. Cline in their SIGGRAPH paper, ‘Marching
Cubes: A High-Resolution 3D Surface Construction Algorithm’.
The basic principle behind algorithm is to take data describing
space subdivided into a series of small cubes, and then to take
each cube in turn and build that part of the surface.
‘The
algorithm then instructs us to 'march' through each of the cubes
testing the corner points and replacing the cube with an appropriate
set of polygons. The sum total of all polygons generated will be
a surface that approximates the one the data set describes.’
[9]
Maya does not
supply such an algorithm as part of its basic toolset. Plug-ins
have been developed, such as Brian Townsend’s ‘Isosurface
Generator’, that can replicate the process of the marching
cubes algorithm inside Maya. Its suitability for this project however
is limited:
My isosurface
plug-in right now is implemented in such a way that it requires
reading in the scalar field data from a text file. I do not think
it would be much use to you in its current form. However, I have
just recently begun working on my own fluid solver based on a 2005
paper by Song, Shin, and Ko called "Stable But Nondissipative
Water". From what I can tell, this requires a similar algorithm
to the one you require. Therefore, I am planning to modify my isosurface
plug-in to receive the level set information from the fluid solver
and then construct the appropriate surface. [10]
We must then
take another approach if we wish to utilise the ideas discussed
in ‘Animation and Control of Breaking Waves’ as part
of our tool for Maya. The areas in which we encounter most problems
are that of fluid dynamics, and the surfaces associated with them.
We will take the core ideas behind the 2d slice method discuss how
we apply them to a process much more suited to Maya’s surface
tools.
As stated earlier
our ideal generated surface would be NURBS, due to its computational
speed and animation benefits. But from Viorel Mihalef’s paper
we also know that we require the surface to handle the merging and
splitting of the geometry. From this point on the actual control
over the wave shape is considered foremost over the accuracy of
the water’s dynamics. Remember that the waves we are creating
are not intended at this stage for rendering but as proxy surfaces
for character animation. |