qyu defense

Upload: rotsen-oyarzun

Post on 03-Jun-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/12/2019 Qyu Defense

    1/134

    a Ph.D. Defense by

    Qizhi YuUnder the Advisements ofDr. Fabrice NeyretDr. Eric Bruneton

    November 17, 2008

    Grenoble Institute of Technology (INPG)

    1

  • 8/12/2019 Qyu Defense

    2/134

    Introduction

    Previous work

    Strategy overview

    Contributions

    Conclusion

    2

  • 8/12/2019 Qyu Defense

    3/134

  • 8/12/2019 Qyu Defense

    4/134

    RiversHydrology

    Hydraulics Geomorphology

    Ecology

    4

  • 8/12/2019 Qyu Defense

    5/134

    RiversHydraulics

    Hydrology

    Computergraphics

    Geomorphology

    Ecology

    5

  • 8/12/2019 Qyu Defense

    6/134

    ObjectiveSynthesize visually convincing rivers

    Study contentModeling River shape & surface details

    Animating Water motion in rivers.

    6

  • 8/12/2019 Qyu Defense

    7/134

    Many applications, need more studies

    EA: CrysisGoogle Earth

    7

  • 8/12/2019 Qyu Defense

    8/134

    Multi-scaleGeometry

    Kilometer-scale lengthmillimeter-scale waves

    Water motion Kilometer-scale mean flow

    millimeter-scale fluctuation

    Complicated physicsTurbulence Surface phenomena

    8

  • 8/12/2019 Qyu Defense

    9/134

    Modeling and animating rivers

    ConstraintsReal-timeScalabilityControllability

    Realism

    25 fps or more

    9

  • 8/12/2019 Qyu Defense

    10/134

    Modeling and animating rivers

    ConstraintsReal-timeScalabilityControllability

    Realism

    Very long or unbounded riversCamera moves arbitrarily

    10

  • 8/12/2019 Qyu Defense

    11/134

    Modeling and animating rivers

    ConstraintsReal-timeScalabilityControllability

    Realism Intuitive handles for controllingappearance and behavior of rivers

    11

  • 8/12/2019 Qyu Defense

    12/134

    Modeling and animating rivers

    ConstraintsReal-timeScalabilityControllability

    RealismAnimated surface detailswith temporal and spatial continuity

    12

  • 8/12/2019 Qyu Defense

    13/134

    Modeling and animating rivers

    ConstraintsReal-timeScalabilityControllability

    Realism

    13

  • 8/12/2019 Qyu Defense

    14/134

    Introduction

    Previous work

    Strategy overview

    Contributions

    Conclusion

    14

  • 8/12/2019 Qyu Defense

    15/134

    3D Navier-Stokes simulation

    2D depth-averaged simulation

    2D simulation

    Surface wave models (2D)

    15

  • 8/12/2019 Qyu Defense

    16/134

    3D Navier-Stokes simulation

    2D depth-averaged simulation

    2D simulation

    Surface wave models (2D)

    16

  • 8/12/2019 Qyu Defense

    17/134

    Incompressible Navier-Stokes equationsMomentum conservation

    Volume conservation

    Boundary conditions

    Computational Fluid Dynamics (CFD)Numerical methods

    17

  • 8/12/2019 Qyu Defense

    18/134

    CFD CG fluid animationStable solver [stam99]

    Two approachesEulerian : defines quantities at fixed pointLagrangian: defines quantities at particles

    18

  • 8/12/2019 Qyu Defense

    19/134

    Water animation [EMF02]Solve NSE numerically on a grid to get velocities

    Use level-set to track water-air interface

    19

  • 8/12/2019 Qyu Defense

    20/134

    Pouring water in a glass

    [EMF02]15 minutes per frame

    55 x 120 x55 grids

    Computationally expensive!

    20

  • 8/12/2019 Qyu Defense

    21/134

    Poorly scalableCG (stable solver): O(N^3)

    Difficult to control for artistsWater Behavior Initial values, boundary conditionsNo intuitive relation

    21

  • 8/12/2019 Qyu Defense

    22/134

    Smoothed Particle Hydrodynamics (SPH) [MCG03]Solve NSE in the Lagrangian formalism

    Compared with Eulerian approachEasier adaptive to complex domainDifficult to reconstructa smooth surface

    For our purposeSimilar problemsas Eulerian approach

    22

    2200 particles5 fps

  • 8/12/2019 Qyu Defense

    23/134

    3D Navier-Stokes simulation

    2D depth-averaged simulation

    2D simulation

    Surface wave models (2D)

    23

  • 8/12/2019 Qyu Defense

    24/134

    2D Shallow Water model [Mol95]Commonly used in Hydraulics for simulating riversAssumptions Hydrostatic approximation

    No vertical water motionIntegrate the NS equations along vertical directionUnknowns:

    depth-averaged velocity & elevation of water surface

    24

  • 8/12/2019 Qyu Defense

    25/134

    PropertiesA lot faster than 3D N-S simulation

    Loss some 3D surface features (e.g. overturning )Shallow waves ( wavelength >> depth)

    For our purposeStill too expensive, especially for large riversBounded domain (like other simulation).

    25

  • 8/12/2019 Qyu Defense

    26/134

    Linear wave equation [KM90]Simplified from shallow water model

    Assumptions constant water depth, no advection term

    Properties Fast, cant simulate river flow

    26

  • 8/12/2019 Qyu Defense

    27/134

    [Irving et al. 06]

    20 processors25 minutes per frame

    27

  • 8/12/2019 Qyu Defense

    28/134

    3D Navier-Stokes simulation

    2D depth-averaged simulation

    2D simulation

    Surface wave models (2D)

    28

  • 8/12/2019 Qyu Defense

    29/134

    Simulate 2D velocity by solving 2D N-Sno surface elevation simulated

    Use tricks for surface elevationPressure [CdVL95]Noise [TG01]

    29

  • 8/12/2019 Qyu Defense

    30/134

    3D Navier-Stokes simulation

    2D depth-averaged simulation

    2D simulation

    Surface wave models (2D)

    30

  • 8/12/2019 Qyu Defense

    31/134

    AssumptionDeep water: wave length

  • 8/12/2019 Qyu Defense

    32/134

    AssumptionHeight field

    A procedural methodParticles on surfaces, advected with a fixed speedEach carries a wave shape functionSuperpose all particles height field

    PropertiesImitate object-water interactionNo water flow

    32

  • 8/12/2019 Qyu Defense

    33/134

    Superpose sine waves [FR86, Pea86]Dynamic wave tracing [GS00]Ship wave [Gla02]

    33

    [Gla02] [GS00] [Pea86]

    Not for river flow

  • 8/12/2019 Qyu Defense

    34/134

    Many work on water or wave animation (CG),river simulation (Hydraulics)

    None for river animation under ourconstrains:

    Real-time

    ScalabilityControllability

    34

  • 8/12/2019 Qyu Defense

    35/134

    Introduction

    Previous work

    Strategy overview

    Contributions

    Conclusion

    35

  • 8/12/2019 Qyu Defense

    36/134

    Model river aspects in three scales, fromcoarse to fine

    36

  • 8/12/2019 Qyu Defense

    37/134

  • 8/12/2019 Qyu Defense

    38/134

    Model river aspects in three scalesMacro-scale: river shape & mean water surface

    Meso-scale: individual & structured waves

    38

  • 8/12/2019 Qyu Defense

    39/134

    Model river aspects in three scalesMacro-scale: river shape & mean water surface

    Meso-scale: individual & structured wavesMicro-scale: continuous field of small waves

    39

  • 8/12/2019 Qyu Defense

    40/134

    We need river velocityCause of many meso-scale phenomena

    Advect surface featuresModel water motion in three scales

    Macro-scale: mean flow

    Meso-scale: individual perturbationsMicro-scale: continuous irregular fluctuations

    40

  • 8/12/2019 Qyu Defense

    41/134

    We need river velocityCause of many meso-scale phenomena

    Advect surface featuresModel water motion in three scales

    Macro-scale: mean flow

    Meso-scale: individual perturbationsMicro-scale: continuous irregular fluctuations

    We wont solve ALL phenomena in this thesis . 41

  • 8/12/2019 Qyu Defense

    42/134

    Introduction

    Previous work

    Strategy overview

    Contributions1: Macro-scale2: Meso-scale3: Micro-scale

    Conclusion42

  • 8/12/2019 Qyu Defense

    43/134

    Introduction

    Previous work

    Strategy overview

    Contributions1: Macro-scale

    2: Meso-scale3: Micro-scale

    Conclusion43

  • 8/12/2019 Qyu Defense

    44/134

    GoalShape of rivers

    Mean flow of rivers

    44

  • 8/12/2019 Qyu Defense

    45/134

    GoalShape of rivers

    Mean flow of rivers

    GIS or previous work[KMM88]

    45

  • 8/12/2019 Qyu Defense

    46/134

    Inputriver shape (described as a network)

    46

  • 8/12/2019 Qyu Defense

    47/134

    Assumption a 2D steady flow

    Visually convincing velocityDivergence free IncompressibleBoundary-conformingFlowing from source to sink (given flow rate Q)

    Continuous

    Requirements of algorithmsFast, scalable and controllable

    47

  • 8/12/2019 Qyu Defense

    48/134

    Some existing work [BHN07] suggestusing stream function to get divergence-freevector field

    48

  • 8/12/2019 Qyu Defense

    49/134

    Stream function is defined such that

    Incompressibility

    49

  • 8/12/2019 Qyu Defense

    50/134

    Properties of stream functionConst along boundariesRelates to the volume flow rate

    Extend to a river networkGiven flow rates and a river network all boundary values

    50

  • 8/12/2019 Qyu Defense

    51/134

    Given flow rates, and boundary valuesHow to determine the internal field ?

    51

  • 8/12/2019 Qyu Defense

    52/134

    AssumptionIrrotational (potential) flow

    52

  • 8/12/2019 Qyu Defense

    53/134

    Observe a numerical solution of a Laplaceequation

    Streamlines (isocurve of stream function) 53

  • 8/12/2019 Qyu Defense

    54/134

    [GW78]Interpolant of the Inverse-Distance Weightedinterpolation (IDW) [She68] similar to theharmonic functions.

    We adapt IDW

    local for the performance reasonsprovide parameters for controlling velocity profile

    54

  • 8/12/2019 Qyu Defense

    55/134

    55

    d distance to boundariesf smooth functions search radius

    p parameters

  • 8/12/2019 Qyu Defense

    56/134

    Our result Numerical solution

    56

  • 8/12/2019 Qyu Defense

    57/134

    Finite difference

    57

  • 8/12/2019 Qyu Defense

    58/134

    Interpolation relies heavily on distance queryAcceleration needed

    Combine with tile-based terrain [BN07]Generate an acceleration data structure in eachnewly created terrain on-the-fly

    Please see the thesis for more details .

    58

  • 8/12/2019 Qyu Defense

    59/134

    59

  • 8/12/2019 Qyu Defense

    60/134

    Procedural river flowFast

    Scalable Calculate at needed Velocity locally dependent

    Controllable Control velocity: flow rates, interpolation parameters Edit shape of river on-the-fly

    60

  • 8/12/2019 Qyu Defense

    61/134

    Introduction

    Previous work

    Strategy overviewContributions

    1: Macro-scale

    2: Meso-scale3: Micro-scale

    Conclusion61

  • 8/12/2019 Qyu Defense

    62/134

    GoalModeling individual & structured wave features onriver surfaces, with our constraints. Real-time Scalability Controllability

    Quality

    62

  • 8/12/2019 Qyu Defense

    63/134

    63Real scene

  • 8/12/2019 Qyu Defense

    64/134

    High-resolution required for simulation andrendering

    64

  • 8/12/2019 Qyu Defense

    65/134

    Construct the vector features from a givenvelocity field without numerical simulation

    Shockwave

    Ripples

    65

  • 8/12/2019 Qyu Defense

    66/134

    ProblemsNeed to be improved robustness & efficiency

    No solution for surface reconstruction and rendering

    66

  • 8/12/2019 Qyu Defense

    67/134

    Improve on existing model [NP01]Result Mean flow shockwave curves (wave crests) Animated by adding perturbation to the mean flow

    67

  • 8/12/2019 Qyu Defense

    68/134

    Improve on existing model [NP01]Result Mean flow shockwave curves (wave crests) Animated by adding perturbation to the mean flow

    Macro-scale

    Meso-scale, [WH91]

    68

  • 8/12/2019 Qyu Defense

    69/134

    Improve on existing model [NP01]Result Mean flow shockwave curves (wave crests) Animated by adding perturbation to the mean flow Very efficient

    69

  • 8/12/2019 Qyu Defense

    70/134

    Improve on existing model [NP01]

    Construct appropriate representation from

    wave features for high-quality rendering

    70

  • 8/12/2019 Qyu Defense

    71/134

    lo-res base water surface + hi-res wave surface

    71

  • 8/12/2019 Qyu Defense

    72/134

    lo-res base water surface + hi-res wave surface

    Macro-scale

    72

  • 8/12/2019 Qyu Defense

    73/134

    lo-res base water surface + hi-res wave surface

    Meso-scale

    73

  • 8/12/2019 Qyu Defense

    74/134

    Feature-aligned mesh reducesgeometric aliasing ( normal-noise)

    Not feature-aligned Feature-aligned74

  • 8/12/2019 Qyu Defense

    75/134

    Define wave surface as sweeping a waveprofile along the wave curve

    User defined Wave profile

    Wave curve

    75

    Water surfacemesh

  • 8/12/2019 Qyu Defense

    76/134

    Sample by a quad meshaligned the wave curve

    v 76

    Wave curve

  • 8/12/2019 Qyu Defense

    77/134

    Accurate normals from the wave profile

    u

    v

    B

    NT

    P(u,v)

    v 77

  • 8/12/2019 Qyu Defense

    78/134

    Mesh stitching ?Re-mesh base surface at each frame, tooexpensive

    We solve it in the rendering stage

    Please refer to the thesis for more details

    78

  • 8/12/2019 Qyu Defense

    79/134

    79

  • 8/12/2019 Qyu Defense

    80/134

    Simply draw two wave strips with Z-buffer

    80

  • 8/12/2019 Qyu Defense

    81/134

    Generate a dedicated mesh at crossing

    81

  • 8/12/2019 Qyu Defense

    82/134

    Final result

    82

  • 8/12/2019 Qyu Defense

    83/134

    83

  • 8/12/2019 Qyu Defense

    84/134

    Approach: feature-based vector simulationSimulation: construct & animate vector featuresRendering: featured-based representation

    84

  • 8/12/2019 Qyu Defense

    85/134

    Introduction

    Previous work

    Strategy overviewContributions

    1: Macro-scale

    2: Meso-scale3: Micro-scale

    Conclusion

    85

  • 8/12/2019 Qyu Defense

    86/134

    Goal Modeling small scale animated surface features

    Approachdynamic textures

    Two workWave sprites Focus on performanceLagrangian texture advection Focus on quality

    86

  • 8/12/2019 Qyu Defense

    87/134

    IntroductionPrevious workStrategy overviewContributions

    1. Macro-scale2. Meso-scale

    3. Micro-scale Wave sprites Lagrangian texture advection

    Conclusion87

  • 8/12/2019 Qyu Defense

    88/134

    Sprite: a small textured element Sprites in texture world [LN03,LHN05]

    to get large high-resolution texture , low memory Idea: combine animation + texture sprites

    to get very large river with animated details,efficiently.

    88

  • 8/12/2019 Qyu Defense

    89/134

    How should sprites behave for our purposes ?Sprites -> represent waves reconstructed texture should conserve the spectrum

    Well distributed, avoiding holes and overcrowding The more overlapping, the more texture spectrum biasing

    The density of sprites should be adaptive

    Convey the flow motion

    89

  • 8/12/2019 Qyu Defense

    90/134

    Dynamic adaptive samplingA set of particles in world space advected by flowKeep Poisson-disk distribution in screen space.

    Attach a textured sprite to each particle

    90

  • 8/12/2019 Qyu Defense

    91/134

    Dynamic adaptive samplingA set of particles in world space advected by flowKeep Poisson-disk distribution in screen space.

    Attach a textured sprite to each particleWhy ?

    91

  • 8/12/2019 Qyu Defense

    92/134

    Uniform densityOverlapping as little as possible

    Easy to ensure spatial continuitySuperimposing sprites (with r=d) ensures no-holes

    r r = ddiameter of poisson-disk

    92

  • 8/12/2019 Qyu Defense

    93/134

    Dynamic adaptive samplingA set of particles in world space advected by flowKeep Poisson-disk distribution in screen space

    Attach a sprite to each particle

    Auto-adapt to distance

    93

  • 8/12/2019 Qyu Defense

    94/134

    AlgorithmAdvect particles with the flow in world spaceDelete particles out of the view frustumDelete particles violating the minimum distancerequired by the Poisson-disk distribution (inscreen space)

    Insert particles to keep Poisson-disk distribution

    94

  • 8/12/2019 Qyu Defense

    95/134

    AlgorithmAdvect paticles with the flowDelete particles out of the view frustumDelete particles violating the minimum distancerequired by the Poisson-disk distribution (inscreen space)Insert particles to keep Poisson-disk distribution

    Boundary-sampling algorithm [DH06]

    95

  • 8/12/2019 Qyu Defense

    96/134

    Spatial continuitySmooth kernelConstrained sampling issues near boundary

    Temporal continuityFading in/out

    Please refer the thesis.

    96

  • 8/12/2019 Qyu Defense

    97/134

    A set of sprites well distributedEach sprite Live in texture space maps to a portion of a reference texture

    Reconstruct the global textureSprite has circular kernel in screen space , butellipse in object space So we superimpose them in screen space

    97

  • 8/12/2019 Qyu Defense

    98/134

    98

  • 8/12/2019 Qyu Defense

    99/134

    99

    Efficient GPU. Inspired from [LN05]

  • 8/12/2019 Qyu Defense

    100/134

    100

  • 8/12/2019 Qyu Defense

    101/134

    Wave-spritesTexture flow surface with scene-independentperformance (in real-time)

    Limitation

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

    101

  • 8/12/2019 Qyu Defense

    102/134

    IntroductionPrevious workStrategy overviewContributions

    1. Macro-scale2. Meso-scale

    3. Micro-scale Wave sprites Lagrangian texture advection

    Conclusion102

  • 8/12/2019 Qyu Defense

    103/134

    A technique of dynamic textureConform to the input flowConserve texture properties (e.g. spectrum)

    PurposeAugment coarse simulation with small scale

    appearance

    103

  • 8/12/2019 Qyu Defense

    104/134

    Advect texture coordinatesTexture follow flow and deformBut, over stretching destroy texture properties

    Regenerate a textureAfter a delay: latency

    Blend two de-phased textures Illusion of advection

    104

  • 8/12/2019 Qyu Defense

    105/134

    How to choose a reasonable latency ? high bad conservation of spectrum low bad conformation to flowGood one: adapt to local flow condition

    (deformation)

    In [MB95], only one global value

    105

  • 8/12/2019 Qyu Defense

    106/134

    Idea: adaptive local latency

    Local deformation metrics

    MIPmap -like approach:Multiple layers of texturesEach layer = Eulerian advection methodAssign different latency to each layer For each pixel, interpolate two nearest layersaccording to local s

    106

  • 8/12/2019 Qyu Defense

    107/134

    latency of all layers are bounded in arange

    e.g. For zero-velocity , the ideal latency should beinfinity close to still area, we cant choose agood latency value

    Interpolation : not accurate

    Eulerian formalismnot optimal in large sparse domain (clouds, fire)

    107

  • 8/12/2019 Qyu Defense

    108/134

  • 8/12/2019 Qyu Defense

    109/134

    Advected by flow

    Dynamic Poisson-disk

    distributiond

    109

  • 8/12/2019 Qyu Defense

    110/134

  • 8/12/2019 Qyu Defense

    111/134

    Init: regular grid

    Kernel radius = d

    Patch size > 2d

    Map to a random portionStore (u, v) at nodes

    U

    V

    111

  • 8/12/2019 Qyu Defense

    112/134

    Nodes advected by flow

    112

  • 8/12/2019 Qyu Defense

    113/134

    Nodes advected by flow

    Delete a patchExceed some deformationmetric

    113

  • 8/12/2019 Qyu Defense

    114/134

    Nodes advected by flow

    Delete a patchExceed some deformationmetric

    Patch boundary intersectswith kernel

    A new patch would be generated nearby automatically

    by Poisson-disk distribution mechanism 114

  • 8/12/2019 Qyu Defense

    115/134

    Temporal & spatialInsert / delete temporalSmooth kernel spatial

    Define various temporal and spatial weights on grid nodes

    Please see details in the thesis

    115

  • 8/12/2019 Qyu Defense

    116/134

    Encode all patches into one texture T patchTexcoords (u, v)Weights w(x, t)

    Accessing the advected textureFor each pixel

    Determine the patches covering current pixel Access reference texture via T patch Blending with weights (only kernel parts!)

    116

  • 8/12/2019 Qyu Defense

    117/134

    117

  • 8/12/2019 Qyu Defense

    118/134

    Compare against Eulerian advectionFFT To evaluate the appearant spectrum

    Optical flow To evaluate the appearant motion

    Input reference texture 3-octave Perlin noise

    118

  • 8/12/2019 Qyu Defense

    119/134

    Various input flow

    Please see my webpage for more video results

    119

    Rotation Shear Free Boundary

  • 8/12/2019 Qyu Defense

    120/134

    120

  • 8/12/2019 Qyu Defense

    121/134

    121

  • 8/12/2019 Qyu Defense

    122/134

    We target textures specified by globalproperties, e.g. spectrum

    Useful for natural flow

    For non-noise texturesMany of them work wellHigh-structured ones Suffer from ghosting effects Future work: choose best match portion from reference

    texture

    122

  • 8/12/2019 Qyu Defense

    123/134

    123

  • 8/12/2019 Qyu Defense

    124/134

    124

  • 8/12/2019 Qyu Defense

    125/134

    A new texture advection methodLagrangian formalism Brings decorrelation of texture mapping and

    regeneration eventsLocal patches Ensure continuous texture animation Provide accurate distortion metric

    126

  • 8/12/2019 Qyu Defense

    126/134

    Introduction

    Previous work

    Strategy overview

    Contributions

    Conclusion

    127

  • 8/12/2019 Qyu Defense

    127/134

    By using our modelsOne can achieve real-time , scalable , andcontrollable river animation with temporally andspatially continuous details on current desktop

    128

  • 8/12/2019 Qyu Defense

    128/134

    Macro-scaleVelocity: more studies on parametersInfluence of slope of river bed

    129

  • 8/12/2019 Qyu Defense

    129/134

    Meso-scaleHydraulic jumps, ship waves and wakes ...

    130

  • 8/12/2019 Qyu Defense

    130/134

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

    131

  • 8/12/2019 Qyu Defense

    131/134

    Micro-scale II: Lagrangian texture advectionExtend to 3D volumeImprove: for high-structured texture

    132[RNGF03]

  • 8/12/2019 Qyu Defense

    132/134

    Put models together

    Integrate with existing systems

    Google Earth, Proland [BN08], video games

    133EA: CrysisGoogle Earth Proland

  • 8/12/2019 Qyu Defense

    133/134

    134

    Grenoble Institute of Technology

  • 8/12/2019 Qyu Defense

    134/134

    a Ph.D. Defense by

    Qizhi Yu

    Under the Advisements of

    Dr. Fabrice Neyret

    Dr. Eric Bruneton

    November 17, 2008