• 沒有找到結果。

CHAPTER 5 Speed Up by Segmentation and Interpolation

5.3 Following Benefit

Except time saving, interpolation also brings another enhancement in stability and accuracy. In mass-spring system, as shown in Fig 5.5, forces are propagated by springs iteratively for a couple of simulations. Over-length springs due to rapid forces usually make integration fail, or produce inaccurate visual results with too much flexibility. In order to correct the elongation, position-based and velocity-based corrections are proposed. However, both of them cost too much for iteratively operation, and may effect or be effected by collision response. For the same purpose, bilinear interpolation here also provides correction in spring length as shown in Fig

For another aspect about bending forces, our interpolation method also provides help. There existing a problem in mass-spring system that when connected polygons bend in a small angle, as shown in Fig 5.7, bending forces will cause nodes moving in deflective direction. Many proposed approaches aim to this disadvantage and tried to solve it. However, that usually costs too much time for accurate result. With our method, the polygons will be possibly chosen for interpolation for its small cross angle, as shown in Fig 5.8. Therefore, our approach will prevent part of nodes from stretched by bending forces.

Figure 5.7 Bending force in wrong direction while small angle Figure 5.5 Force propagation in

mass-spring system

Figure 5.6 Spring length correction after interpolation

Force → Force →

(1)

(2)

(3)

(4)

Figure 5.8 Better effect result after our interpolation

CHAPTER 6 Implementation and Results

In order to evaluate the effectiveness of animation, we implemented cloth simulation based on mass-spring system with and without our improvement. The simulation runs on a Pentium 4 PC with 3.4GHz CPU and 2Gbyte RAM, alone with NVIDIA GeForce 6600 GT graphic card.

The test case is hanging a piece of even cloth on two top corners as initial, then it will fall and swing when simulation starts. Fig 6.1 shows our simulation result. Cloth resolution is 64×64, with spring constant in 2000, and vertex normal threshold 0.025.

Figure 6.1 cloth simulation result of our system

Fig 6.2 shows the time comparison between with and without our improvement.

It can be seen that mostly our system spends less time than traditional method which performs integration for each node.

calculation time

0 0.0005 0.001 0.0015 0.002 0.0025 0.003 0.0035 0.004 0.0045

1 106 211 316 421 526 631 736 841 946 1051 1156 1261 1366 1471 1576 1681 1786 1891 1996 2101 frames

time (sec)

Original method with our improvement

(a)

calculation time

1 77 153 229 305 381 457 533 609 685 761 837 913 989 1065 1141 1217 1293 1369 1445 1521 frames

time (sec)

Original method with our improvement

Figure 6.2 time comparison between original simulation and after our improvement applied. (a) for 32××××32 cloth (b) for 64××××64 cloth

Fig 6.3 shows the proportion of region which is suitable for interpolation approach during the simulation. For difference cloth configuration, the percentage changes as well.

interpolation region proportion

0%

10%

20%

30%

40%

50%

60%

70%

80%

90%

100%

1 193 385 577 769 961 1153 1345 1537 1729 1921 2113 2305 2497 2689 2881 3073 3265 3457 frames

percentage

interpolation region proportion

Figure 6.3 proportion of regions which is suitable for interpolation (a) for 32××××32 cloth (b) for 64××××64 cloth

Fig 6.4 shows visual quality enhanced by our approach. The problem of spring over-length will be correct by bilinear interpolation without any extra operation.

Besides, with traditional method as in Fig 6.4(a), spring forces will make the whole cloth object moving up and down. This can be eliminated with large spring constant, but that will also cause integration fail easily. However, in our method, the problem is solved and crumples were produced near the middle of top edge more naturally.

(b)

Figure 6.4(a) spring stretch without interpolation

Figure 6.4(b) spring stretch after our improvement

Results above shows that our system has high efficiency, with cloth details preserved.

Additionaly, the always existing problem of spring stretch is solved at one time. Other simulation result is shown in below: Fig 6.5(a) shows a 64×64 cloth in wireframe with threshold = 0.022, while (b) and (c) has different value as 0.025 and 0.03. Vertices in yellow color is using interpolation, and others in red color is calculated by integration as original. It is notable that cloth details are still reserved.

Figure 6.5(a) simulation result with threshold=0.022

Figure 6.5(b) simulation result with threshold=0.03

In the following, Fig 6.6 shows our approach applied in a human action system.

Figure 6.6 Other simulation results in VR system

CHAPTER 7 Conclusion and Future Works

7.1 Conclusion

We have proposed a time-saving approach and a suitable algorithm for simulating cloth in real-time. As we applied approximated implicit method, which performs integration with a constant computation time, our system ensures the ability to simulate delicate cloth in real-time for interactive environment. From the concept in the Verlet method, we modify the algorithm and make it suitable for our time-saving preprocessing.

Since cloth is always tempted to have flat region, it is useful to interpolate internal nodes instead of calculating the integration repeatedly. We first use wavelet transform to efficiently build hierarchical tree about vertex normal. Then approximate the vertex positions by using interpolation, which takes less time than integration. As a result, there is no need to do integration for all internal nodes.

Not only saving times, our approach also provides corrections in spring length and bending force. After interpolation, spring length is averaged, which means

while original bending forces as spring force has the defects of direction at small bending angle. This improvement is our main contribution which is unrevealed previously.

7.2 Future Works

To get higher quality and efficiency, there are still some techniques can be applied.

1.Temporal coherence: Our method need to rebuild hierarchical tree before each simulation. Although wavelet transform is fast, always rebuild may not be necessary. Therefore, we can assume that if all vertex normal did not change too much, the last hierarchical tree will be adopted, and rebuild can be ignored.

2.Feature vector: Information of local curvature can be derived from vertex normal.

However, other factors, like external force, original object speed, and collision response, may also affects local configuration as well. To take all other factors into consideration, vertex normal can be substituted by feature vector, which includes force and speed of the vertex. Thus our method should be more suitable and tolerable.

3.Better interpolation method: Linear interpolation will cause more errors when vertex normal difference is larger. Small threshold for tree traverse will restrict the problem. However, it will also decrease the efficiency because fewer nodes can be interpolated. Power method is simple and able to interpolate smoothly in curves, but for near-flat region, distance between nodes after interpolation will not be as

uniform as initial, and springs will be changed into wrong length. A suitable interpolation method should give proper positions to the nodes in short time, and produce visual result properly as well.

Reference

[1] D. Baraff, A. Witkin, “Large Steps in Cloth Simulation”, Computer Graphics (SIGGRAPH’98 proceedings), Addison-Wesley, 32, pp 106-117, 1998.

[2] Yoo-Joo Choi, Min Hong, Min-Hyung Choi, Myoung-Hee Kim, “Adaptive Mass-Spring Simulation Using Surface Wavelet”, Proceedings of International Conference on Virtual Systems and MultiMedia, Sept. 2002

[3] K.J. Choi, H.S. Ko, “Stable but Responsive Cloth”, Computer Graphics (SIGGRAPH’02 proceedings), Addison Wesley, 2002.

[4] M. Carignan, Y. Yang, N. Magenenat-Thalmann, and D. Thalmann. “Dressing animated synthetic actors with complex deformable clothes”, Computer Graphics (Proc. SIGGRAPH), pages 99–104, 1992.

[5] M. Desbrun, P.Schröder, A. Barr, “Interactive Animation of Structured Deformable Objects”, Proceedings of Graphics Interface, A K Peters, pp 1-8, 1999.

[6] A. Fuhrmann, C. Gross, V. Luckas, “Interactive Animation of Cloth Including Self Collision Detection,” Proc. OfWSCG’03, University of West Bohemia, Czech Republic, pp. 141-148, 2003.

[7] M. Hauth, O. Etzmuss, B. Eberhardt, R. Klein, R. Sarlette, M. Sattler, K.

Daubert, J. Kautz, “Cloth Animation and Rendering,” Eurographics Tutorials, 2002.

[8] D. Hutchinson, M. Preston, T. Hewitt, “Adaptive Refinement for Mass-Spring Simulations”, Proc. Of the Eurographics Workshop on Computer Animation and Simulation, pages 31-45, Sep. 1996

[9] M. Kass. “An introduction to continuum dynamics for computer graphics”. In SIGGRAPH Course Note. ACM SIGGRAPH, 1994

[10] Young-Min Kang , Jeong-Hyeon Choi , Hwan-Gue Cho , Chan-Jong Park, “Fast and Stable Animation of Cloth with an Approximated Implicit Method”, Proceedings of the International Conference on Computer Graphics, p.247, June 19-24, 2000

[11] Y.M. Kang, J.H. Choi, H.G. Cho, D.H. Lee, C.J. Park, “Real-Time Animation Technique for Flexible and Thin Objects”, WSCG proceedings, pp 322-329, 2000.

[12] Z. Kacic-Alesic, M. Nordenstam, D. Bullock, “A Practical Dynamics System,”

Proc. of Symposium on ComputerAnimation, San Diego, California, pp. 7-16, 2003.

[13] M. Meyer, G. Debunne, M. Desbrun, A. H. Barr, “Interactive Animation of Cloth-like Objects in Virtual Reality”, Journal of Visualization and Computer Animation, John Wiley & Sons, 2000.

[14] S. Nakamura. “Initial value problems of ordinary differential equations”. In Applied Numerical Methods with Software, pages 289–350. Prentice-Hall, 1991.

[15] Loup Verlet. “Computer experiments on classical fluids:. i. thermodynamical properties of lennard-jones molecules. Physical Review, 159(1):98–103, 1997.

[16] Volkov, V. and Li, L. (2003), “Real-time refinement and simplification of adaptive triangular meshes”. Proc.IEEE Visualization 2003, pp. 155–162 [17] P. Volino, N. Magnenat-Thalmann, “Accurate Garment Prototyping and

Simulation”, Computer-Aided Design and Applications, CAD Solutions, 2(5), pp 645-654, 2005.

[18] 劉振鐸, 施仁忠,“可形變之布的動態模擬”, 1993

相關文件