90 likes | 175 Views
Real-time fluid physics library. The goal is to create a physics library that is specialized on water fluid dynamics, for real-time simulations. Why?. Water motion is graphically appealing and it should be possible to use it more in games to enhance the experience.
E N D
Real-time fluid physics library The goal is to create a physics library that is specialized on water fluid dynamics, for real-time simulations.
Why? • Water motion is graphically appealing and it should be possible to use it more in games to enhance the experience. • A physics-based system is needed to enable interaction between fluid and solid meshes.
Milestone 1 • Project plan, time plan • Choose subjects to study • Brief studies of: • Fluid dynamics • Fluid buoyancy • Smoothed particle hydrodynamics • Collision response • Test of a free collision detection library
Fluid dynamics • A mass of fluid can’t resist a shearing force and must deform. • Velocity depends on local density in incompressible fluid. • Motion is described by parcels small enough to neglect rotation. • Velocity field representation. • Linearization is used to interpolate attributes between parcels. • Bernoulli’s equation, the Navier-Stokes equations.
Fluid buoyancy • Suitable to implement as interaction between fluid and solid meshes. • Archimedes’s principle: • F = -p * V * g • F must be integrated over the immersed surface. • Problematic for arbitrary surfaces.
Smoothed particle hydrodynamics • Introduced to simulate astrophysics. • A kernel function computes interaction values from particles within a radius. • Problems: • Can only solve compressible flow. • A surface has to be reconstructed. • Not fast enough for real-time in large scale. • Alternative is Eulerian grid.
Collision detection libraries • Avoid developing detection algorithms by using a library. • FreeSOLID • OpenGL-like API. • Detects overlapping shapes. • Approximates collision plane, useful for collision response. • LGPL license.
Collision response • Can be done by applying forces. • The objects will interpenetrate. • Compute impulse. • Immediately changes velocity and angular velocity. • Combine angular velocities using matrices or quaternions. • Time of collision: • Binary search for static collision detection. • Time expensive.
Plans • Prototypes for: • Collision response • Liquid dynamics (using Eulerian grid) • Liquid buoyancy • Technical specification • Design of: • Physics libary • Mesh loading and graphics rendering modules.