theodore kim ming c - korea universitykucg.korea.ac.kr/seminar/2012/ppt/ppt-2012-03-28.pdf · level...
TRANSCRIPT
Jae ho Lim
Korea University
Computer Graphics Lab.
Theodore Kim Ming C.Lim
Eurographics 2003
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 2 KUCG |
Abstract
• The beautiful, branching structure of ice is one of the most striking visual phenomena of the winter landscape
Little study about modeling this effect in computer graphics
• Present a novel algorithm for visual simulation of ice growth
Use the Phase field method
Acceleration technique
Novel geometric sharpening algorithm
Movie
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 3 KUCG |
Introduction
• SWOT analysis for this paper
S (Strength : Contribution) • Physically based ice growth based on rigorous
mathematical formulations and sound physical observations
• User control
• Novel geometric processing step ‗ Introduces internal structure to the ice
• Accelerate and simplified computations for interactive simulation of modest-scale ice crystal growth
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 4 KUCG |
Introduction
• SWOT analysis for this paper
W & O (Weak point and Opportunities) • Relatively little research in computer graphics
• None of the previous work presents a mechanism ‗ Artist to automatically adjust the simulation parameters to achieve a
specific visual effect
T ( Technical Issue) • Ice growth simulation using Phase field
• Temperature mapping for user control
• Internal structure using Morphological operator
• Rendering for Photon mapping
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 5 KUCG |
Previous work
• Visual Simulation Methods for Water in Different States
Dynamics of water and steam • Animation and rendering of complex water surfaces
‗ D.Enright et al / SIGGRAPH 2002
• Computer modeling of fallen snow ‗ P.Fearing et al / SIGGRAPH 2000
Structure of Dendritic ice • Une mëthode géométrique élémentaire pour l'étude de
certaines questions de la théorie des courbes planes. ‗ Helge von Koch / Acta Mathematica 1906
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 6 KUCG |
Previous work
The Fractal Geometry of Nature • B.Mandelbrot / W H Freeman 1982
• Diffusion Limited Aggregation (DLA)
Fractal Concepts in Surface Growth • A. Barabási et al / Cambridge University Press 1995
Diffusion-limited aggregation, a kinetic critical phenomenon. • T. Witten et al / Physicsal Review Letters 1981
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 7 KUCG |
Previous work
• Simulation Techniques in Computational Physics
Introduce to the morphology of possible ice crystal shapes • Pattern formation in growth of snow crystals occurring in
the surface kinetic process and the diffusion process ‗ Kuroda et al / Physical Review A 1990
Phase field • Modeling and numerical simulations of dendritic crystal
growth. ‗ R.Kobayashi / Physica D 1993
• Adaptive mesh refinement computation of solidification microstructures using dynamic data structures.
‗ N.Provatas et al / Journal of Computational Physics 1999
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 8 KUCG |
Previous work
Level set method • Level Set Methods and Dynamic Implicit Surfaces
‗ S.J.Osher et al / Spinger-Verlag 2002
• Level Set Methods and Fast Marching Methods ‗ J.A.Sethian / Cambridge University 1999
• Level set method
High cost / Some artifact
• Phase field method
Low cost / Some artifact
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 9 KUCG |
Overview
• Simulate growth in 2D and add 3D detail later
Reduce the Time complexity • O(𝑁3) to O(𝑁2).
• Performing banded computation around the “front” of the ice and water interface
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 10 KUCG |
Overview
• User Control
Seed crystal and freezing temperature input into the phase field simulation
Seed Crystal • Set the initial condition
• Visually salient features of our target object
• Using edge detection
• Influence the simulation throughout by manipulating the freezing temperature
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 11 KUCG |
Overview
• Due to smoothing artifacts of the phase field
Performed by first computing the border and medial axis of the ice with morphological operators
Generate a constrained conforming Delaunay triangulation.
• Rendering using photon mapping
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 12 KUCG |
The Phase Field Method
• [4.1] – [4.3]
Overview of the method
Kobayashi formulation
• [4.4] – [4.5]
Our own analysis and optimizations
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 13 KUCG |
4.1. Undercooled Solidication
• An undercooled liquid is a liquid that has been cooled below its freezing temperature
cooled sufficiently slowly for it to remain in its liquid state
• Small amount of solid material “Seed Crystal”
Liquid -> Solid
Initial seed in a rapid and unstable reaction • Growth of the crystal can be influenced by small
perturbations
• Can lead to the complex branching
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 14 KUCG |
4.2. The Phase Field
• In the phase field method,
Undercooled liquid is represented implicitly as a two or three dimensional grid
`Eulerian' representation
• For simplicity and tractability
limit our simulations to two dimensions
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 15 KUCG |
4.2. The Phase Field
• Two separate fields
Temperature T • Records the amount of heat in a given cell
Phase field p • Records the current phase of a given cell.
Grid coordinate (x,y)
• 𝑇𝑥𝑦and 𝑝𝑥𝑦 as the corresponding values in the
temperature and phase fields
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 16 KUCG |
4.2. The Phase Field
• Figure 3: (a) A phase field in which white is p = 1 (ice), and black is p = 0 (water). The gray band in the middle is the section shown in profile in (b). (b) Cross section from (a) in profile. Note that while the transition from water to ice is abrupt, it is not instantaneous.
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 17 KUCG |
4.3. The Kobayashi Formulation
• The first paper to report successful simulation of a wide variety of ice growth patterns using phase fields
Reaction-diffusion equations • for texture synthesis in computer graphics
Diffusion Reaction
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 18 KUCG |
4.3. The Kobayashi Formulation
• K is latent heat constant
• R term models the process where, as water transitions to ice, it produces heat.
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 19 KUCG |
4.3. The Kobayashi Formulation
• Kobayashi's formulation
Diffusion term
Reaction term
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 20 KUCG |
4.3. The Kobayashi Formulation
• Diffusion term The standard Laplacian diffusion term is the
sum of the diagonal elements of the Hessian matrix
The Kobayashi formulation • Diffusion term is the sum of the all elements of the
Hessian matrix
• Diagonal terms are abbreviated as a gradient and divergence operator instead of a pure Laplacian
• Different anisotropy placement accounts for both the Laplacian of the phase term and the gradient of the anisotropy term.
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 21 KUCG |
4.3. The Kobayashi Formulation
• Kobayashi also presents a complex and general model of anisotropy
Define 𝜃 • orientation of the front at a given grid cell
‗ 3D :
‗ 2D :
The anisotropy term j : degree of anisotropy .: strength of anisotropy .: fixed reference direction .: Scaling factor
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 22 KUCG |
4.3. The Kobayashi Formulation
• Constant Table
• The term is also necessary in Eqn. 2, but this can be obtained by taking the analytical derivative of Eqn. 4.
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 23 KUCG |
4.3. The Kobayashi Formulation
• Reaction term
• energy potentials in the system
m term is defined as:
• This equation are probably of limited use to a graphics
audience
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 24 KUCG |
4.3. The Kobayashi Formulation
• Eqn. 5
m = 0, 0.5 < p < 1 : Positive
m = 0, 0 < p < 0.5 : Negative • Energy is in a ‘metastable‘ state where values of p are
encouraged to stay the same
m = 0.5, 0 < p < 1 : Positive • If a grid cell has m = 0.5, no matter what its p value, it is
encouraged to transition towards ice
• Temperature of a grid cell increases, its m increases towards 0:5, and it becomes more likely to transition to ice
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 25 KUCG |
4.4. Improved Anisotropy
• Eqn. 4 affords both simpler and richer controls for general texture synthesis than the anisotropy term described by Witkin and Kass
Limits the number of preferred growth directions
All the directions must be either parallel or orthogonal
Strength of anisotropy in parallel directions must be the same
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 26 KUCG |
4.4. Improved Anisotropy
• Slight modification
Accomplished by defining a separate 𝛿𝑖 for each 𝑖𝑡ℎ cosine lobe
Limiting the influence of to the range 𝛿𝑖
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 27 KUCG |
4.5. Possible Ice Crystal Shapes
Our simulation
Real photo
Dendritic growth Sectored Plate Isotropic growth
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 28 KUCG |
4.6. Banded Optimization
• Some of the optimization techniques
Phase field methods include adaptive meshes for representing the phase and temperature fields
Diffusion Monte Carlo (DMC) methods
• Accurate simulation of solidification at scales much smaller than the mesh resolution
Smaller scales are not of interest to us
• Solution
localization of computation to the grid cells along the interface (e.g “narrow band” )
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 29 KUCG |
4.6. Banded Optimization
• Compares banded and unbanded performance
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 30 KUCG |
4.7. Hardware Implementation
• The timings are all for an unbanded implementation.
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 31 KUCG |
5. User Control
• One of our goals is to introduce a user parametrization into the simulation
The seed crystal allows the user to guarantee that primary shape features are present in the final ice
Freezing temperature allows the user to provide further simulation hints by rating the importance of secondary features
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 32 KUCG |
5. User Control
a) Source Image b) Seed Crystal texture c) Simulation results after seed crystal d) Freezing temperature mapping e) Ice grown with a mapped seed crystal
and freezing temperature f) Bump mapped ice
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 33 KUCG |
5.1. Seed Crystal Mapping
• First, the user selects the most visually important features and maps them to the seed crystal
Choose important feature
Arbitrary feature as the most important. • Figure.5 (B)
Extracted using Canny edge detection
• Fig. 5(c), Desired shape is quickly lost.
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 34 KUCG |
5.2. Freezing Temperature Mapping
• By varying the freezing temperature over the temperature field
Model the presence of impurities in the undercooled liquid.
Freezing rate can controllable temperature field • Set the High temperature
‗ Promote ice growth
• Set the low temperature ‗ Suppress ice growth
• To rate the importance of regions with respect to one other, we set their freezing temperatures between 0 and 𝑇𝑒
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 35 KUCG |
5.2. Freezing Temperature Mapping
• Figure.5 (d)
white regions represent 𝑇𝑒 • Greyer regions represent progressively lower freezing
temperatures.
• Freeze over first before the simulation starts branching out into the greyer regions.
• Simulation can use any arbitrary texture, the user can impose any desired rating method.
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 36 KUCG |
6. Introducing Internal Structure
• Internal structure to the results of the physically-based simulation.
Produce triangles from the results of the simulation
Photon map renderer
• The phase field method provides the position of a growing ice border
Increase the scale of the simulation • Details are quickly lost
• Creating unnaturally at ice.
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 37 KUCG |
6.1. Naïve bump mapping
• In order to capture this internal detail
Bump mapped the ice according to the 𝜕𝑝
𝜕𝑡of the ice
As water transitions to ice • Expands slightly
• Each time step by increasing the height of the ice by the amount of phase transition
• Modeling the expansion coefficient is still an open problem in chemistry
Add a phenomenological step
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 38 KUCG |
6.2. Adding Subdivision Creases
• Once the simulation has run to completion
Internal structures by inserting creases into the ice at visually expected locations • Subdivision surfaces
• Repeatedly subdividing ‗ Border and along the medial axis.
Border generated by the simulation
Creases at the medial axis • sharply faceted
• visually interesting features in other natural growth phenomena
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 39 KUCG |
6.3. Morphological Operators
• Isolate both the border and medial axis through the use of morphological operators
morphological operators • Guarantee connectivity properties
• Greatly simplify the construction of a subdivision control mesh
Final ice is stored as a nearly binary raster image
Using threshold • P >= 0.5 : 1
• P < 0.5 : 0
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 40 KUCG |
6.3. Morphological Operators
• Basic convolution kernel
“structuring elements” • Jahne’s article
• Erosion
Single iteration of erosion on an image • single layer of white pixels around all white regions is
deleted
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 41 KUCG |
6.3. Morphological Operators
• Use morphological operators to extract the medial axis of the ice
Advantage : Very simple and guarantees the same connectivity properties
Disadvantage : Slower than other medial axis algorithms
Original Our
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 42 KUCG |
6.3. Morphological Operators
• In morphological terms
Isolation of the medial axis is known as the “skeletonization” • Convolving by all eight structuring elements
• include “don't care” pixels
• “don't care” pixels are denoted with empty pixels.
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 43 KUCG |
6.3. Morphological Operators
• The structuring elements in Fig. 9 are each run repeatedly until no further changes take place
Pixels that remain are those along the medial axis
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 44 KUCG |
6.4. Control Mesh Segment Generation
• To construct the control mesh for the subdivision surface
Extract a set of line segments from the border and medial axis images • line segments will be the crease edges in the subdivision
surface
Extraction is accomplished by performing a depth-first search of the white pixels in the images
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 45 KUCG |
• Three different vertex types at the endpoints of subdivision creases
According to Hoppe
Dart Crease Corner
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 46 KUCG |
• We run a similar algorithm on the border image
Not guaranteed to have any dart pixels • start the traversal from any white pixel
• Since there are not many darts or corners
Insert new vertices • according to a “stride” length
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 47 KUCG |
6.5. Triangulation Generation
• Input a set of line segments
Generate a triangulation that contains both the points and lines. • Generated many “needle” triangles
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 48 KUCG |
6.6. Height Field Generation
• Two dimensional triangulation of the ice
Assign height values to the vertices in the triangulation
• Original bump map is very smooth
values can also be very smooth
• In order to guarantee the appearance of creases in the limit surface
According to a linear interpolation that approximates a faceted surface
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 49 KUCG |
6.6. Height Field Generation
• Calculating the distance
Nearest border and medial axis pixels for all pixels.
linearly weighting the heights of the nearest border and medial pixels • The heights of the border and medial pixels are taken from
the original bump map
linear interpolation between the medial axis and border contours
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 50 KUCG |
6.7. Crease Generation
• Linear interpolation is used to set the height values of the triangulation
Creases are present in the ice from the very beginning
Refined through subdivision
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 51 KUCG |
6.8. Rendering
• Much of the interesting visual detail of ice is contained in the caustics generated by the refracting medium.
Used photon mapping for rendering
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 52 KUCG |
7. Implementation and Results
• All the pipeline stages were implemented in less than 5000 lines of C++ code
Use library • Constrained Delaunay Triangulations
‗ Jonathan Shewchuk's Triangle package
• Rendering ‗ POV-Ray 3.5
‗ supports a large shading language in addition to a nice photon map implementation
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 53 KUCG |
7.2. Simulation Parameters
• The simulation ran successfully at the resolutions up to and including 2048 x 2048
• The time step was fixed to 0.0002 at all times
At larger steps, the numerical noise in the simulation quickly compounded
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 54 KUCG |
7.3. Results
• All simulations took place on a 512 x 512 grid
Exceptions of Fig. 14, which was 512 x 800
• Practically interactive rates
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 55 KUCG |
7.4. Discussions and Limitations
• Validating the results of our simulation is very challenging
simulation is very sensitive to noise
Very specialized equipment is necessary
• Physical validity of the phase field methods
Proven repeatedly by researchers in the computational physics and crystal growth communities
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 56 KUCG |
7.4. Discussions and Limitations
• Our technique and Diffusion Limited Aggregation
Deal with the same basic problem of solidification
our method can produce the same structures as DLA
DLA also does not provide any clear way to introduce a user parameterization
• Lost internal detail
Physically plausible, not physically
Necessary to validate and refine this process
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 57 KUCG |
8. Summary and Future Work
• Presented a simulation technique from computational physics for the growth ice crystals
• Introduced optimizations to make the technique practical and interactive for computer graphics
• Introduced a novel geometric sharpening operation
• User control
• Ice growth has not been studied much in computer graphics
Korea University Computer Graphics Lab.
Jae ho Lim | 2012/3/28 | # 58 KUCG |
8. Summary and Future Work
• Phase field method can be applied to fully 3D ice growth
phenomena as icicles
• Investigate other optimization techniques
parallel computation on a cluster of PCs