220 likes | 390 Views
4 . 6. Water, Fluid Dynamics and Cloth. Exploration of liquids and cloth effects. Fluid Dynamics. Introductory overview of fluid dynamics. Video not available in on-line slides. Video not available in on-line slides. Fluid Dynamics (faking it and the real thing).
E N D
4.6.Water, Fluid Dynamics and Cloth Exploration of liquids and cloth effects
Fluid Dynamics Introductory overview of fluid dynamics
Fluid Dynamics (faking it and the real thing) Fluid dynamics can be faked using techniques such as: particle systems video textures procedural effects (e.g. Perlin noise for fire) pre-computed effects However, faked approaches may not be highly realistic and tend not to offer much interaction.
Fluid Dynamics (the real thing) A simulation region (grid based) is defined, with fluid state variables introduced for each grid location. State variables can include: Fluid velocity and pressure Fluid density (for smoke and fire) Surface level (for water and levels) The variables are evolved over time to simulation the evolution of the fluid. Pressure Velocity Density, Temperature, or Level set
Fluid Dynamics (the real thing) Simulation: Iterate Add Density Add Velocity Advect Advect Project Advect Initialize Details of how the fluid is evolved can be found within the directed reading. In a nutshell, evolution is determined using the Navier-Stokes equation which requires the conservation of momentum and mass. Density Density Velocity Velocity Density Velocity Pressure Velocity iterate Pressure
Particle Based Simulation Other than using the Navier-Stokes equations, particle-based methods can also be employed to model flow (modelled using a collection of particles that move under the influence of hydrodynamic and gravitational forces).
Cloth Exploration of cloth effects
Cloth A cloth object is modelled as a set of connected particles. Each particle is subject to external forces, such as gravity, wind, etc. and various constraints (maintaining the overall shape of the object). To prevent interpenetration with the environment collision constraints are also introduced.
Cloth Spring constraints between neighbouring particles are used. The particle’s equation of motion resulting from applying the external forces is found using Verlet integration. The various constraints create a system of equations linking the particles’ positions together. This system is solved at each simulation time step by relaxation; that is by enforcing the constraints one after the other for a given number of iterations.
Cloth A collision constraint between a particle and a collision object is enforced by checking whether the particle is inside the object or not, and if it is inside, by moving the particle to a position at the surface of the object. Step 1: For every particle that is an anchor point: Apply force through equation of motion Step 2: For every particle that is not an anchor point: Update position Step 3: For every relaxation step: Step 3a: For every spring constraint: Enforce spring constraint Step 3b: For every particle: For every collision object: Enforce collision constraint
Water Exploration of water modelling
Water Evidently water animation is more accurately modelled using accurate fluid dynamics, however, this is a very computationally expensive process. The most simple approach towards modelling water is to use a moving normal map to create the appearance of moving water across a flat plane using a Fresnel factor to control the degree of reflectance.
Water A slightly more complex approach is to employ normal maps to provide fine detail and dynamically displace the vertices of an underlying (flat) mesh to provide wave-like motion. The water mesh might be perturb using a combination of several sinusoidal waves to produce a more complex wave, or the superposition of several height maps.
Directed reading Directed Reading Directed reading water, fluid dynamics and cloth
Directed reading: Fluid Dynamics Read GPU Gems 3 - Real-Time Simulation and Rendering of 3D Fluids – for details of rendering 3d fluids. Read nVidia’s Real-Time Volumetric Smoke, Fire and Water with Fluid Dynamics – for a related presentation to the GPU Gems chapter. Read Interactive Fluid Dynamics and Rendering on the GPU for more information on GPU fluid rendering Read Realistic and Interactive Simulation of Rivers - for more information on flow modelling using particles Directed reading
Directed reading: Cloth Read nVidia’s Cloth Simulation – for an overview of rendering cloth on the GPU Read Asynchronous Cloth Simulation for more information on more advanced cloth rendering Directed reading
Directed reading: Water Read GPU Gems 2- Using Vertex Texture Displacement for Realistic Water Rendering – for the use of displacement mapping to simulate a water surface. Read Real-Time Synthesis and Rendering of Ocean Water – for information on rendering ocean surfaces Read Realistic Water Volumes in Real-Time – for more information on rendering water volumes Directed reading
Summary Today we explored: • Overview of fluid dynamics approaches • Overview of modelling cloth • Overview of water rendering To do: • Read the directed reading • Think if you would like to implement either type of modelling.