Lquid Splash Modeling with Neural...

38
Lquid Splash Modeling with Neural Networks Copyright of figures and other materials in the paper belongs to original authors. Presented by MyungJin Choi 2020-09-01 Computer Graphics @ Korea University Um(Munich Univ.) et al. SCA 2018

Transcript of Lquid Splash Modeling with Neural...

Page 1: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

Lquid Splash Modeling with Neural Networks

Copyright of figures and other materials in the paper belongs to original authors.

Presented by MyungJin Choi

2020-09-01

Computer Graphics @ Korea University

Um(Munich Univ.) et al.SCA 2018

Page 2: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 2Computer Graphics @ Korea University

1-1. Introduction

• It is difficult to capture such splashes due to their complex small scale surface geometry and dynamics.

• A typical remedy for splashes simulations is to use additional representations

▪ Physically or heuristically

▪ Which in turn leads to high computational cost

Page 3: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 3Computer Graphics @ Korea University

1-1. Introduction (Cont`)

• This paper proposes a new data-driven splash generation approach

▪ By learning the formation of small-scale splashes from physically accurate simulations

▪ Our model effectively approximates the sub-grid scale effects that lead to droplet generations

• This enables us to generate realistic splashes in coarse simulations

▪ Without the need for manually tweaking parameters or increased computational costs induced by high resolution simulations

Page 4: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 4Computer Graphics @ Korea University

• We realize our model using machine learning techniques with neural networks (NNs) and integrate the model into the fluid-implicit-particle (FLIP) algorithm

1-2. Contributions

Page 5: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 5Computer Graphics @ Korea University

• Regression is a set of statistical processes for estimating the relationships among variables

2-1. Related Work (Machine Learning)

Regression?

Page 6: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 6Computer Graphics @ Korea University

2-1. Related Work (Machine Learning)

Least Square?

Page 7: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 7Computer Graphics @ Korea University

2-1. Related Work (Machine Learning)

Learning in regression?

Some Processes for Minimizing Errorby Adjusting Weights

Page 8: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 8Computer Graphics @ Korea University

2-1. Related Work (Machine Learning)

Various models for regression

𝒚 = 𝒂𝒙 + 𝒃 𝒚 = 𝒂𝒙 + 𝒃 𝒚 = 𝒂𝒙𝒏 + 𝒃𝒙𝒏−𝟏 +⋯

Page 9: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 9Computer Graphics @ Korea University

2-2. Related Work

Small Scale Details in Water Simulations(1/5)

Two-way Coupled SPH and Particle Level Set Fluid Simulation[Lossasso, F. (Stanford Univ.) et al. / TVCG 2008]

Page 10: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 10Computer Graphics @ Korea University

2-2. Related Work

Small Scale Details in Water Simulations(2/5)

Two-Scale Particle Simulation[Solenthaler, B. (ETH Zurich) et al. / SIGGRAPH 2011]

Page 11: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 11Computer Graphics @ Korea University

2-2. Related Work

Small Scale Details in Water Simulations(3/5)

Unified Spray, Foam and Bubbles for particle-Based Fluids[Ihmsen, M. (Freiburg Univ.) et al. / CGI 2012]

Page 12: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 12Computer Graphics @ Korea University

2-2. Related Work

Small Scale Details in Water Simulations(4/5)

Hybrid Particle‐grid Modeling

for Multi‐scale Droplet/Spray Simulation[Yang, L. (Beihang Univ.) et al. / CGF 2014]

Page 13: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 13Computer Graphics @ Korea University

2-2. Related Work

Small Scale Details in Water Simulations(5/5)

A Novel Integrated Analysis-and-Simulation Approach for Detail Enhancement in FLIP Fluid Interaction [Yang, L. (Beihang Univ.) et al. / VRST 2015]

Page 14: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 14Computer Graphics @ Korea University

• Our definition of a splash is a small disconnected region of liquid material that is not globally coupled with the main liquid volume

• Our approach consists of two components

▪ a detachment classification

• The classifier predicts whether a certain volume of liquid forms a detached droplet within a chosen duration ∆t

▪ a velocity modification

• The modifier predicts its future velocity based on a probability distribution for velocity modifications

3. Data-Driven Splash Modeling

Page 15: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 15Computer Graphics @ Korea University

• 𝐱 ∈ ℝ𝑀 is a feature descriptor that encapsulates enough information of the flow

▪ Such that a machine learning model can infer whether the region in question will turn into a splash

▪ The 𝑀 individual components of 𝐱 consist of flow motion and geometry in the vicinity of 𝐩

▪ We use 33 samples of the velocity and level set

• For this binary decision “splash or non-splash”, we will use an indicator value 𝑙 ∈ {1,0} in the following.

▪ Each descriptor is typically generated for a position 𝐩.

3-1. Neural Network Model

Feature Vector(Training Data)

Page 16: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 16Computer Graphics @ Korea University

• We train our models with a given data set that consists of feature vectors 𝐗 = 𝐱1, 𝐱2,···, 𝐱N and 𝐋 = 𝑙1, 𝑙2,···, 𝑙N▪ they are generated during a preprocessing phase at locations

{𝐩1, 𝐩2,···, 𝐩𝑁}

3-1. Neural Network Model

Feature Vector(Training Data) (cont`)

Page 17: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 17Computer Graphics @ Korea University

• We use the well-established softmax for the loss of our classification networks

3-1. Neural Network Model

Training Classifier

Page 18: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 18Computer Graphics @ Korea University

• Let ∆𝐯 be an instance of a velocity change for a splash

• Our goal is to infer the set of velocity modifications ∆𝐕 ={∆𝐯1, ∆𝐯2,···, ∆𝐯𝑁} based on the corresponding set of feature vectors 𝐗

• We found that it is reasonable to assume that the velocity modifications follow a normal distribution relative to the mean flow direction

3-1. Neural Network Model

Training Velocity Modifier

Probability Normal Distribution Fuction

Page 19: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 19Computer Graphics @ Korea University

• The negative log likelihood function 𝐿𝑚 (also known as loss function) for the given data is defined as follows:

• In our approach, the mean and variance functions are represented by NNs and approximated by estimating the two sets of weights such that they minimize the loss function 𝐿𝑚 for the given data {𝐗, ∆𝐕}.

3-1. Neural Network Model

Training Velocity Modifier (cont`)

Page 20: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 20Computer Graphics @ Korea University

• 1. After the pressure projection step, we run classification on all particles

• 2. We evaluate our velocity modification network to compute componentwise mean and variance

• 3. we generate random numbers from correspondingly parametrized normal distributions to update the velocity of the new splash particle

▪ All splashes are treated as ballistic particles and do not participate in the FLIP simulation until they impact the main volume again

3-2. FLIP Intergration

Page 21: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 21Computer Graphics @ Korea University

• As we use smaller time-step size so evaluate more frequently, we will get more splashes

• To avoid this, we evaluate our inference using a stochastic process, scaling the expectation by time to match the desired duration

▪ ∆𝑡 (𝑖. 𝑒. , σ𝑘 ∆𝑡𝑘 = ∆𝑡)

• we compute particle 𝑖’s expectation 𝐸𝑖 using two finite outcomes 1 (splash) and -1 (non-splash) with probabilities ys that are evaluated from our trained model:

3-2. FLIP Integration

Splah Classification

Page 22: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 22Computer Graphics @ Korea University

• If the expectations of particles are positive during ∆𝑡, we treat them as splashes and thus evaluate our velocity modification

3-2. FLIP Integration

Velocity Modification

Page 23: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 23Computer Graphics @ Korea University

• We noticed a small chance of misclassification

• To minimize the influence of such misclassifications, we implemented a look-ahead step that reverts the classification of individual splashes

▪ 1. We separately integrate positions of the new splash particles for a time interval of ∆t with their updated velocities

▪ 2. If a new splash particle ends up inside of the bulk liquid or an obstacle, we revert its classification and modification

3-2. FLIP Integration

Look-ahead Correction

Page 24: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 24Computer Graphics @ Korea University

• We generate the training data from a series of simulations with randomized initial conditions designed to incite droplet formation

• We test our model with two physical parametrizations where the surface tension is dominant, and thus many droplets are generated

3-3. Training Data

Page 25: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 25Computer Graphics @ Korea University

• We define a feature descriptor 𝐱𝑖 using 33 samples of the velocity and level set values interpolated

▪ The feature vector consists of 108 components

• Containing 33 × 3 velocity values and 33 × 1 level set values.

• In order to extract the splash indicator value 𝑙, we analyze the particle’s spatial motion for a chosen duration ∆𝑡

▪ If a disconnected component consists of less than 8 cells, the volume is marked as droplet volume

3-3. Training Data

Extracting Feature Vectors

Page 26: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 26Computer Graphics @ Korea University

• We evaluate this prediction after updating the velocity of particle from the divergence-free velocity at the target resolution

• Thus, the new velocity 𝐯𝑚𝑡+∆𝑡 for a splash particle is defined as

𝐯𝑚𝑡+∆𝑡 = 𝐯𝑡+∆𝑡 + ∆𝐯, and we compute the velocity modification ∆v

for training:

• For training, we used 1.3M samples of the 5mm scale and 441K samples of the 1.5mm scale

3-3. Training Data

Extracting Feature Vectors (cont`)

Page 27: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 27Computer Graphics @ Korea University

• We randomly split the training samples into 75% for the training set and 25% for the test set

▪ The TensorFlow framework

▪ ADAM optimizer

▪ the learning rate: 10−4

3-4. Training Networks

Page 28: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 28Computer Graphics @ Korea University

4. Model Evaluation

Page 29: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 29Computer Graphics @ Korea University

4-1. Physical Evaluation

Page 30: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 30Computer Graphics @ Korea University

4-2. Secondary Partcle Approach

• When our model classifies simulation particles as splashes

▪ 1. we seed secondary particles at the same positions as the simulation particles

▪ 2. copy their velocities to the newly generated secondary particles

▪ 3. After that, the velocity modification is applied using random numbers

Page 31: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 31Computer Graphics @ Korea University

4-2. Secondary Partcle Approach

Controlling Droplet Generation

• Also, we can readily adopt the output classification values in order to control the number of droplet generation

▪ we define a threshold (∈ [0,1])

Threshold: 0.2

Threshold: 0.8

Page 32: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 32Computer Graphics @ Korea University

4-2. Secondary Partcle Approach

Making the model robust to a wide range of scales

• Because of its data-driven nature, the reliable coverage of the model is often limited to the scale that the training data represent

• Rather than training the model for a certain scale, we extend the model’s coverage to a wider range using heterogeneous training data.

• To this end, we first generated the data in three scales

▪ 2.5mm, 5mm, and 1cm in grid spacing

• Then, we used the grid spacing value of the target resolution as an input feature such that the model can correctly infer the right output values

Page 33: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 33Computer Graphics @ Korea University

4-2. Secondary Partcle Approach

Making the model robust to a wide range of scales

Page 34: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 34Computer Graphics @ Korea University

4-2. Secondary Partcle Approach

Convergence

• The results of our model stabilize for more than ca. 40K training samples.

Page 35: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 35Computer Graphics @ Korea University

5. Three-dimensional Results

Page 36: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 36Computer Graphics @ Korea University

5. Three-dimensional Results (cont`)

Page 37: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 37Computer Graphics @ Korea University

• Our model aims for an automated data-driven algorithm that does not require any tuning but instead learns a probabilistic model from reference data

• Our model directly works with the regular representation of the fluid and does not require additional helper data structures

• Limitations

▪ Because our model uses the simulation particles to represent droplets, the details of generated splashes depend on the particle resolution of the underlying FLIP simulation

▪ Although the splashes incited by our model transfer momentum when they merge with the liquid volume, our model currently does not compute interactions among droplets

6. Discussion and Limitations

Page 38: Lquid Splash Modeling with Neural Networkskucg.korea.ac.kr/new/seminar/2020/ppt/ppt-2020-08-04.pdf · 2020. 9. 1. · 1-1. Introduction (Cont`) • This paper proposes a new data-driven

MyungJin Choi | 2020-09-01| # 38Computer Graphics @ Korea University

• This paper introduced a new data-driven splash generation model that utilizes machine learning techniques with NNs

• We demonstrated that our models successfully learn the formation of splashes at different physical scales

• Moreover, we demonstrated an extension of our model for secondary particles

• Overall, our experiments highlight that our approach provides a very good basis for learning a wide range of realistic physical effects.

7. Conclusions