Right now, however, I have hit up against some problems. Although at least there are visible particle and they are moving, right now I am running into some weird errors, such as that the particles are flying off of the plane, so I have had to reign back on some of the effects such as viscosity, etc. until I can figure out was is going on. I also am currently using a simple arrayList (c++ std::vector) as the particle data structure, making the spring effects intractable in real time, so I am now trying to switch everything over to using the Heckbert spatial hashing grid data structure that I added to my framework.
Anyway, here is the video of the unstable particles. If you squint your eyes, I guess it sort of looks like a liquid...
Although I had hoped to start on the implicit representation soon, my current plan for next week (in addition to preparing for the alpha review) is as follows:
- Switch over to using a simple spatial hashing grid (or Heckbert's fast repulsion grid) instead of std::vector
- Get some sort of reasonable looking stable fluid with at least some of the effects I mentioned last week working.
- As the main idea is that the simulation be interactive liquid, get some sort of rough user interaction working (e.g. clicking and applies a force vector).
- More background reading on high surface tension
So are you currently doing linear search to accumulate forces from nearby particles?
ReplyDeleteYeah, so pretty much O(n^2) search time. It wasn't running at real time so I had to pull back most of the particle-particle interaction until I put in spatial hashing. Then if I set the grid size to be radius of interaction I'm interested in I think I'll only need to search neighboring cells.
ReplyDeleteWell, if you assume that you're viewing the simulation under a strobe light, then it sort of looks like a liquid!
ReplyDeleteNice icons in your gui!