240 likes | 468 Views
Simulation and Rendering of Liquid Foams Hendrik Kück (UBC, Vancouver) Christian Vogelgsang (FAU Erlangen, Germany) Günther Greiner (FAU Erlangen, Germany). Graphics Interface 2002. Motivation. Liquid foams can be found in many places in the real world
E N D
Simulation and Rendering of Liquid FoamsHendrik Kück (UBC, Vancouver)Christian Vogelgsang (FAU Erlangen, Germany) Günther Greiner (FAU Erlangen, Germany) Graphics Interface 2002
Motivation • Liquid foams can be found in many places in the real world • Very difficult / impossible to recreate using standard techniques • extremely complex microscopic structures • unique optical properties • complex dynamic behaviour
Goals • Visually convincing simulation and rendering of liquid foams • Not: Physically accurate • But: Efficient • Interaction with external objects • Integration into existing raytracing systems
Outline • Structure and dynamics of liquid foams • Previous work • Simulation of foam dynamics • Shading • Results • Future Work
Plateau borders Liquid Films Plateau border cross section Structure of liquid foams
Dynamics of liquid foams • Viscoelastic, can behave like • Solids (elastic deformation) • Fluids (viscous flow) • Film rupture • Rising bubbles
Computer Graphics Almgren & Sullivan, 1993Surface Evolver, Interference Colours Icart & Arquès, 1999‚2D‘ foam, Interference colours Glassner, 2000Soap bubbles, Interference colours Durikovic, 2000Soap bubble dynamics,Mass-spring-damper system Previous work • Physics • Durian, 19952D foam dynamics
Use simple model in simulation step Fixed size spheres No explicit computation of foam micro geometry Forces acting on spheres Output sphere geometry In ray-tracing step Reconstruct liquid films and Plateau borders Use appropriate shading models General approach
Bubble Bubble Forces • Soap films minimize surface area due to surface tension
Bubble Bubble Forces • Soap films minimize surface area due to surface tension
Bubble Bubble Forces • Soap films minimize surface area due to surface tension
Bubble Bubble Forces • Soap films minimize surface area due to surface tension 120°
Bubble Bubble Forces • Model with 2 spring forces per pair of overlapping spheres • Attractive force • Repulsive force
Simulation • Forces acting on spheres due to • Contact with other spheres/bubbles • Viscosity • Air resistance • Gravity • Contact with external objects • Assumption: Bubbles have no mass • Forces have to add up to 0 for each bubble • Results in 1. order ODE system
Simulation • Start with randomly generated bubbles • Initial simulation to get a stable configuration • For each animation frame • Randomly add/remove spheres • Numerical integration to compute sphere positions for that point in time • Generate sphere geometry • Flatten spheres at external objects
Rendering • Special shader • Invoked at every ray/sphere intersection • Has to • Decide if intersection corresponds to Plateau border or liquid film • Perform shading using corresponding shading model
Base decision on the order in which the ray enters and leaves spheres Shading only for some intersections Approximate separating films by averaging of adjacent intersections Shading model selection Bubble 1 Bubble 2
Plateau Borders • 2 different cases • Overlap of 3 spheres • Empty space between spheres
Fresnel reflection (Interference Effects) Liquid Film Shading
High curvature Refraction & total reflection randomize light direction Our shading model Simple light diffusion approximation (multiple scattering) Single scattering Plateau Border Shading
Results • Implemented for Mental Ray® as combination of geometry shader and material shader Resolution: 800x630 ~700 bubbles ~4 s. simulation 40 s. rendering
Future work • Improve shading models • Interference effects • Simulation of multiple scattering • Level of detail approach • Efficient simulation and rendering of arbitrary dense foams at arbitrary scale
? Questions ? ? Acknowledgements This project was supported by Animation/VFX (SZM Studios, Munich, Germany) Special thanks to Horst Hadler and Michael Kellner