The Visual Computer manuscript No. (will be inserted by the editor)

YOUQUAN LIU1,2,3, HONGBIN ZHU2,3, XUEHUI LIU2, ENHUA WU1,2

Real-Time Simulation of Physically Based On-Surface Flow 1

Department of Computer and Information Science, Faculty of Science and Technology, University of Macau, Macao, China 2

Laboratory of Computer Science, Institute of Software, Chinese Academy of Sciences, Beijing, China

3

Graduate School of the Chinese Academy of Sciences, China

[email protected], [email protected], [email protected], [email protected]

Abstract Although many papers are published in fluid simulation, no much attention has been given to the on-surface

flow

involving

wetting

and

stains

transportation, together with erosion and deposition phenomena. In this paper, we introduce non-zero divergence in the mass equation of Navier-Stokes Equations to simulate the water penetration from the on-surface flow into the substrate material. Also, the

texture images simultaneously. By our model, the on-surface flow that accompanies water absorption can be simulated realistically in real-time with OpenGL preview rendering. Experimental results illustrate that our model can be widely applied to solve various problems of on-surface flow.

Keywords: On-surface flow, Navier-Stokes equations, Wetting, Real-time

volume of fluid method is adopted to track the free surface. With the computation of actual amount of absorbed water, we render the wetting effects with fully dry and fully wet

Figure 1: Lost Marilyn Monroe rendered with POV-Ray (The Chinese Painting “horse” by Beihong Xu from

http://www.rbzarts.com/changbin/cp.htm)

1 Introduction In computer graphics, the simulation of realistic object surface has always been a state-of-art research topic, not only from the rendering point of view but also for the dynamic simulation of

the visual appearance mainly coming from the external surface of the objects. In the real world environment, the appearance of object surface is subject to various outside conditions, such as illumination, weather, water or human activities, which lead to fruitful details. No doubt, the on-surface flow including wetting presents us

abundant appearances. Figure 2 presents a real world picture, which demonstrates wave ebbing along the coast. The wetting interface and the contact line are distinct and different degrees of moisture lead to different appearance. In previous work, the appearance of the substrate incurred by overflow fluid is seldom coupled with the on-surface flow. In [6], only the flow itself is considered with the impermeable surrounding material; [5] only simulates the flow in the material without on-surface flow, which controls the internal water propagation. In our algorithm we have tried to combine them together to simulate the real flow on the substrate material.

(2) Actual amount of absorbed water calculated to control the moisture of the substrate surface for rendering purpose; (3) Incorporating the erosion-deposition model into our framework as well as stains transportation on the surface. In the following sections, we firstly introduce the previous work and the background in Section 2 and 3. In Section 4, the system model and its solver are explained in detail. Rendering content is discussed in Section 5 and experimental results with rendering effects are given in Section 6. Finally, we put forward our future work.

2 Previous Work

Figure 2: Real scene of the coastal area, showing apparent distinction of wet area along the seashore from dry part of land to the damping part near the sea water.(Copied with permission from http://pinker.wjh.harvard.edu/photos/santa_barbara_califor nia/images/)

The idea here is to focus on the on-surface flow, that is, water flows on an object making the surface wetted, eroded or deposited, resulting a very external appearance of the object. In this paper, based on Naivier-Stokes equations, we introduce non-zero divergence into the mass equation to simulate the water penetration from the on-surface flow into the substrate material. With OpenGL rendering, we can simulate the wetting procedure of object surface with free surface presented together in real-time. Our primary contributions are in the following aspects: (1) First ever attempt on coupling the on-surface flow with the humidity of the substrate;

For the common fluid flowing, many literatures can be referred. For example, [7, 6] use particle level set method to track the free surface of fluid while the object below the fluid is impermeable. Actually, the flow on the surface changes the appearance of the underlying object. [4] uses the particle system to simulate the patterns created by the flow of water on surface while, considering the water absorption and material transportation. [5] simulates the stone erosion under the weather, where weather condition is used as a pressure boundary incorporated into the pressure diffusion equation. After the penetrating velocity under the object surface is computed, minerals and salts are dissolved and recycled according to the front velocity. However, their method is only to simulate the long-term effects without considering the actual on-surface flow, which is very important for the appearance of the surface itself. The idea of the painting on paper is similar to our work. For example, [3] uses the shallow water equation with the three-layer model to simulate the watercolor movement on paper, but due to the explicit format, the whole simulation is subject to timestep restrictions. They do not explicitly consider the free surface and the result

from water absorption. [1] uses VOF (Volume of Fluid) method to track the free interface of fluid with the tensionless boundary to ensure the stability, simulating high viscous oil painting on paper. [2] uses the LBE to simulate the ink flowing on paper with dispersion and absorption considered, but there is no free surface at all. In processing the flow of droplets, currently many researchers handle it as independent particles although it also belongs to the on-surface flow. Besides, the interaction between different droplets is seldom considered. [12] takes account of the effect of bump structure on the droplet, but such kind of simulations can hardly simulate the large area flow on the object surface. With the virtual contact surface, [16] gets the detail effects of water drops on the surface. On the rendering of wetting, Jensen et al. [11] take full account of the effects of subsurface scattering with photon map rendering method, but they do not simulate the dynamic phenomena and the rendering is also very time consuming. There are a lot of works on realistic rendering of water. We use OpenGL to preview our simulation in real-time, and also use the open-source POV-Ray[13] to render our simulated result to get more realistic effect.

3 Background Practically, the fluid flowing on surface involves complex physical processes, including flow itself on the surface, water absorption, dissolving and deposition of the material and the internal flow in the porous material. When the fluid flows on the surface of an object, some regions are wetted due to the porous structure, which pulls the fluid into the internal region under the capillary pressure while those dissolvable materials such as salt or minerals and those materials such as dust or other moveable stains are carried away by the surface fluid. At the same time, the fluid on the surface decreases,

along with this decrease, those dissolved or suspended material deposit on the surface as blotches or stains. But if the fluid in the substrate object is saturated, no fluid will enter the object any more. On the other hand, if the on-surface flow is very fast and the shear stress exceeds the yield limit, then the surface erosion happens and some sediments enter the surface fluid. Clearly, all the process depends on the properties of both substrate and fluid. Figure 3 presents the mechanism scheme of the whole on-surface flow, which shows the combination effects of the on-surface water with the substrate material.

Figure 3: The mechanism scheme of the on-surface flow (Copied and modified with permission from [5])

Since the inside flow can hardly change the appearance in a short time, this part is ignored in this paper to avoid excessive computation and we only focus on the on-surface flow itself and the interface between the substrate and the on-surface flow. If we want to take into account a long-term effect of water flow on the surface, we can easily extend our method to 3D domain similar to [5]. In this paper, only the thin film flow is studied without complex change of the topology, so the 2D Naiver-Stokes equations are sufficient to describe the motion of the fluid in height field to alleviate the computation cost.

4 System Modeling Problem Solution

and

Our study proceeds in two-folds. One is the fluid flowing on the object surface with the 2D Naiver-Stokes equations, and we use volume of fluid method to track the movement of the free surface, which defines the ratio of fluid volume

to the empty part of cell[9]. The other is the interplay between the on-surface flow and the substrate material having a porous property. In this way, the whole simulation procedure and its implementation could be summarized as follows: (1) Compute the velocity field with the method similar to that in [14, 8]. (2) Compute VOF to construct the free surface of water with the height field. (3) Compute the penetration of water into the substrate. (4) Compute the erosion-deposition model and the surface stains transportation. (5) Render the whole scene in OpenGL or output the result data to POV-Ray to render.

4.1 Main Field Computation We use the 2D incompressible viscous Navier-Stokes equations to describe the velocity field. Numerical dissipation damps out the free surface of liquid, which leads to the similar effect on the free surface to absorption, but the more important thing to us is that the latter one can evaluate different amount of wetness on the porous substrate for simulating more realistic scene. To consider the absorption due to non-saturation of the substrate, we modify the continuity equation to embody the non-zero divergence effect with the loss of mass φ in the cell. By modulating the amount of mass loss, the numerical dissipation can be ignored, and still we can get relatively reasonable good free surfaces, as shown in the results section. More over, this can allow us free of taking other computational steps to make up the numerical dissipation, and help to implement a real-time simulation. In fact, the loss of mass is going to have an effect on the momentum equation, but we discard this part for simplicity. We will discuss the effect of water loss in Section 4.2 in detail. G ∇ ⋅ u = −φ

(1)

G G ∂u G G G = − (u ⋅ ∇ )u + v∇ 2u − ∇ p ρ + f ∂t

where ρ

is the density of fluid,

(2)

p is the

G G pressure, f is the resultant force, u is the velocity and v is the viscous coefficient. Here we have to take into account the surface G

tension force f s = ∫

G

Γ(t )

G

G

σκ nδ ( x − x f )ds ,

here

σ

is the

surface tension coefficient, κ is the average curvature, and nG is the normal vector. To simulate the effects of bumps and obstacles, we use

G f f = ψ ∇b

to compute the friction force

while ψ is the friction coefficient, b is the bottom height. In this way we reduce the computation cost in comparison with an individual procedure to process the obstacle boundaries. We also incorporate the gravity force, which is projected onto the tangent plane of the surface. The popular semi-Lagrangian method is used to compute the advection term of the main field, similar to that in [14, 8]. Due to non-zero divergence, the pressure-Poisson equation is modified as follows: ∇2 p =

ρ Δt

G (∇ ⋅ u + φ )

(3)

VOF method is used to track the free surface computed with the semi-Lagrangian method, as expressed by G Ft + u ⋅∇F = −ϕ

where

F

(4)

is the VOF,ϕ is the loss of VOF. We

choose to represent the computational region as 3D grid of small control volumes that is only one grid cell high in δ y and use the grid bottom as the reference plane, b as the height of object surface above the reference plane, we can compute the height of the free surface with

h = F δ y + (1 − F )b

fluid with

, and the actual height of the

hwater = F (δ y − b)

(See Figure 4).

⎛ ∂ ( ρu ) δ x ⎞ ⎛ ∂ ( ρu ) δ x ⎞ ⎜ ρu − ⎟ hδ z − ⎜ ρ u + ⎟ hδ z + x 2 ∂ ∂x 2 ⎠ ⎝ ⎠ ⎝ ⎛ ∂ ( ρv ) δ z ⎞ ⎛ ∂ ( ρv) δ z ⎞ ⎜ ρv − ⎟ hδ x − ⎜ ρ v + ⎟ hδ x − M Loss z 2 ∂ ∂z 2 ⎠ ⎝ ⎠ ⎝

(5)

Combined with the continuity equation (1), we can find the relation as follows which indicate the non-zero divergence used is reasonable, Figure 4: Structure overview with basic size parameters

φ = M Loss /(hwater ρδ xδ z )

4.2 Penetration into the Substrate

Similar to [4], we use a linear function to simulate the water absorption,

If the water flows over the substrate material, and the material is still not saturated simultaneously then the absorption can be observed under the capillary pressure and the flow continues under the object surface. However, thanks to the short time of the on-surface flow, the computation of the internal flow can be omitted. The mass of on-surface water decreases along with flowing, or even disappears for the reason of absorption; the substrate becomes wetted until saturation.

φ = Ka

a−w a

(6)

(7)

where a is the maximum amount of water that the substrate can hold, w is the actual water absorbed by the substrate, and K a is the rate that the substrate absorbs. Accordingly the actual amount of absorbed water satisfies the following equation. It is also used to control the moisture of the substrate for rendering purpose to acquire wetting effects. ∂w a−w = Ka ∂t a

(8)

According to the relationship between VOF and the mass of fluid element, we can get ϕ = φ hwater (δ y − b)

Figure 5: Illustration of fluid element

According to mass conservation, the increasing rate of mass in fluid element is equal to the net rate of flow of mass into fluid element. From Figure 5, let

M Loss

denote the rate of the

absorption and for the simplification of the formula, let

h

the element is

be

hwater ,

the net rate of flow into

(9)

4.3 Erosion and Deposition Meanwhile, those dissolvable sediments enter the water and move with the velocity, resulting in changes in the appearance of the substrate. We use

Ci

as the i-th dissolved mineral or salt. We

only simulate their movement on the surface without seeping inside, This can be described with the convective-diffusion equation. ∂ G Ci + u ⋅ ∇Ci = ∇ 2Ci + E ∂t

(10)

where E is used to control the erosion or deposition of the surface indicated with the height

field.

Let

be

Cmax

the

maximum

concentration of the sediments dissolved in the water, if

bnew = bold + k (Ci − Cmax )

E = − k d (Ci − Cmax )

, then

Ci > Cmax

and

are used for deposition. In this

height field computation domain, if the bottom shear stress

G

τ =(

∂u z ∂u x , ) ∂x ∂z

interactively, and the other with POV-Ray to render photorealistic scenes. The main issue is to simulate the surface wetting procedure. Therefore, we design two texture images for fully dry and fully wet surface respectively. And we use Phong lighting model to render the scene by the following formula (11): G G Csub = Camb + Cdiff N ⋅ L

(

) ( (1 − w)T

dry

G G + wT wet ) + Cspec N ⋅ H

(

is greater than some

)

n

(11)

threshold value then ravine comes into being for

where Camb , Cdiff , Cspec are the corresponding lighting

erosion with E = ke ( τG − τ max ) , b

coefficients, N is the normal vector of the object

new

τ max

G = bold − k ( τ − τ max )

, where

G

G

G

is the maximum shear stress that the substrate

material can endure, and k is the control coefficient to indicate the solubility of the substrate material.

5 Rendering After computing the VOF, we get the whole height field, and then we construct the free surface with triangle strips. In our framework, we provide two strategies to render the whole scene, one with OpenGL to preview the animation

(a) Figure 6: On-surface flow rendered with POV-Ray

surface, L is the lighting vector, H is the half angle vector of view and light.

Tdry

and

T wet

are

the surface textures of fully dry and fully wet properties respectively. The color of the stains is also incorporated into the rendering. If water exists on the substrate, we can introduce free surface rendering with Cwater = FCreflect + (1 − F )Crefract

, here F is Fresnel term.

To achieve photorealistic effects, we also turn to POV-Ray to render the whole scene (See Figure 1 & 6).

(b)

6 Results and Discussion According to previous discussion, we design an interactive framework to simulate various phenomena of on-surface flow including wetting, erosion, and deposition etc. For a scene with 128*128 voxels, we can achieve above 70 fps on a PC with Intel Pentium 2.8GHz, 2G main memory, GeForce FX5950 Ultra graphics card. By this approach we may generate various effects according to different physical properties that can be seen in the following figures. Figure 7 shows an image in a real time animation for the water thrusting upon a slope from the bottom. In Figure 8 we can find the track area wetted by the

passing fluid. In this figure we also add one more block of water with zero initial velocity which washes off the red stains on this slope under the gravity force. In Figure 10, we can find the erosion effect with a ravine while some red stains have been pushed onto the obstacles. Figure 11 illustrates the droplet moving on the paper with some area wetted due to the surface flow. Figure 12 illustrates the fluid flow on a slope with protuberant logo with the Fresnel effect considered. The animation demo can be found at http://lcs.ios.ac.cn/~lyq/demos/wetting/wetting.ht m

Figure 7: Real-time water thrust upon the slope

Figure 8: Wetted slope with another droplet

Figure 9: Wetted slope with dragon relieve

Figure 10: On-surface flow with erosion

Figure 11: Real-time on-surface flow on paper

With the method presented in this paper, we can simulate the on-surface flow realistically, including wetting, surface stains transportation, together with erosion and deposition effects in real-time if we use OpenGL to preview the whole animation. From the experimental results, the appearance of the surface of objects is enhanced greatly. These results also illustrate that our model can be widely applied to solve various problems of on-surface flow. Certainly, our method is easy to be incorporated into existing fluid simulators.

7 Future Work Although the 2D equations can describe some on-surface flow phenomena, limitations still remain. It is unable to simulate the flow with complex change of the topology. On the other hand, we do not consider the internal flow like [5] with some important visual features missing for the porous substrate materials. Additionally 3D problem needs further implementation. But our method can be easily extended to 3D with the method presented in [6]. Another interesting area we would like to explore is to further consider the flow on the topology surface as shown in [15]. In this way people can get the thin film flow on the object with arbitrary topology, which can also be used to paint on 3D models.

Figure 12: Flow on slope with logo obstacles

However, because we do not go deep into the surface tension, we can not achieve good small scale effects. And we would like to get some tips from [16] and [10]. And we also would like to accelerate the simulation based on our previous work[17] assisted with GPU to get a better performance.

Acknowledgements The authors would like to thank Xiaoying Li and Syed Fawad Mustafa for proof reading. The authors also want to give thanks to Prof.Pinker for using his photo and Prof.Dorsey for using her picture in her SIGGRAPH99 paper. The work is supported by the National Grant Fundamental Research of Science and Technology (973 Project: 2002CB312102), the NSFC (60223005, 60033010), and the Research Grant of University of Macau.

References 1.

William Baxter, Yuanxin Liu, Ming C. Lin. A Viscous Paint Model for Interactive Applications. Journal of Computer Animation and Virtual Worlds (CASA2004), Volume 15, No.3-4, Pages: 433-441, July 2004.

2.

Nelson S.-H. Chu, Chiew-Lan Tai. MoXi: Real-Time Ink Dispersion

in

Absorbent

Paper,

to

appear

in

SIGGRAPH2005. 3.

Cassidy J. Curtis, Sean E. Anderson, Joshua E. Seims, Kurt W. Fleischery, David H. Salesin. Computer-Generated

Watercolor. Proceedings of SIGGRAPH 1997, Pages: 421-430. ACM Press/Addison-Wesley Publishing Co. New

Drops on Surfaces. To appear in SIGGRAPH2005. 17. Enhua Wu, Youquan Liu,Xuehui Liu. An Improved Study

York, NY, USA. August 1997. 4.

16. Huamin Wang, Peter J. Mucha, Greg Turk. Water

Julie Dorsey, Hans Køhling Pedersen, Pat Hanrahan. Flow

of Real-Time Fluid Simulation on GPU. Journal of

and changes in appearance. Proceedings of SIGGRAPH

Computer Animation and Virtual World, Volume 15,

1996, Pages: 411 – 420. ACM Press New York, NY, USA.

No.3-4(CASA2004), Pages: 139-146. John Wiley & Sons.

August 1996. 5.

6.

7.

Julie Dorsey, Alan Edelman, Henrik Wann Jensen, Justin

YOUQUAN LIU, received his BSc and MS

Legakis, Hans Køhling Pedersen. Modeling and rendering of

from

weathered stone. Proceedings of SIGGRAPH 1999, Pages:

University(NPU), Xi’an in 1998 and 2001

225 - 234 .ACM Press/Addison-Wesley Publishing Co. New

respectively. And he received Ph.D degree in

York, NY, USA. July 1999.

2005 from Institute of Software, Chinese

Douglas Enright, Stephen Marschner, Ronald Fedkiw.

Academy of Sciences.

Animation and Rendering of Complex Water Surfaces.

HONGBIN ZHU,

ACM Transactions on Graphics, Volume 21, Issue 3

degree from Huazhong University of Sience

(Proceedings of SIGGRAPH 2002), Pages: 736-744, July

and Technology(HUST), Wuhan in 2000 &

2002. San Antonio, Texas. ACM Press New York, NY,

2003 respectively. And now he is a Ph.D

Polytechnic

received BSc and MS

USA.

candidate of Institute of Software, Chinese Academy of Sciences. His major interest is

Proceedings of SIGGRAPH 2001, Pages: 23-30, August

computer graphics.

Ronald Fedkiw, Jos Stam, Henrik Wann Jensen. Visual Simulation of Smoke. Proceedings of SIGGRAPH 2001, Pages: 15-22, August 2001. ACM Press New York, NY, USA.

9.

North-west

Nick Foster, Ronald Fedkiw. Practical Animation of Liquids.

2001. ACM Press New York, NY, USA. 8.

the

C.W.Hirt. Simulating the Wetting and Drying of Shallow Flows.

TN54

of

Flow3D.

http://www.flow3d.com/Bibliography/technote.htm. 10. Jeong-Mo Hong, Chang-Hun Kim. Discontinuous fluids. To appear in SIGGRAPH2005. 11. Henrik Wann Jensen, Justin Legakis, and Julie Dorsey. Rendering of Wet Materials. Proceedings of Eurographics Workshop

on

Rendering,

Springer-Verlag,

Pages

273-282. Granada, Spain, June 1999. 12. Malin Jonsson, Anders Hast. Animation of Water Droplet Flow on Structured Surfaces. SIGRAD (2002). 13. www.povray.org.

XUEHUI LIU,

received her BSc and MS

degree from Xiang Tan University, Hunan, and received her Ph.D degree in 1998 from Institute of Software, Chinese Academy of Sciences. Since then she has been working at Institute of Software, Chinese Academy of Sciences, and now an associate professor. Her research intersts include image-based modeling and rendering, animation, realistic image synthesis.

ENHUA WU,

graduated from Tsinghua

University, Beijing in 1970, and received his Ph.D degree in 1984 from Department of

Computer

Science,

University

of

Manchester, UK. Since 1985 he has been working at Institute of Software, Chinese Academy of Sciences, directed its Research

14. Jos Stam. Stable Fluids. Proceedings of SIGGRAPH 1999,

Department. Since 1997 he has been also teaching in University

Pages: 121-128, August 1999. Los Angeles, California.

of Macau (UM), and now the Head of Computer and Information

15. Jos Stam. Flows on Surfaces of Arbitrary Topology. ACM Transactions on Graphics, Volume 22, Issue 3 (Proceedings of SIGGRAPH 2003), Pages: 724-731, July 2003. ACM Press New York, NY, USA.

Science Department in UM. He is a member of IEEE & ACM.

Real-Time Simulation of Physically Based On-Surface ... - Youquan Liu

Laboratory of Computer Science, Institute of Software, Chinese Academy of Sciences, Beijing, China. 3 .... method is only to simulate the long-term effects.

564KB Sizes 6 Downloads 220 Views

Recommend Documents

Physically-Based Vibrotactile Feedback for Temporal ... - mobileHCI
Sep 18, 2009 - selects a company and gives his device a twist to quickly feel the trend from ... social networking context, enabling users to transmit directly the.

Physically-Based Vibrotactile Feedback for Temporal ... - mobileHCI
Sep 18, 2009 - back design is one way to provide both compelling and informative feedback ... desktop environment, such as browsing the internet or watching vi- deos. ... Our example 'overView' application enables the interaction with.

Process-based simulation of seasonality and ... - Biogeosciences
Jan 20, 2010 - model. Models are applied to a Mediterranean Holm oak. (Quercus ilex) site with measured weather data. The simulation results demonstrate that the consideration of a dynamic .... plied the integrated temperature of the previous 18 h in

Process-based simulation of seasonality and ... - Biogeosciences
Jan 20, 2010 - Wilkinson, M., Norby, R. J., Volder, A., Tjoelker, M. G., Briske,. D. D., Karnosky, D. F., and Fall, R.: Isoprene emission from terrestrial ecosystems in response to global change: minding the gap between models and observations, Phil.

Simulation-Based Computation of Information Rates ... - CiteSeerX
Nov 1, 2002 - Email: {kavcic, wzeng}@deas.harvard.edu. ..... Goldsmith and P. P. Varaiya, “Capacity, mutual information, and coding for finite-state Markov.

Realtime Experiments in Markov-Based Lane Position Estimation ...
where P(zt) has the purpose of normalizing the sum of all. P(v1,t = la,v2,t = lb|zt). .... laptops was made through the IEEE 802.11b standard D-Link. DWL-AG660 ...

Realtime Experiments in Markov-Based Lane Position Estimation ...
C. M. Clark is an Assistant Professor at the Computer Science Depart- ment, California Polytechnic State University, San Luis Obispo, CA, USA ..... Estimated vs. actual lane positions for computer 1 (top) and computer 2 (bottom). be explained ...

Physically-Based Vibrotactile Feedback for Temporal ...
Sep 18, 2009 - solid theoretical foundation to the underlying interaction. Figure 3 defines some of ... flexible shaft τ = K∆θ where K is the spring constant and ∆θ.

PDF Physically Based Rendering: From Theory to Implementation Read online
Physically Based Rendering: From Theory to Implementation Download at => https://pdfkulonline13e1.blogspot.com/0123750792 Physically Based Rendering: From Theory to Implementation pdf download, Physically Based Rendering: From Theory to Implement

Wei Liu
Tracking and Identifying People. Research Assistant. Advisor: Fernando. Manually selected people in the first frame, used the bound boxes containing people as positive training data and the background as negtive one, extracted color histogram as desc

Physically-based Grasp Quality Evaluation under Pose Uncertainty
uncertainty into the static grasp quality analysis by computing the probability of .... Refer to [7] to see how to incorporate soft contact into a force- closure based ...