models of animated rivers for the interactive exploration of landscapes

134
Models of Animated Rivers for the Interactive Exploration of Landscapes a Ph.D. Defense by Qizhi Yu Under the Advisements of Dr. Fabrice Neyret Dr. Eric Bruneton November 17, 2008 Grenoble Institute of Technology (INPG) 1

Upload: coen

Post on 24-Feb-2016

36 views

Category:

Documents


0 download

DESCRIPTION

Grenoble Institute of Technology (INPG). a Ph.D. Defense by Qizhi Yu Under the Advisements of Dr. Fabrice Neyret Dr. Eric Bruneton November 17, 2008. Models of Animated Rivers for the Interactive Exploration of Landscapes. Outline. Introduction Previous work Strategy overview - PowerPoint PPT Presentation

TRANSCRIPT

Models for

Models of Animated Rivers for the Interactive Exploration of Landscapesa Ph.D. Defense byQizhi Yu

Under the Advisements of Dr. Fabrice Neyret Dr. Eric Bruneton

November 17, 2008

Grenoble Institute of Technology (INPG)

1

1OutlineIntroductionPrevious workStrategy overviewContributionsConclusion22OutlineIntroductionPrevious workStrategy overviewContributionsConclusion33 IntroductionResearch on rivers44 IntroductionResearch on rivers5.5ObjectiveSynthesize visually convincing riversStudy contentModelingRiver shape & surface detailsAnimatingWater motion in rivers.

IntroductionStudy of rivers in CG6Generally, the purpose of the study of rivers in computer graphics is to synthesize visually convincing rivers.

For this purpose, we need to model the shape of rivers and surface details, in addition, we need to model the water motion in rivers.

Rendering of water is out of the range 6Many applications, need more studies

EA: Crysis

Google Earth IntroductionRivers in CG applications7

Nowadays, more and more computer graphics applications have the ambitious to present virtual but realistic natural scenes. In these scenes, rivers is an important feature.

However, rivers in current applications are still not realistic enough, especially in the real-time case. For example, in the video game Crysis, rendering of water is good, but the water can pass through solid boundaries, which is not natural.

Moreover, river animatin is particully difficult in a very large scene.For example, Google Earth a GIS application, that allows users to navigate in the whole world. But rivers in Google earth is static.

Therefore, we need more studies of rivers in computer graphics, especially for the real-time case.

7Multi-scaleGeometry Kilometer-scale length millimeter-scale wavesWater motionKilometer-scale mean flow millimeter-scale fluctuationComplicated physicsTurbulence Surface phenomena

IntroductionChallenges 8

8Modeling and animating rivers ConstraintsReal-timeScalabilityControllabilityRealism

25 fps or more

IntroductionMy research goal99Modeling and animating rivers ConstraintsReal-timeScalabilityControllabilityRealism

Very long or unbounded rivers Camera moves arbitrarily IntroductionMy research goal10Second, we want to handle very long or even unbounded rivers, and , in the scene, the camera can move arbitrarily, the users can observe rivers very closely, or observe rivers far away. All these require our algorithms should be scalable.

10Modeling and animating riversConstraintsReal-timeScalabilityControllabilityRealism

Intuitive handles for controlling appearance and behavior of rivers IntroductionMy research goal1111Modeling and animating rivers ConstraintsReal-timeScalabilityControllabilityRealism

Animated surface details with temporal and spatial continuity IntroductionMy research goal1212Modeling and animating rivers ConstraintsReal-timeScalabilityControllabilityRealism IntroductionMy research goal1313OutlineIntroductionPrevious workStrategy overviewContributionsConclusion1414Previous work3D Navier-Stokes simulation2D depth-averaged simulation2D simulation Surface wave models (2D) 15In computer graphics, there is a lot of work on water or surface waves animation. But not too much work specific to river animation.In addition, In hydraulics field, there is a lot of work on river simulation.

Now we discuss them in 4 categories, according to the visual features they are able to model..

. 15Previous work3D Navier-Stokes simulation2D depth-averaged simulation 2D simulationSurface wave models (2D) 16The first is water simulation, in this category, the physical quantities are defined and simulated in 3D.

The second is river simulation, it this category, the physical quantities are averaged in vertical direction, and water depth is considered in the models.

The final category is suface wave models, these models are purly 2D. 16 Previous work 3D NS simulation: Equations of liquidsIncompressible Navier-Stokes equations Momentum conservation

Volume conservation

Boundary conditions

Computational Fluid Dynamics (CFD)Numerical methods

1717CFD CG fluid animationStable solver [stam99]Two approachesEulerian : defines quantities at fixed pointLagrangian: defines quantities at particles

Previous work 3D NS simulation18The cfd techqniues can be used for animation purpose. Here, an important work is Stams stable solver.% makes the CFD techniques practical for animation problems. Their method allows large time-steps while being stable. Certaitly, it will loss some accuracy, but it could be accepted in animation.

Note that there are too approaches for solving NS equations. The Eulerian approach, define quantities at fixed points in the sapce. While, the Lagrangian approach defines quantities at particles that follow the flow.

Generally, there are two approaches for solving the ns equations.

Shorten sentences

Stable solver less accurate

One

with an implicit function

Many work has been done to use CFD tech for the animation purpose

Basically, it includes two steps.

Here we need a stable solver tailored for computer animation. The stable solver proposed by stam are commonly used. The stable solver is important since it allows us to use a large time step while keeping the simulation stable. Certainly, it will loss some physical accurity, but it is basically accepted for the animation purpose.

The level-set method track the interface by advecting an implicit function. It can handle interface with complicated 18Water animation [EMF02] Solve NSE numerically on a grid to get velocities Use level-set to track water-air interface

Previous work 3D NS simulation: Eulerian approach19

This is a typical water animation work that uses 3D NS queations and Eulerian approach

Water animtion that use NS simulation with Eulerin approch.

First, they solve NSE on a grid to get the velocities. And then, they uses leve-set method to track water-air interface by advecting by advecting an implicit function

Many work has been done to use CFD tech for the animation purpose

Basically, it includes two steps.

Here we need a stable solver tailored for computer animation. The stable solver proposed by stam are commonly used. The stable solver is important since it allows us to use a large time step while keeping the simulation stable. Certainly, it will loss some physical accurity, but it is basically accepted for the animation purpose.

The level-set method track the interface by advecting an implicit function. It can handle interface with complicated 19 Previous work 3D NS simulation: Eulerian aprroachPouring water in a glass [EMF02]15 minutes per frame 55 x 120 x55 grids

Computationally expensive! 2020Poorly scalable CG (stable solver): O(N^3)Difficult to control for artistsWater Behavior Initial values, boundary conditionsNo intuitive relation

Previous work 3D NS simulation: Eulerian aprroach2121Smoothed Particle Hydrodynamics (SPH) [MCG03]Solve NSE in the Lagrangian formalism Compared with Eulerian approachEasier adaptive to complex domain Difficult to reconstruct a smooth surfaceFor our purposeSimilar problems as Eulerian approach

Previous work 3D NS simulation: Lagrangian aprroach22

2200 particles5 fpsSPH method is a typical Lagrangian approach.

Compared with eulerian approach, it is easier adaptive to complex domain, but it is more dificult to reconstruct a smooth surface from particles.

For our purpose, it also surffers similar problems as the Eulerian.

The method is still expensive. In this image, About 2000 particles are used for simulating pouring water in a glass, it runs in 5 fps. Note that this a very small domain compared with rivers.

22Previous work3D Navier-Stokes simulation2D depth-averaged simulation 2D simulationSurface wave models (2D) 2323 Previous work 2D depth-averaged simulation2D Shallow Water model [Mol95]Commonly used in Hydraulics for simulating riversAssumptionsHydrostatic approximation

No vertical water motionIntegrate the NS equations along vertical direction Unknowns: depth-averaged velocity & elevation of water surface

2424 Previous work 2D depth-averaged simulationPropertiesA lot faster than 3D N-S simulationLoss some 3D surface features (e.g. overturning )Shallow waves ( wavelength >> depth)For our purposeStill too expensive, especially for large rivers Bounded domain (like other simulation).

2525 Previous work 2D depth-averaged simulationLinear wave equation [KM90]Simplified from shallow water modelAssumptions constant water depth, no advection termPropertiesFast, cant simulate river flow

2626 Previous work Combined with 3D NS simulation[Irving et al. 06]20 processors25 minutes per frame

2727Previous work3D Navier-Stokes simulation2D depth-averaged simulation2D simulationSurface wave models (2D) 28. 28 Previous work 2D simulation: 2D N-SSimulate 2D velocity by solving 2D N-Sno surface elevation simulated Use tricks for surface elevationPressure [CdVL95] Noise [TG01]

2929Previous work3D Navier-Stokes simulation2D depth-averaged simulation2D simulationSurface wave models (2D) 3030 Previous work Wave models: FFT wave [Tes 01] AssumptionDeep water: wave length >> It is very efficient. Easy for keyframe, if do not like the simulation.

Pertubation should be considered in meso-scale. And we can use [WH91] work by superposing local analytic velocity field to the mean flow.68Improve on existing model [NP01]ResultMean flow shockwave curves (wave crests) Animated by adding perturbation to the mean flowVery efficient

Meso-scale My work6969Improve on existing model [NP01]Construct appropriate representation from wave features for high-quality rendering

Meso-scale My work

7070lo-res base water surface + hi-res wave surface Meso-scale Composite surface

7171lo-res base water surface + hi-res wave surface Meso-scale Composite surface

Macro-scale7272

lo-res base water surface + hi-res wave surface Meso-scale Composite surfaceMeso-scale73Feature-aligned mesh reduces geometric aliasing ( normal-noise) Meso-scale Feature-aligned wave surface

Not feature-alignedFeature-aligned74We consider to construct feature-aligned wave surface.

74Define wave surface as sweeping a wave profile along the wave curve

Meso-scale Feature-aligned wave surfaceUser defined Wave profileWave curve75Water surface mesh75Sample by a quad meshaligned the wave curve Meso-scale Feature-aligned wave surface

v76Wave curveAccurate normals from the wave profile Meso-scale Feature-aligned wave surface

uvBNTP(u,v)

v7777Mesh stitching ?Re-mesh base surface at each frame, too expensiveWe solve it in the rendering stage Meso-scale Composite wave with base surfacePlease refer to the thesis for more details7878

Meso-scale Real-time high-quality rendering79Real-time 79Simply draw two wave strips with Z-buffer

Meso-scale Wave intersection80, 80Generate a dedicated mesh at crossing

Meso-scale Wave intersection81Final result Meso-scale Wave intersection

8282

Meso-scale Demo83Approach: feature-based vector simulationSimulation: construct & animate vector featuresRendering: featured-based representationMeso-scale: conclusion8484OutlineIntroductionPrevious workStrategy overviewContributions1: Macro-scale2: Meso-scale3: Micro-scaleConclusion8585Micro-scaleGoal Modeling small scale animated surface featuresApproachdynamic texturesTwo workWave spritesFocus on performanceLagrangian texture advectionFocus on quality

8686OutlineIntroductionPrevious workStrategy overviewContributions1. Macro-scale2. Meso-scale3. Micro-scaleWave spritesLagrangian texture advectionConclusion87Sprite: a small textured elementSprites in texture world [LN03,LHN05] to get large high-resolution texture , low memoryIdea: combine animation + texture spritesto get very large river with animated details, efficiently.

Micro-scale IMotivation8888How should sprites behave for our purposes ?Sprites -> represent waves reconstructed texture should conserve the spectrumWell distributed, avoiding holes and overcrowdingThe more overlapping, the more texture spectrum biasingThe density of sprites should be adaptiveConvey the flow motion

Micro-scale IMotivation89Ensure temporally continuous

89Dynamic adaptive samplingA set of particles in world space advected by flowKeep Poisson-disk distribution in screen space.Attach a textured sprite to each particle

Micro-scale I Method9090Dynamic adaptive samplingA set of particles in world space advected by flowKeep Poisson-disk distribution in screen space.Attach a textured sprite to each particle

Micro-scale I MethodWhy ?9191Uniform densityOverlapping as little as possibleEasy to ensure spatial continuitySuperimposing sprites (with r=d) ensures no-holes Micro-scale I Poisson-disk distributionrr = d diameter of poisson-disk 9292Dynamic adaptive samplingA set of particles in world space advected by flowKeep Poisson-disk distribution in screen spaceAttach a sprite to each particle

Micro-scale I MethodAuto-adapt to distance93].93AlgorithmAdvect particles with the flow in world spaceDelete particles out of the view frustumDelete particles violating the minimum distance required by the Poisson-disk distribution (in screen space)Insert particles to keep Poisson-disk distribution

Micro-scale I Dynamic adaptive sampling94Now I detail the algorithm94AlgorithmAdvect paticles with the flowDelete particles out of the view frustumDelete particles violating the minimum distance required by the Poisson-disk distribution (in screen space)Insert particles to keep Poisson-disk distribution

Micro-scale I Dynamic adaptive sampling Boundary-sampling algorithm [DH06]9595Spatial continuitySmooth kernelConstrained sampling issues near boundaryTemporal continuityFading in/outPlease refer the thesis.

Micro-scale I Ensure continuity9696A set of sprites well distributedEach sprite Live in texture spacemaps to a portion of a reference textureReconstruct the global textureSprite has circular kernel in screen space , but ellipse in object spaceSo we superimpose them in screen space Micro-scale IReconstruction97We have obtained 97

Micro-scale IReconstruction9898

Micro-scale IData structure for reconstruction99Efficient GPU. Inspired from [LN05]99

Micro-scale IDemo: 25x25 km^2 , 27~110 fps (view dependent)100100Wave-spritesTexture flow surface with scene-independent performance (in real-time)

LimitationNo sprite deformation consideredSliding of texture between sprites bad especially in place where velocity gradient is high

Micro-scale I: conclusion101OutlineIntroductionPrevious workStrategy overviewContributions1. Macro-scale2. Meso-scale3. Micro-scaleWave spritesLagrangian texture advectionConclusion102A technique of dynamic textureConform to the input flowConserve texture properties (e.g. spectrum)PurposeAugment coarse simulation with small scale appearance

Micro-scale IITexture advection103103Advect texture coordinatesTexture follow flow and deformBut, over stretching destroy texture propertiesRegenerate a textureAfter a delay: latencyBlend two de-phased textures Illusion of advection

Micro-scale II Eulerian advection method [MB95]104104How to choose a reasonable latency ? high bad conservation of spectrum low bad conformation to flow Good one: adapt to local flow condition (deformation)

In [MB95], only one global value Micro-scale IIProblem of [MB95] method105Add a video105Idea: adaptive local latencyLocal deformation metrics sMIPmap-like approach:Multiple layers of texturesEach layer = Eulerian advection methodAssign different latency to each layerFor each pixel, interpolate two nearest layers according to local s

Micro-scale IIImproved Eulerian advection [Ney03]106106latency of all layers are bounded in a rangee.g. For zero-velocity , the ideal latency should be infinity close to still area, we cant choose a good latency value Interpolation : not accurateEulerian formalism not optimal in large sparse domain (clouds, fire)

Micro-scale II Problems of [Ney03] method107107Idea Lagrangian formalism as in wave sprites workAttach to each particle a deformable textured patches mapping to a reference textureReconstruct a global texture by blending all patches

Micro-scale IILagrangian texture advection108Put a video here. 108Advected by flowDynamic Poisson-disk distribution

d Micro-scale IIParticles109109Init: regular gridKernel radius = dEnsure full coveragePatch size > 2d Allow deformation2ddsize Micro-scale II PatchPoisson-disk110Init: regular gridKernel radius = dPatch size > 2dMap to a random portionStore (u, v) at nodes

UV Micro-scale IIPatch111Nodes advected by flow

Micro-scale IIPatch deformation112Nodes advected by flow Delete a patch Exceed some deformation metric

Micro-scale IIPatch deformation113Nodes advected by flow Delete a patch Exceed some deformation metricPatch boundary intersects with kernel

Micro-scale IIPatch deformationA new patch would be generated nearby automatically by Poisson-disk distribution mechanism114Temporal & spatialInsert / delete temporalSmooth kernel spatialDefine various temporal and spatial weights on grid nodes

Please see details in the thesis Micro-scale IIEnsure continuity 115115Encode all patches into one texture TpatchTexcoords (u, v)Weights w(x, t) Accessing the advected textureFor each pixelDetermine the patches covering current pixelAccess reference texture via Tpatch Blending with weights (only kernel parts!) Micro-scale IIReconstruction116 Micro-scale IIMethod (video)117

Show velocity profile.117Compare against Eulerian advectionFFTTo evaluate the appearant spectrumOptical flowTo evaluate the appearant motionInput reference texture 3-octave Perlin noise

Micro-scale IIQuality validataion118 of advected texture

calculated from advected texture118Various input flow

Please see my webpage for more video results Micro-scale IIQuality validation119

RotationShearFreeBoundaryPut images here. Various flow.119

Micro-scale IIQuality validation120Show velocity profile.120

Micro-scale IIApplications121Advecting texture is a general prolem, has a wider range than river121 Micro-scale IIDiscussions: non-noise textures ?We target textures specified by global properties, e.g. spectrumUseful for natural flowFor non-noise texturesMany of them work wellHigh-structured onesSuffer from ghosting effectsFuture work: choose best match portion from reference texture122122

Micro-scale IIDiscussions123Now I show you texture advection with non-noise texture.123

Micro-scale IIDiscussions124 Micro-scale IIDiscussionsLimitationPatches carry wavelength < kernel size low frequency: treated at the particle level (i.e. simulation)

125125A new texture advection methodLagrangian formalismBrings decorrelation of texture mapping and regeneration eventsLocal patchesEnsure continuous texture animation Provide accurate distortion metric

Micro-scale II: conclusion126OutlineIntroductionPrevious workStrategy overviewContributionsConclusion127ConclusionBy using our modelsOne can achieve real-time, scalable, and controllable river animation with temporally and spatially continuous details on current desktop 128128Future workMacro-scaleVelocity: more studies on parametersInfluence of slope of river bed

129We know some qualitive realtion between interpolation parameters and the profile of velocity, but not accurate.

Also, moving boundary need efficient data-structure for update distance.

Also about water depth.

Unsteady water surfacesTime-variant depth and boundaries

129Future workMeso-scaleHydraulic jumps, ship waves and wakes ...130

Images130Future workMicro-scale I: wave spritesVarious reference textures: domain wise controlSprites density: adaptive to flow condition

131

Also, use images here. Foam ..

Now sprites only adaptive to the view distance. We would like to make it adaptive also to the flow conditions.131Future workMicro-scale II: Lagrangian texture advectionExtend to 3D volume Improve: for high-structured texture

132

[RNGF03]. 132Future workPut models togetherIntegrate with existing systems Google Earth, Proland [BN08], video games 133

EA: CrysisGoogle EarthProlandThanks

134134Models of Animated Rivers for the Interactive Exploration of Landscapesa Ph.D. Defense byQizhi Yu

Under the Advisements of Dr. Fabrice Neyret Dr. Eric Bruneton

November 17, 2008

Grenoble Institute of Technology

135135