Momentum Transfer & Dripping

Here’s the experiments on momentum transfer and dripping

Moving a hair from left to right with different momentum transfer on hair

 

A free fall of liquid with different momentum transfer on hair

 


Here’s the dripping experiment

 

and pouring water onto dry hairs

Results Collection

I’ll put our main results here. This post will be kept updated.

Rubber band dipping/pulling

256 strands

4096 strands

 

Car wash

16,384 strands

 

Hair Flip

1024 strands w. sub-stepping

1024 strands w. CCD

4096 strands w. sub-stepping

Latest Todo list

Here is an updated TODO list of the tasks currently on our radar, feel free to comment, prioritize, or add things.

Raymond:

  • Compile code on CG cluster (stokes & others)
  • Compare 4 vs 8 vs 16 vs 32 vs 64 cores on a scene
  • Re-enable the Level Set Force
  • Look into Newton-Raphson solver
  • Look at faster fluids solver Christopher mentioned

Henrique:

  • Unit test the Discrete Elastic Rod code
  • merge codes together
  • Update Elastic Rods code for new Compliant Solver
  • CCD in newest code

Christopher / Changxi / Eitan :

  • Read the latest version of the paper
  • Contribute to Abstract, Related Work, verify contributions

Other:

  • profile/optimize the latest version of the code
  • Rendering / Houdini
  • Set up scenes we want for the paper

Linear Compliant Solver with Velocity Constraint

Here we briefly introduce the linear compliant solver with velocity constraint.

All the energies of constraint on positions may have the form

E=\frac{1}{2}\phi^T\alpha\phi for the goal where \phi(q)=0.

All the energies of constraint on velocities may have the form

E_v=\frac{1}{2}\dot{\phi}^T\beta\dot{\phi} for the goal where $latex \dot{\phi}(q,\dot{q})=0$.

We define J=\frac{d\phi}{dq}, J_v=\frac{\partial\dot{\phi}}{\partial\dot{q}}, and J_{xv}=\frac{\partial\dot{\phi}}{\partial q}.

By the KKT condition we have

CodeCogsEqn-10.png

where

CodeCogsEqn-11.png

is the geometric stiffness matrix with velocity change considered, and \lambda is the Lagrange multiplier where lambda=h^{-1}\mu=-K\phi and lambda_v=h^{-1}\dot{\mu}=-K_v\phi, where \text{diag}K=\alpha and \text{diag}K_v=\beta.

By Schur complement the equations above can be re-formulated into an equation where the LHS is SPD, thus with even large system it’s possible to be solved with CG in parallel.

This is the extension to [Tournier et al. 2015] with velocity constraints added, where stiff drag forces may be also integrated implicitly.

IMG_5025.JPG

 

Ref.

Tournier, Maxime, et al. “Stable constrained dynamics.” ACM Transactions on Graphics (TOG) 34.4 (2015): 132.

Quadrature + Inter-hair Flow

Here we show the results for our linear-variant quadrature and the inter-hair flow.

(theories come later)

2 Hairs scripted splitting after sticking

https://www.dropbox.com/s/f9823owiubuqnii/splitting2.mp4?dl=0

 

Inter-hair flow with hair fixed

2 hairs

https://www.dropbox.com/s/m2eevbmgsxrdgbl/liquid_share_basic.mp4?dl=0

7 hairs

https://www.dropbox.com/s/vmwxy47lkpvos4l/liquid_share_7.mp4?dl=0

 

Inter-hair flow with hair freely move

2 hairs

https://www.dropbox.com/s/7ioru00v3yuvc4s/liquid_share_basic_free.mp4?dl=0

7 hairs

https://www.dropbox.com/s/m2eevbmgsxrdgbl/liquid_share_basic.mp4?dl=0

 

Combined simple example

https://www.dropbox.com/s/o27zjxxlybamlkz/circle_new.mp4?dl=0

Adhesion-Collisions

Raymond and I have recently made progress on the items for this week.

Raymond has coded up a mix of linear quadrature, with added samples, in order to smooth out the separation of strands. I’ll let him speak to that since he is more familiar with it.

Given our discussions last time, we have a new Adhesion-Collision model, with a modified profile on the Cohesion Table we use for lookups. Here are some views of the updates profiles:

adhesion-collisionheight-fieldisometriccohesion

We have modified the old table into essentially three regions, best seen from the Adhesion-Collision profile, the first picture above.

Region 1, from d = 0 to dmin (where dmin is the combined radii of two particles), denotes the penetration region. This accounts for everything from overlapping exactly all the way to just barely touching. This region is negative, linearly scaled, so that the two particles will push away from one another. Notably however, past the point of overlapping, when things begin tunneling, there is no special treatment, and particles would begin to push in the wrong direction. Ideally, there is never enough collision-contact drift to allow for that.

Region 2, from dmin to some threshold above dmin (for now 1/4 dmin), is the region when two particles are very close to one another. Normally adhesion would say to keep pulling together closer and closer, but instead now we scale this somehow (for now linearly), between the end of region 1 (contact or dmin) and the beginning of region 3, not worrying about tangent continuity.

Region 3, above the modified range or threshold near dmin, is where the plot remains exactly as it was before, in accordance with the principled profile Raymond derived for the Adhesion force. In order to determine the values for region 2, we look at the bounds of region 1 and region 3, and linearly scale between them.

Therefore there this model presents a few tunable parameters, those being:

  • The scale constant, or form, at which region 1 changes
  • The scale or profile for region 2
  • The threshold or distance at which we transition from region 3 to region 2.

Implementing this new profile, we witness the following comparison videos:

OldTable

NewTable

NewTableCircleExample

From these videos we can see that the result is somewhat the same, but there is no need to do Collision response with the new Cohesion table.

Qualitative comparisons of different approaches below:

Original Original w/ No Collisions
(Collisions ON, Old Cohesion Table)

Slow

-converges

-slight separation throughout

(Collisions OFF, Old Cohesion Table)

-fast

overlaps

New New Deluxe
(Collisions OFF, New Cohesion Table)

-fast

-no overlaps

-very close proximity, touching

 

 

(Collisions ON, New Cohesion Table)

-may still want collisions elsewhere

        (think dry hairs in contact)

-relatively fast, (few collisions if any)

-no overlaps

-very similar to New way

 

Looking at the number of collisions created from simply changing this table, we get the following below (X is time, Y is #of Collisions) from the vertical tests in the videos:

test

 

We are also sub-stepping the hairs in order to prevent penetrations/collision. This helps disperse the dynamics and collision handling of adhesion over several substeps, and effectively lower the timestep of the scene.


The next order of business, as we see it, is as follows:

  1. Underwater filter on adhesion
    1. Should we remove collisions altogether from the pipeline, and replace them with our Adhesion-Collision spring model, then we will need a way to handle underwater collisions as well, since the adhesion model does not apply for fully saturated hairs (they do not come together, but move freely, but still cannot penetrate)
    2. Therefore we can simply continue to apply the non-penetration component of the Adhesion-Collision spring model, which acts as a spring/penalty force to push out collisions.
    3. We aim to do this by simply applying the adhesion model when the two particles are overlapping, and ignoring its contribution elsewhere while under water
  2. CCD (with thickness) replacing our instantaneous check
    1. If we want to take large timesteps, or avoid sub-stepping, or in general be safer about collisions, we will need to switch our detection routine from instantaneous to continuos.
    2. Additionally, since the adhesion forces begin to act when inside a neighborhood/threshold of the strands, we need a CCD routine with thickness involved.
    3. In the future we can add additional spring forces to preserve volume based on these CCD tests if necessary, but for now we are assuming all collisions will be treated by the Adhesion-Collision force
  3. Water sharing between neighboring strands
    1. Nearby strands with overlapping water regions should share water freely between themselves, so that way they may come apart with some averaged share of the original sum of water
    2. There are gravitational, frictional, and fluid-mechanical considerations which influence the behavior of sharing water, each of which Raymond is tackling individually to test
    3. In the future, we may want to combine all of these considerations into one, so there will be no special case code

These are the items we are aware of, and actively working on, but any input or alternative directions will be graciously appreciated.

Recent Progress

In this post we discuss the problems recently found and solved (or unsolved).

  1. The preservation of volume for shallow water equation. Previously the water may disappear on hairs.
    (Solution: see memo
    https://www.dropbox.com/s/o4zzfqfegchfrf4/memo_swe.pdf?dl=0
    for details)
    https://www.dropbox.com/s/243jj2ktqbos5q9/circle.mp4?dl=0
  2. The cohesion force makes the hairs coupled together, which cannot be integrated separately, and the nonlinearity makes the integrator iterates a lot. Trivially decoupling would result in trembling artifact.
    Solution: we proposed a local-global solver. At first we integrate the hairs in parallel, using the linearized version of cohesion force (a.k.a. \frac{\partial E}{\partial x}(x)=\frac{\partial E}{\partial x}(x_0)+(x-x_0)\frac{\partial^2 E}{\partial x^2}(x_0)). After finished we use the result from the parallel solver as the initial value of a global implicit integrator which uses the nonlinear pair-wise cohesion force.
    Result: the number of iterations/cost of time in total is generally the same as using a local solver only, but we have the nonlinear cohesion force applied.
    https://www.dropbox.com/s/ylw8dr3oayj2u50/frame00001_1.mp4?dl=0
  3. Effect of buoyancy.
    Discussion: Previously only drag force is applied on the hairs. Nevertheless the drag force only models the viscous friction between water and hairs. Notice any object submerged in liquid would suffer from the pressures around, this should also been taken considered for hairs.
    Solution: we decompose the velocity change after pressure solve into the difference along and perpendicular to hairs. We add the difference along hairs to the shallow water velocity, and add the one perpendicular to hairs as impulse on hairs before the going into next time step.https://www.dropbox.com/s/vi8mblex6zjuj6v/21hairs.mp4?dl=0

Remaining Problem

  1. The cohesion force currently is applied to hair particles. However in reality the cohesion force is not a stair function. Only choosing applying or not will result in the popping artifact.
  2. Collisions between hairs. The quadratic programming may not converge due to the singularity of the constraints. This is a known problem.