Animating Bubble Interactions in a Liquid Foam - Computer Science ...

13 downloads 41 Views 4MB Size Report
bubble particles as the sites of a weighted Voronoi diagram. The connectivity ... of bubble interaction forces to handle miscellaneous foam behav- iors, including ...
Animating Bubble Interactions in a Liquid Foam Oleksiy Busaryev∗ Ohio State University

Tamal K. Dey∗ Ohio State University

Huamin Wang∗ Ohio State University

Zhong Ren† Zhejiang University

Figure 1: Coke foam. By representing foam geometry using a weighted Voronoi diagram, our particle-based algorithm can efficiently provide bubble features in existing liquid animation. This example contains up to 100K bubbles and each frame takes less than 20 seconds to simulate.

Abstract

Links:

1 Bubbles and foams are important features of liquid surface phenomena, but they are difficult to animate due to their thin films and complex interactions in the real world. In particular, small bubbles (having diameter 0

e

a

f lad

b c

f lad

g

f

d

φ500K bubblebubble springs are created to handle strong interaction forces. Bubble sizes vary from 0.15mm to 3mm. The total number of polygons in the weighted Voronoi diagram is more than 1M. This example shows that the computational cost increases with the scene complexity as expected. The simulation time spent on animating bubbles is approximately one third of the time spent on constructing the Voronoi diagram in each time step. For 100K bubbles, our system simulates each rendered frame in 13 to 17 seconds (excluding fluid simulation time). It may seem that a dynamic Voronoi diagram construction would be more efficient, but a good practical solution for updating a 3D Voronoi diagram dynamically is still elusive unfortunately. In practice, it may suffice to compute a local Voronoi diagram for a sufficiently large neighborhood of each bubble.

Figure 8: Soap foam. Soap bubbles pile up in a water container.

Our animations were rendered at 30Hz, using the GPU-based micro-polygon ray tracing method [Hou and Zhou, 2011]. We modeled bubbles as semi-transparent objects with thin films separately from the scene, in order to avoid a large number of reflection and refraction rays if doing ray tracing on bubbles directly. We then incorporated transparent appearances of bubbles into the scene, by modifying corresponding rays. To speed up the rendering process, we also maintained a separate bounding volume hierarchy for bubbles, since their intersections with rays should be determined first. Bubbles in a soapy liquid made by dish detergent or hand soap tend to pile up, creating dense and complicated foam structures. In this example, we created such a scene with up to 4K bubbles, as Figure 8 shows. The bubble size varies from 0.25 to 1cm, and the water container is 16cm×16cm×16cm. At the end of the animation, bubbles can form at least ten layers in the foam. To prevent foam piles from sudden motion, we reduced the bursting coefficient τ, especially for those close to solid walls. We also varied the wetness coefficient λ according to the distance from the liquid surface, so bubbles on the top are drier than liquid surface bubbles. Each frame of this example took 0.6 to 2.0s to simulate. Soap Foam.

We simulated another Coke foam example that contains up to 16K bubbles with varying sizes, as shown in Figure 1 and 10. The largest bubble in this example has a size of 1.25mm, while the smallest bubble is 0.375mm big. It shows how the bubble size can affect bubble behaviors, such as bubble-bubble attraction and bursting. We use the same wetness coefficient λ = 0.4 for all bubbles, since they do not pile up. For testing purpose, we also animate the same scene by only using strong interaction forces for collision responses. This allows us to simulate bubbles as if they were floating plastic particles. The simulation time of each frame Coke Foam.

Notation λ k cdrag σlad α σsad β cvis , clap γ τ

Name Wetness coeff. Stiffness coeff. Drag coeff. Liquid adhesion coeff. Bubble attraction coeff. Solid adhesion coeff. Solid attraction coeff. Damping coeff. Volume correction coeff. Bursting speed coeff.

Usage To determine the resting distance between two bubbles (in Equation 3) To model the strong interaction force (in Equation 4) To model the drag force for a liquid bubble (in Equation 5) To model the liquid adhesion force for a surface bubble (in Equation 7) To model the weak interaction force caused by tension (in Equation 8) To model the solid adhesion force for any bubble (in Equation 9) To model the solid attraction force caused by solid (in Equation 10) To dissipate the kinetic energy over time (in Equation 12) To determine the amount of volume compensation in each time step To specify how fast bubbles burst (in Equation 13)

Unit 1 N/m kg/m3 N/m kg · m/s2 N/m kg · m2 /s2 1 1 m−1 s−1

Range [0, 1] [1.0, 8.0] [0.05, 0.5] [10.0, 20.0] [0.2, 0.6] [15.0, 30.0] [2.0, 6.0] [10−5 , 10−4 ] 1 [0.0125, 0.2]

Table 1: Parameters used in our system.

(a) Transparent bubbles

(b) Opaque bubbles

Figure 9: Pouring water. Water bubbles emerge on the liquid surface, but quickly burst due to their instability in the real world. We model this effect by using a larger bursting speed coefficient.

varies from 0.5 to 2.8s.

Our system is also able to simulate bubbles in a complex liquid scene, such as the pouring water example shown in Figure 9. There were 3.4K bubbles (with sizes of 0.75mm to 2.5mm) generated from the escaped air particles in the particle level set fluid simulator. Bubbles traveled with the water flow and emerged on the liquid surface due to the buoyant force. We increased the bursting speed coefficient τ in this example to account for the instability of water bubbles in the real world. Each frame in this example took 0.3 to 5.2s to simulate. Pouring Water.

7

Limitations

Like other particle-based approaches, our method does not handle bubble surface deformation and it is not suitable for large bubbles (whose diameters are greater than 1cm). For numerical stability, we formulate bubble interaction forces using a linear stiffness model. However, interaction forces in the real world can be highly nonlinear, and they can be affected by many other conditions that our system does not model so far, such as drainage and coarsening effects. When dealing with bubble-liquid interactions, we do not consider how bubble motions can affect the liquid flow. Accurately preserving volumes in our system requires a smaller time step, which increases the computational cost. Finally, our implicit integrator is not unconditionally stable due to its dependency on bubble connectivity, although it barely affects the system performance.

(a) Bubbles

(b) Floating particles

Figure 10: Coke foam. Images in (a) show that with our interaction forces, coke bubbles form clusters and are attracted to the mug walls. With interaction forces limited to basic collision responses, we can also simulate them as floating plastic particles in (b).

8

Conclusion and Future Work

In this paper, we showed that a weighted Voronoi diagram can be used to approximate the actual foam geometry in a sound manner, for both dry and wet foams containing small bubbles. Based on this representation, we demonstrated that a particle-based system can efficiently and realistically handle bubble interactions, even without explicitly modeling surface deformation or surface tension. Our experiment further tested its compatibility with existing liquid simulators, and revealed its capability of generating natural bubble effects, such as clustering, stacking, bursting, coalescing, and bubble-liquid and build-solid interactions. Besides solving those limitations listed in Section 7, we plan to accelerate our system by the use of GPU-based algorithms. Since we define most parameters in our system based on effects rather than physics, finding optimal values for them becomes a challenging and time-consuming task in practice. We are interested in carrying out both experimental and numerical study on this issue in the future.

Acknowledgments We thank Qiming Hou, Mingming He, Kun Zhou and the Graphics and Parallel Systems Lab at Zhejiang University for their support and helpful suggestions in rendering. This work was supported in part by the NSF grant CCF 0830467 and the NSF of China grant No. 61003048. We also thank NVIDIA for additional support

through equipment and funding.

References A, B., P, M., K, R.,  G, L. J. 2007. Adaptively sampled particle fluids. ACM Transactions on Graphics 26 (July). A, F. 1987. Power diagrams: properties, algorithms and applications. SIAM Journal on Computing 16, 78–96. B, D.,  W, A. 1998. Large steps in cloth simulation. In Proc. of SIGGRAPH ’98, E. Fiume, Ed., Computer Graphics Proceedings, Annual Conference Series, ACM, 43–54. B, A. W., G, T. G., O’, J. F.,  S, J. A. 2006. A semi-lagrangian contouring method for fluid simulation. ACM Transactions on Graphics 25 (January), 19–38. B, A. W., W, C., H, J. K.,  T, G. 2007. A finite element method for animating large viscoplastic flow. ACM Transactions on Graphics (SIGGRAPH) 26 (July). B, K. A. 1992. The Surface Evolver. Experimental Mathematics 1, 2, 141–165. B, T., B, C.,  B, R. 2010. Matching fluid simulation elements to surface geometry and topology. ACM Transactions on Graphics 29 (July), 47:1–47:9. C, F., K, H.,  L, S. 2011. Computing the volume of a union of balls: a certified algorithm. INRIA 2009 no 7013 Technical report, August, 1–19. C, N.,  M¨, M. 2011. Real-time Eulerian water simulation using a restricted tall cell grid. ACM Transactions on Graphics (SIGGRAPH) 30 (Aug.), 82:1–82:10. C, K.-J.,  K, H.-S. 2002. Stable but responsive cloth. ACM Transactions on Graphics (SIGGRAPH) 21 (July), 604–611. C, P. W., P, S. H., P, M.,  K, B. K. 2007. Bubbling and frothing liquids. ACM Transactions on Graphics 26 (July). D, D. J. 1995. Foam mechanics at the bubble scale. Physical Review Letters 75 (Dec), 4780–4783. D, R. 2001. Animation of soap bubble dynamics, cluster formation and collision. Computer Graphics Forum 20, 3, 67–. E, H. 2001. Geometry and Topology for Mesh Generation. Cambridge University Press, England. E, D., M, S.,  F, R. 2002. Animation and rendering of complex water surfaces. ACM Transactions on Graphics (SIGGRAPH 2002) 21 (July), 736–744. F, N.,  M, D. 1996. Realistic animation of liquids. Graphical Models and Image Processing 58 (September), 471–. G, B., D, B.,  J, G. 2000. The steady shear of three-dimensional wet polydisperse foams. Journal of Non-Newtonian Fluid Mechanics 92, 151–166. G, S. T.,  H, D. H. 2004. Better with bubbles: enhancing the visual realism of simulated fluid. In Proc. of SCA. H, B., K, S.,  M, M. 2005. Measurement and modeling of the flow behavior of aqueous foams using a recirculating pipe rheometer. Colloids and Surfaces A: Physicochem. Eng. Aspects 263, 153–164.

H, J.-M.,  K, C.-H. 2003. Animation of bubbles in liquid. Computer Graphics Forum 22, 3, 253–262. H, J.-M., L, H.-Y., Y, J.-C.,  K, C.-H. 2008. Bubbles alive. ACM Transactions on Graphics 27 (August), 48:1–48:4. H, Q.,  Z, K. 2011. A shading reuse method for efficient micropolygon ray tracing. ACM Transactions on Graphics (SIGGRAPH Asia) 30 (Dec.), 151:1–151:8. I, G., G, E., L, F.,  F, R. 2006. Efficient simulation of large bodies of water by coupling two and three dimensional techniques. ACM Transactions on Graphics 25 (July), 805–811. K, M. 2009. Vertex-based simulation of dry foam. In Master Thesis, University of Copenhagen, Denmark. K, B., L, Y., L, I., J, X.,  R, J. 2007. Simulation of bubbles in foam with the volume control method. ACM Transactions on Graphics (SIGGRAH) 26 (July). K, Y., S, Y., L, M.-C.,  P, C. S. 2011. The immersed boundary method for two-dimensional foam with topological changes. Communications in Computational Physics. K, A. M., R, D. A.,   S, F. 2003. Structure of random monodisperse foam. Physical Review E 67. K, A. M., R, D. A.,   S, F. 2004. Structure of random foam. Physical Review Letters 93, 20. K¨, H., V, C.,  G, G. 2002. Simulation and rendering of liquid foams. In Proc. of Graphics Interface, 81–88. L, F., G, F.,  F, R. 2004. Simulating water and smoke with an octree data structure. ACM Transactions on Graphics (SIGGRAPH) 23 (Aug.), 457–462. L, F., T, J., K, N.,  F, R. 2008. Twoway coupled SPH and particle level set fluid simulation. IEEE Transactions on Visualization and Computer Graphics 14 (July). M, V., U, B., M, D., S, M.,  H, M. Y. 2006. Physics based boiling simulation. In Proc. of SCA. M¨, M., C, D.,  G, M., 2003. Particle-based fluid simulation for interactive applications. P, L., G, J.,  B, A. 2008. Interfacial rheology study of espresso coffee foam structure and properties. Journal of Food Engineering 1984, 3, 420–429. R, C., S, I.,  A, H. 2012. Laguerre tessellations for elastic stiffness simulations of closed foams with strongly varying cell sizes. International Journal of Engineering Science 50, 1, 70 – 78. S, F., B, A. W.,  H, J. K. 2009. A point-based method for animating incompressible flow. In Proc. of SCA, ACM, New York, NY, USA, SCA ’09, 247–255. S, J. 1999. Stable fluids. In Proc. of SIGGRAPH ’99, Computer Graphics Proceedings, Annual Conference Series, 121–128. S, J. M. 1998. The geometry of bubbles and foams. Foams and Emulsions (NATO ASI volume E) 354, 379–402. T, J. E. 1976. The structure of singularities in soap-bubblelike and soap-film-like minimal surfaces. Annals of Mathematics 103, 3 (May), 489–539.

T¨, N., S, F., S, S., M¨-F, M.,  G, M. 2007. Real-time simulations of bubbles and foam within a shallow water framework. In Proc. of SCA, 191–198. T¨, N., W, C., G, M.,  T, G. 2010. A multiscale approach to mesh-based surface tension flows. ACM Transactions on Graphics (SIGGRAPH) 29 (July), 48:1–48:10. W, H., M, G.,  T, G. 2007. Solving general shallow wave equations on surfaces. In Proc. of SCA, 229–238. W, D.,  H, S. 2001. The Physics of Foams. Oxford University Press. W, D., P, N., H, S.,  P, D. 1993. Steadystate drainage of an aqueous foam. Physical Review Letters 71, 6, 2670–2673. W, M., R, D., K, B. M., B, S., S, J. R.,  O’B, J. F. 2010. Dynamic local remeshing for elastoplastic simulation. ACM Transactions on Graphics (SIGGRAPH) 29 (July), 49:1–49:11. Z, W., Y, J.-H.,  P, J.-C. 2006. Simulation of bubbles. In Proc. of SCA, 325–333.