33
GPU-Accelerated Surface Denoising and Morphing with LBM Scheme Ye Zhao Ye Zhao Kent State University, Ohio Kent State University, Ohio

GPU-Accelerated Surface Denoising and Morphing with LBM Scheme Ye Zhao Kent State University, Ohio

Embed Size (px)

Citation preview

GPU-Accelerated Surface Denoising and Morphing

with LBM Scheme

Ye ZhaoYe ZhaoKent State University, OhioKent State University, Ohio

GPU-Accelerated Surface Denoising and Morphing with LBM Ye Zhao

IntroductionIntroduction• A parallel numerical scheme for shape

modeling applications– Local and explicit computation– Easy for programming– Straightforward GPU acceleration

• Modified from initially-designed fluid solver– Lattice Boltzmann method– Used in non-fluid applications

• Smoothing and morphing examples

GPU-Accelerated Surface Denoising and Morphing with LBM Ye Zhao

Previous Work:Previous Work:LBM in Computer GraphicsLBM in Computer Graphics

• Natural phenomena with fluids– Fluid Flows (Wei 04) – Smoke and fire (Wei03, Zhao03)

– Ink dispersion (Chu 05)

– Liquid mixture (Wang 06)

– More …

• Non-fluids – Lighting (Geist 04)

– Diffusion phenomena (Zhao 07)

GPU-Accelerated Surface Denoising and Morphing with LBM Ye Zhao

Previous Work: Previous Work: Denoising and MorphingDenoising and Morphing

• Most smoothing techniques propose energy functions defined by the normal or curvature properties, and perform the constrained energy minimization– Explicit integration (Taubin 95)– Implicit fairing (Desbrun 99)

• Shape interpolation– With distance field (Payne 92, Cohen-Or 98)– Level set scheme (Breen and Whitaker 01, Museth 02,

Lefohn 04)– PDE surface (Du and Qin 05)– Laplacian and Poisson based methods (Lipman 04,

Sorkine 04, Xu 05, Yu 04)

GPU-Accelerated Surface Denoising and Morphing with LBM Ye Zhao

Background:Background:Lattice Boltzmann MethodLattice Boltzmann Method

• A promising numerical scheme for simulating fluid dynamics

• Microscopic operations with essential physics• Macroscopic averaged properties obey the

Navier-Stokes equations• Clear statistical physics background• Easy implementation of complex boundaries• Fully parallel algorithm

GPU-Accelerated Surface Denoising and Morphing with LBM Ye Zhao

LBM: Microscopic DynamicsLBM: Microscopic Dynamics

Microscopic particles inside fluids

Fictitious particles moving along lattice links

GPU-Accelerated Surface Denoising and Morphing with LBM Ye Zhao

Lattice StructureLattice Structure

GPU-Accelerated Surface Denoising and Morphing with LBM Ye Zhao

Lattice Boltzmann EquationLattice Boltzmann Equation

– f i: probability distribution function of particle populations on each link

– ei: direction vector of each link

– Ωi: Collision between particles

• Recover the Navier-Stokes equation– At the limit of low Mach number flows

• Discretize Boltzmann equation on discrete moving directions i (1988)

)(),(),( ftrfttetrf iiii

Fupuut

u

ut

21

0

GPU-Accelerated Surface Denoising and Morphing with LBM Ye Zhao

LBM ComputationLBM Computation

)),(),((1

),(),( * uftrftrftrf eqiiii

• Collision: modeled as a relaxation process

– τrepresents the relaxation time– BGK model (1954) for equilibrium

))()((),( 22 ueDCuueBAuf iieq

i

• Streaming along a link to a neighbor

),()1,( *trfterf iii

GPU-Accelerated Surface Denoising and Morphing with LBM Ye Zhao

Macroscopic PropertiesMacroscopic Properties

• Density, velocity and viscosity• Easily computed from packet distribution

and link vectors

• Add body force

6

12

ii

i

ii

efuf

ieFB

2

12)),(),((

1),()1,( trftrftrfterf eq

iiiii

GPU-Accelerated Surface Denoising and Morphing with LBM Ye Zhao

LBM for Non-fluids ApplicationsLBM for Non-fluids Applications

• Actually LBM is a special numerical solver for partial differential equations (PDE)

• PDEs are widely used in graphics and visualization applications– Image processing– Surface processing– Volume graphics and visualization

• Pros:– LBM is easy to implement

• both CPU and GPU

– Flexible and easy to modify its scheme– Computational speed very fast with hardware

acceleration

GPU-Accelerated Surface Denoising and Morphing with LBM Ye Zhao

Diffusion PDE with LBMDiffusion PDE with LBM

• For fluid dynamics

– BGK equilibrium model

))()((),( 22 ueDCuueBAuf iieq

i • For diffusion only, we use

Auf eqi ),(

GPU-Accelerated Surface Denoising and Morphing with LBM Ye Zhao

Recover Diffusion EquationRecover Diffusion Equation

• Chapman-Enskog expansion, ε represents a small expansion parameter (Knudsen number)

• Use this and Taylor expansion on LBM equation

GPU-Accelerated Surface Denoising and Morphing with LBM Ye Zhao

Recover Diffusion EquationRecover Diffusion Equation• We get expanded equation :

• Summation on expanded equation over i

• Diffusion tensor defined by lattice structure

GPU-Accelerated Surface Denoising and Morphing with LBM Ye Zhao

LBM for PDEsLBM for PDEs• For a particular 3D lattice structure we

obtain

• Model the Laplace equation

• Model the Poisson equationwith the similar procedure by using function h as the body force in the LBM scheme

GPU-Accelerated Surface Denoising and Morphing with LBM Ye Zhao

Previous Results: ImagePrevious Results: Image• Pixel densities used as the computing

primitive in the LBM scheme

• Image merging

GPU-Accelerated Surface Denoising and Morphing with LBM Ye Zhao

Previous Results: VolumePrevious Results: Volume• Voxel density as the computing primitive

in the LBM scheme

GPU-Accelerated Surface Denoising and Morphing with LBM Ye Zhao

Process the SurfaceProcess the Surface• Option 1: use voxelization algorithm to

generate volume data from the surface, then apply volume processing with LBM– Implemented in our previous work– Not easy to apply shape interpolation

• Option 2: implicitly represent the shape as distance field, then directly use the distance as the computing primitive in the LBM

• We use the distance field LBM in this paper

GPU-Accelerated Surface Denoising and Morphing with LBM Ye Zhao

Distance Field LBMDistance Field LBM• Distance field

• Using distance in the LBM, replacing

with the curvature

• The LBM computation with distance field simulates mean curvature flow for surface smoothing

GPU-Accelerated Surface Denoising and Morphing with LBM Ye Zhao

Surface DenoisingSurface Denoising• In smoothing, can be defined by the

curvature for anisotropic denoising

GPU-Accelerated Surface Denoising and Morphing with LBM Ye Zhao

Surface DenoisingSurface Denoising

GPU-Accelerated Surface Denoising and Morphing with LBM Ye Zhao

Surface DenoisingSurface Denoising

GPU-Accelerated Surface Denoising and Morphing with LBM Ye Zhao

Surface MorphingSurface Morphing• Extends our approach to the surface

smoothing, we add the external expansion term to the level-set model

• By define body force in the LBM scheme

• For morphing, we define the force by the difference between the target shape and the morphing shape

GPU-Accelerated Surface Denoising and Morphing with LBM Ye Zhao

Surface MorphingSurface Morphing

GPU-Accelerated Surface Denoising and Morphing with LBM Ye Zhao

MovieMovie

GPU-Accelerated Surface Denoising and Morphing with LBM Ye Zhao

Surface MorphingSurface Morphing

GPU-Accelerated Surface Denoising and Morphing with LBM Ye Zhao

MovieMovie

GPU-Accelerated Surface Denoising and Morphing with LBM Ye Zhao

GPU AccelerationGPU Acceleration• Graphics processing units (GPU)

– Low price– Powerful parallel machine – Booming growth rate on speed– Industry-supported continuing development

• Ideal general-purpose applications– Large data sets– High parallelism– Minimal dependencies between data elements

• The LBM algorithm is very amenable and easy to accelerate with simple and straightforward mapping

GPU-Accelerated Surface Denoising and Morphing with LBM Ye Zhao

Our PerformanceOur Performance• We extend previous LBM fluid solver on

GPU to this project• Modification overload is minimal• Performance measured on

– CPU: Intel Core2 6300 with 3.25 GB RAM– GPU: Nvidia Geforce 8800GTX with 768MB

texture memory

GPU-Accelerated Surface Denoising and Morphing with LBM Ye Zhao

DiscussionDiscussion• Easy solution to some PDEs in the cellular-

automata originated updating rules– Nonlinear operations are implicitly

implemented in its collision operation, avoiding complex numerical computations;

• Good programmability in implementing the core LBM algorithm– With a few lines of codes and a short coding

time

• Straightforward mapping to GPUs for achieving great performance of simulation.

GPU-Accelerated Surface Denoising and Morphing with LBM Ye Zhao

DiscussionDiscussion• Distance field generation is a bottleneck in

the preprocessing• Accuracy determined by the resolution of

the lattice for the Eulerian approach– High accuracy increases memory consumption

• Quality of the resulting surfaces also defined by – Simulation resolution – Rendering method from the implicit

representation

GPU-Accelerated Surface Denoising and Morphing with LBM Ye Zhao

DiscussionDiscussion• GPU memory size is limited but improving

very fast• Multiple GPUs may be used for extremely-

large data• Adaptive and “Narrow-band” simulation

may be used for the advanced LBM scheme

GPU-Accelerated Surface Denoising and Morphing with LBM Ye Zhao

Thank You!Questions?