 Figure 1 |
 Figure 2 |
 Figure 3 |
 Figure 4 |
|
Once Moonshine was functional inside of Maya, the immediate goal was to develop it into a production grade plug-in. This meant improving both speed and consistency of the meshing algorithm as well as developing a workflow that is artist friendly.
Mesh consistency not only includes producing the same output for the same input, but also there should be no noticeable gaps in the resulting geometry. Moonshine's meshing algorithm was designed to enforce mesh consistency at several levels. The algorithm uses a look-up system to determine if a vertex exists and uses it before it attempts to generate a new vetex. This avoids having duplicate point data in the resulting mesh. The polygonizer, by design, cannot generate overlapping triangles. An octree is used to cull any metaballs that are too far to impact the current triangle vertex.
To improve speed, the octree doubled as an acceleration structure. Culling the metaballs results in less math evaluations per point in the mesh. The octree also provided the necessary information on what areas of space to avoid evaluating entirely. Less evaluations translates into the plug-in running faster.
Figure 1 shows the first test animation done with Moonshine in Maya. On the left are two metaballs that and on the right is a NURBS sphere. The goal of the test was to ensure that the refraction and reflection properties of the metaballs held up as expected in comparison to the native primitives in Maya. The animation was rendered using mental ray.
Figure 2 shows 100 metaballs rendered with an the mental ray ambient occlusion shader.
Figure 3 shows the same metaballs as Figure 2 but in a different render setting.
Figure 4, the same 100 metaballs as before, this time enclosed in a checker shaded cube. The camera is initially located in front of a group of metaballs.
|
 Figure 5 |
 Figure 6 |
 Figure 7 |
 Figure 8 |
|
Figure 5 through Figure 8 shows frames from two animations after the octree was first implemented.
With its improved speed and culling abilities, Moonshine could now handle a much larger amount of metaballs.
|
 Figure 9 |
 Figure 10 |
|
Figure 9 and Figure 10 shows Moonshine in use with Maya's particle system. The particles are splashing against an invisible sphere. The dynamics of the animation are completely driven by Maya's particle system and the geometry is meshed out using Moonshine.
|
 Figure 11 |
 Figure 12 |
 Figure 13 |
|
More sample animations done with Moonshine and Maya's particle system.
|
 Figure 14 |
 Figure 15 |
|
Figure 14 was used to compare the animation Moonshine to Maya's blobby particles. The same particle dynamics were used for both clips.
Figure 15 is a test animation that done for a presentation given at University of Texas at Dallas.
|
 Figure 16 |
 Figure 17 |
 Figure 18 |
 Figure 19 |
|
A very noticeable, and often talked about, side effect of meshing metaballs is the generation of tiny triangles in order to fit the iso surface. There's a fair bit of research material that focus entirely on this topic. One very cost effective way is to smooth out the resulting mesh. The math behind Laplacian smoothing is straightforward and it doesn't take long to translate into code. The iterative Laplacian smoother in Moonshine took just a few hours to implement and the results are excellent.
Metaballs generally have a very round and smooth appearance. With some adjustments to the mathematical model metaballs can be made to produce strands and sharp peaks. This adjustment is called the Strand Factor in Moonshine. The range for this field ranges from 0 to 1.0.
Figure 18 shows the effects of the effects of Laplacian smoothing in combination with adjustments to the math model. The resulting geometry has very tendril-like properties.
Figure 19 show that metaballs can be used to create sharp points and peaks. This is achieved by setting a high value,close to 1.0, for the Strand Factor.
|