380 likes | 622 Views
Water Droplet Simulation. Avneesh Sud. Problem. Realistic Animation of individual water droplets on surfaces Lot of work on ‘large’ water bodies (Napier-Stokes, Stam) Water droplets tougher Gravity Interfacial , surface tension Air resistance Accurate rendering
E N D
Water Droplet Simulation Avneesh Sud
Problem • Realistic Animation of individual water droplets on surfaces • Lot of work on ‘large’ water bodies (Napier-Stokes, Stam) • Water droplets tougher • Gravity • Interfacial , surface tension • Air resistance • Accurate rendering • Two Problems : Flow and Rendering
Work Presented • Kaneda93 : Water Droplets on Glass Plate • Kaneda96 : Droplets on a Curved Surface
Flow of Water Droplets • Physics studied by Janosi89 • Droplet runs down glass plate if mass exceeds critical mass • Route of stream determined by impurities and presence of other droplets • Traces of water left behind on surface : “Wetting”
Simulation of Flow • Surface divided into a nxn lattice • An affinity for water fi,jassigned to each lattice point • Depends on surface properties, impurities etc.
Simulation of Flow • When does droplet move? • Which direction does it move in? • What speed does it move with? • How much moves/left behind? • When does it stop?
Critical Mass • Each lattice point associated with a mass mi,j • Droplet moves if msc() is the static critical weight when inclination angle is
Direction of Motion • From (i,j) to (i-1,j+1), (i,j+1) or (i+1,j+1) • If water exists in one of the 3 directions, then moves to that direction • If exists in more than 1 direction, then to (i,j+1) • If not exist in (i,j+1), then to direction with larger mass • If not exist in any direction, then tendency to move in direction (i+k,j+1) is w1(,k) is the inclination weighting function
Speed of water • Depends in wetness of new direction and inclination • Acceleration ai,j() can be dry acceleration ad() or wet acceleration aw(), aw() > ad() t is time from generation/collision
Mass of Moving Water • Mass of remaining water m’i,jdepends on fi,j, mmin, mmax • Mass of water at new position
Merging • Conservation of mass and momentum
Stopping • With no water ahead, decelerates and stops when mass is less than dynamic critical mass mdc() • Speed during deceleration given by
Shape of Droplet • Shape of static droplet on glass plate determined by interfacial, surface tensions (de Gennes 85) • Dynamic droplets complicated – different contact angles at head & tail, several contact angles to minimize energy
Shape of Droplet • Approximated by a sphere • Radius of sphere dependent on mass
Rendering • Background textures generated for environment mapping • Front face at higher resolution
Rendering • Tracing reflected/refracted rays • Most rays either reflected or refracted : follow one principle direction
Rendering • Determining pixel color using the background texture at the intersection point
Curved Surfaces • Modeled as Bezier Patches • Discretized to a quad mesh – approximated by a plane • A more generic method that reduces discretization artifacts
Critical Mass • Movement Test : Sum of external (gravity, wind) forces greater than affinity force Fi,j is the static critical force s is degree of affinity coefficient
Direction of Motion • “Roulette” of 8 adjacent meshes used • Probability assigned to each mesh • Using probabilities allows to simulate random ‘meandering’ of water
Direction of Motion • Weight of each direction determined by • Newton’s Laws of Motion • Degree of affinity for water • Wetness of neighboring meshes
Newton’s Laws • Compute principle velocity vector VP from Newton's mechanics. Solve to find position Pwhere droplet crosses boundary and the velocity VPat crossing point
Newton’s Laws • Probabilities distributed between 2 nearest neighboring directions of VP (l, l+1)
Affinity • Probability distributed to directions whose angle from VPis less than 90 deg ckis degree of affinity in neighboring mesh u(x) is unit step function
Wetness • Probability distributed to directions whose angle from principle vector is less than 90 deg • Prevents a droplet from suddenly changing direction back to a wet spot g(d*k) is a function to check wetness
Determining direction • All 3 probabilities weighted and summed up 1 controls regularity, 2 controls meandering • Direction depends on generated random number r p is the desired direction of movement
Speed of Travel • Project acceleration in direction of principle vector • Internal forces depend on affinity
Mass of moving drop • “Wetting” : Mass of remaining water h(c) is a function for remaining water based on affinity • “Merging” : Follow conservation of mass, momentum
Algorithm • Make a discretized surface model, specify degree of affinity for each mesh element • Put new droplets at mesh points, specify weight and initial speed • Initialize timekeepers for all droplets to accumulate time taken for a droplet to travel from one mesh to another • If droplet moves, goto step (5) else repeat (4) for all droplets • Determine mesh droplet will visit next • Calculate time required for droplet to move to next mesh • Move the droplet to next mesh based on timekeeper value • Repeat steps (4)-(7) for all droplets till end of frame • Repeat (2)-(8) for duration of animation
Rendering • Similar to glass plate –efficient bezier intersection tests used • Higher quality method based on metaballs • Efficient intersection between ray and metaball using bezier clipping
References • Janosi IM, Horvath VK Dynamics of Water Droplets on a Window Pane. Physical Review 40(9): 5232-5237 (1989) • De gennes PG. Wetting: Statucs and Dynamics. Rev. Mod. Phys. 57(3): 827-863 (1985) • Kaneda K, Kagawa T, Yamashita H. Animation of Wwater Droplets on a Glass Plate. Proc. Computer Animation’93: 177-189 (1993) • Kaneda K, Zuyama Y, Yamashita H, Nishita T. Animation of Water Droplet Flow on Curved Surfaces. Proc. PACIFIC GRAPHICS '96: 50-65 (1996). • Yu YJ, Jung HY, Cho HG. A New Rendering Techniques for Water Droplet using Metaball in the Gravitation Force. WCGS'98 (1998)