Tuesday, July 31, 2012

Preliminary result about Ghost SPH

I started re-writing my SPH simulator a few days ago, and the desired new feature is ghost SPH based on Hagit and Bridson's new paper: Ghost SPH for Animating Water
http://www.cs.ubc.ca/~rbridson/docs/schechter-siggraph2012-ghostsph.pdf

A main problem about SPH lies in the density gathering.

In real world, water is almost incompressible, which means at each sample point in the water, the density should be almost the same. However, in simulation, density for each particle may vary within a wide range. This would lead to conspicuous artifacts like y-stacking.

Though generally speaking the result still looks like water, the details could not satisfy me when I pay close attention to the details. After all it's the details that matters in getting distinguished.

To eliminate the problem, there're two important things to do: correct the density gathering and re-model the pressure calculation.

1. correct density gathering. This is the core idea of the ghost sph paper. By using another layer of ghost particles, we could eliminate the density deficiency for particles near the surface. Also the paper discussed about how to initialize the particles, which is rarely seen in other SPH paper and is exactly what I need. The technique used for initialize SPH particles is Poisson Disk Sampling, which could arrange all the particles with blue noise. The sampling technique is based on Bridson's another paper: Fast Poisson Disk Sampling in Arbitrary Dimensions
http://www.cs.ubc.ca/~rbridson/docs/bridson-siggraph07-poissondisk.pdf

2. re-model the method to calculate the pressure. Using Tait equation based on the WCSPH paper (whose performance could be improved by implementing the PCISPH). The Tait equation generate a pressure proportional to (rhow/rhow0)^7, so a correct density gathering is a prerequisite, or the pressure force would be too powerful and lead the simulator to an unstable stage.

Now I've pretty much finished the sampling part. The particle sampling is consist of 4 parts: surface sample, surface relaxation, volume sample, volume relaxation.

Here're two images of the result of applying particle sample to a simple spherical level set grid.




2 comments:

  1. Finding SPH is a difficult procedure and its use is immense.
    Sampling Methods

    ReplyDelete
    Replies
    1. exactly. thx for the link, I'll take a look later

      Delete