• 沒有找到結果。

Summary of the Algorithm

CHAPTER 3 WATER AND SAND INTERACTIVE MODEL

3.7 Summary of the Algorithm

Figure 3.9 is the simulation proceeds in our system. First, we mix the sand and water particles together and then compute the particle neighbors. We use a k-d tree for the neighborhood queries. Then we consider the porous flow simulation of both sand and water particles. The absorption and emission are describe in Section 3.4 and Section 3.5. Using the SPH, the forces acting on the particles can be computed. The collisions handling is describe in

Section 3.5. After handling collision for sand and water particles, we use the adaptive sampling algorithm for splitting and merging particles. Finally, we update the position of sand and water particles. The time step in our system is a fixed integration, we use 0.001s in all examples.

Figure 3.9: Simulation proceeds in our system.

   

20

Chapter 4

Implementation and Results

We implement our system by using C++ framework and OpenMP for parallelized. The simulations are executed on a PC with Intel(R) Core i7 975 3.33GHz CPU and 8GB of memory. The animations are rendered using POV-Ray [23].

Since the scene objects we load are wireframe mesh, we need to transform these wireframe objects into particles. First, we slice a wireframe object to grids as shows in Figure 4.1. Next, we compute the signed distance fields in each grid. In order to compute the signed distance field, we have to sample points on the triangles of the object. After sampling the points, it is easy to compute signed distance fields. For each grid, we search for the nearest point on the triangles of the object. Then we can use this point and it's normal to decide the distance field of the grid.

Figure 4.1: Slicing the object to grids.

In the following figures, we show the results of the interaction between sand and water.

Figures 4.2(a) to (s) are the same scene with a sand duck and a column of water. In the beginning, the simulation consists of 11,234 sand and 23,050 water particles. The average computation time is 3.8s per step.

22

Figure 4.2(a): Step No. 000.

Figure 4.2(b): Step No. 030.

Figure 4.2(c): Step No. 060.

Figure 4.2(d): Step No. 090.

24

Figure 4.2(e): Step No. 120.

Figure 4.2(f): Step No. 150.

Figure 4.2(g): Step No. 180.

Figure 4.2(h): Step No. 210.

26

Figure 4.2(i): Step No. 240.

Figure 4.2(j): Step No. 270.

Figure 4.2(k): Step No. 300.

Figure 4.2(l): Step No. 330.

28

Figure 4.2(m): Step No. 360.

Figure 4.2(n): Step No. 390.

Figure 4.2(o): Step No. 420.

Figure 4.2(p): Step No. 450.

30

Figure 4.2(q): Step No. 480.

Figure 4.2(r): Step No. 510.

Figure 4.2(s): Step No. 540.

In Figure 4.3(a) to (z) are the same scenes with sand bunny and water armadillos. At the beginning, the simulation consists of 21,456 sand and 15,525 water particles. The average computation time is 3.67s per step.

32

Figure 4.3(a): Step No. 000.

Figure 4.3(b): Step No. 100.

Figure 4.3(c): Step No. 200.

Figure 4.3(d): Step No. 300.

34

Figure 4.3(e): Step No. 300.

Figure 4.3(f): Step No. 400.

Figure 4.3(g): Step No. 450.

Figure 4.3(h): Step No. 480.

36

Figure 4.3(i): Step No. 510.

Figure 4.3(j): Step No. 540.

Figure 4.3(k): Step No. 570.

Figure 4.3(l): Step No. 600.

38

Figure 4.3(m): Step No. 630.

Figure 4.3(n): Step No. 660.

Figure 4.3(o): Step No. 690.

Figure 4.3(p): Step No. 720.

40

Figure 4.3(q): Step No. 750.

Figure 4.3(r): Step No. 780.

Figure 4.3(s): Step No. 800.

Figure 4.3(t): Step No. 900.

42

Figure 4.3(u): Step No. 1000.

Figure 4.3(v): Step No. 1100.

Figure 4.3(w): Step No. 1200.

Figure 4.3(x): Step No. 1300.

44

Figure 4.3(y): Step No. 1400.

Figure 4.3(z): Step No. 1500.

Figures 4.4(a) to (z) are the same scene with sand Bunny and water Winnie. At the beginning, the simulation consists of 21,456 sand and 28,116 water particles. The average computation time was 9.87s per step.

Figure 4.4(a): Step No. 000.

46

Figure 4.4(b): Step No. 100.

Figure 4.4(c): Step No. 200.

Figure 4.4(d): Step No. 300.

Figure 4.4(e): Step No. 400.

48

Figure 4.4(f): Step No. 500.

Figure 4.4(g): Step No. 600.

Figure 4.4(h): Step No. 630.

Figure 4.4(i): Step No. 660.

50

Figure 4.4(j): Step No. 690.

Figure 4.4(k): Step No. 720.

Figure 4.4(l): Step No. 750.

Figure 4.4(m): Step No. 780.

52

Figure 4.4(n): Step No. 810.

Figure 4.4(o): Step No. 840.

Figure 4.4(p): Step No. 870.

Figure 4.4(q): Step No. 900.

54

Figure 4.4(r): Step No. 1000.

Figure 4.4(s): Step No. 1100.

Figure 4.4(t): Step No. 1200.

Figure 4.4(u): Step No. 1300.

56

Figure 4.4(v): Step No. 1400.

Figure 4.4(w): Step No. 1500.

Figure 4.4(x): Step No. 1600.

Figure 4.4(y): Step No. 1700.

58

Figure 4.4(z): Step No. 1800.

Figures 4.5(a) to (z) shows an animation of sand Winnie and a box of water. The simulation consists of 31,107 sand and 40,858 water particles. The average computation time is 15.74s per step.

Figure 4.5(a): Step No. 000.

Figure 4.5(b): Step No. 100.

60

Figure 4.5(c): Step No. 200.

Figure 4.5(d): Step No. 300.

Figure 4.5(e): Step No. 400.

Figure 4.5(f): Step No. 500.

62

Figure 4.5(g): Step No. 540.

Figure 4.5(h): Step No. 570.

Figure 4.5(i): Step No. 600.

Figure 4.5(j): Step No. 630.

64

Figure 4.5(k): Step No. 660.

Figure 4.5(l): Step No. 690.

Figure 4.5(m): Step No. 720.

Figure 4.5(n): Step No. 750.

66

Figure 4.5(o): Step No. 780.

Figure 4.5(p): Step No. 810.

Figure 4.5(q): Step No. 840.

Figure 4.5(r): Step No. 870.

68

Figure 4.5(s): Step No. 900.

Figure 4.5(t): Step No. 1000.

Figure 4.5(u): Step No. 1100.

Figure 4.5(v): Step No. 1200.

70

Figure 4.5(w): Step No. 1300.

Figure 4.5(x): Step No. 1400.

Figure 4.5(y): Step No. 1500.

Figure 4.5(z): Step No. 1600.

72

Chapter 5

Conclusion and Future Works

In this thesis, we present a method to combine various kinds of objects using adaptive sampling for particle-based sand and water interaction. Our model can combine the sand and water particles completely. The water particles are absorbed during the interaction with sand particles. By using the adaptive sampling algorithm, we can handle huge amount of particles with higher speed than before. Our system enables a realistic effect of animating the interaction between sand sculptures and water. During the simulation, the water collapses sand sculptures and sand particles turn into mud.

However, we do not consider the air particles in our system. For example, the bubbles generated when the water hit the sand sculptures. In the future, we plan to extend our scheme to produce the bubble effect as in the work of Cleary et al. [8] and Hong et al. [15].

References

[1] Adams B., Pauly M., Keiser R., Guibas L. J.: Adaptively sampled particle fluids. In SIGGRAPH ’07: ACM SIGGRAPH 2007 papers (New York, NY, USA, 2007), ACM, p.

48.

[2] Baraff D.: An introduction to physically based modeling: Rigid body simulation 1 - unconstrained rigid body dynamics. SIGGRAPH Course Notes, 1997.

[3] Becker M., Teschner M.: Weakly compressible SPH for free surface flows. In SCA ’07:

Proceedings of the 2007 ACM SIGGRAPH/Eurographics symposium on Computer animation (2007), pp. 209–217.

[4] Bell N., Yu Y., Mucha P. J.: Particle-based simulation of granular materials. In SCA ’05:

Proceedings of the 2005 ACM SIGGRAPH/Eurographics symposium on Computer animation (New York, NY, USA, 2005), ACM Press, pp. 77–86.

[5] Carlson, M., Mucha, P. J., Turk, G. 2004. Rigid fluid: animating the interplay between rigid bodies and fluid. ACM Trans. Graph. (Proc. SIGGRAPH) 23, 377–384.

[6] Carlson, M., Mucha, P., Van Horn III, R., and Turk, G. 2002. Melting and flowing. In Proc. ACM SIGGRAPH/Eurographics Symp. Comp. Anim., 167-174.

[7] Clavet S., Beaudoin P., Poulin P.: Particle-based viscoelastic fluid simulation. In SCA ’05: Proceedings of the 2005 ACM SIGGRAPH/Eurographics symposium on Computer animation (New York, NY, USA, 2005), ACM Press, pp. 219–228.

[8] Cleary, P. W., Pyo, S. H., Prakash, M., and Koo, B. K. 2007. Bubbling and frothing liquids. ACM Trans. Graph. (SIGGRAPH Proc.) 26, 3, 971–976.

[9] Darcy, H. 1856. Les Fontaines Publiques de la Ville de Dijon, Dalmont, Paris.

[10] Desbrun, M., and Cani, M.-P. 1999. Space-time adaptive simulation of highly deformable substances. Tech. rep., INRIA Nr. 3829

[11] Foster N., Fedkiw R.: Practical animation of liquids. In SIGGRAPH ’01: Proceedings of the 28th annual conference on Computer graphics and interactive techniques (New York, NY, USA, 2001), ACM, pp. 23–30.

74

[12] Foster N., Metaxas D.: Controlling fluid animation. In CGI ’97: Proceedings of the 1997 Conference on Computer Graphics International (Washington, DC, USA, 1997), IEEE Computer Society, p. 178.

[13] Foster N., Metaxas D.: Realistic animation of liquids. Graph. Models Image Process. 58, 5 (1996), 471–483.

[14] Génevaux, O., Habibi, A., Dischler, J.-M. 2003. Simulating fluid-solid interaction. In Graphics Interface, 31–38.

[15] Hong J.-M., Lee H.-Y., Yoon J.-C., Kim C.-H.: Bubbles alive. In ACM SIGGRAPH (2008), pp. 1–4.

[16] Lenaerts T., Adams B., Dutre P.: Porous flow in particle-based fluid simulations. In SIGGRAPH 08: ACM SIGGRAPH 2008 Papers (New York, NY, USA, 2008), ACM, pp.

49:1–8.

[17] Lenaerts, T., and Dutré, P. 2009. Mixing fluids and granular materials. Computer Graphics Forum 28, 2, 213–218.

[18] Miller G., Pearce A.: Globular dynamics: A connected particle system for animating viscous fluids. Computers and Graphics 13, 3 (1989), 305-309.

[19] Müller M., Charypar D., Gross M.: Particle-based fluid simulation for interactive applications. In SCA ’03: Proceedings of the 2003 ACM SIGGRAPH/Eurographics symposium on Computer animation (Aire-la-Ville, Switzerland, Switzerland, 2003), Eurographics Association, pp. 154–159.

[20] Müller M., Solenthaler B., Keiser R., Gross M.: Particle-based fluid-fluid interaction. In SCA ’05: Proceedings of the 2005 ACM SIGGRAPH/Eurographics symposium on Computer animation (New York, NY, USA, 2005), ACM Press, pp. 237–244.

[21] Monaghan J.: Smoothed particle hydrodynamics. Annual Revision on Astronomy and Astrophysics 30 (1992), 543–574.

[22] Monaghan J. J.: Smoothed particle hydrodynamics. Reports on Progress in Physics 68, 8 (August 2005), 1703–1759.

[23] POV-Ray, http://www.povray.org

[24] Stam J.: Stable fluids. In SIGGRAPH ’99: Proceedings of the 26th annual conference on Computer graphics and interactive techniques (New York, NY, USA, 1999), ACM Press/Addison-Wesley Publishing Co., pp. 121–128.

[25] Solenthaler B., Schlafli J., Pajarola R.: A unified particle model for fluid-solid interactions. Computer Animation and Virtual Worlds 18, 1 (2007), 69–82

[26] Zhu Y., Bridson R.: Animating sand as a fluid. In SIGGRAPH ’05: ACM SIGGRAPH 2005 Papers (New York, NY, USA, 2005), ACM Press, pp. 965–972.

相關文件