Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Lumpy Water
#6
Hi Patrick!

(10-02-2022, 12:50 AM)devPatrick Wrote: Thanks for the explanation.  That all makes sense.  I changed the max anisotropy to 1 as you suggested and I do see the issue.  Correct me if I'm wrong, but it seems like this wouldn't really have much to do with the number of particles or layers.  Rather this just seems like a normal, expected behavior when a fluid cannot support even distribution of the particles throughout its layers.  

It's normal behavior in the sense that it stems from discretization (the process of chopping up a continuous quantity/surface/volume into a finite number of individual pieces). This is necessary when doing anything in a computer, since computers are digital and cannot deal with continuous stuff. In the case, particles are to fluids what triangles are to meshes, or texels to textures. If you want a smoother fluid surface, just use more particles (and layers). If you want a smoother mesh, use more triangles, if you want a less pixelated texture, use more texels.

So in a sense, it does have to do with the number of particles/layers: the more particles you use (the higher your fluid resolution is) the less pronounced the effect will be.

(10-02-2022, 12:50 AM)devPatrick Wrote: So I'm my use case, as the fluid is compressed by reducing the size of the container, I'll inevitably reach a point where the current layers can no longer support the current number of particles in them.  Thus, some of the particles will be forced to the surface to create a new layer.  If the number of particles in this new layer are less than the number of particles in lower layers, that's when we'll have this appearance of an uneven, 'lumpy' surface.  

Yes, that's a good analysis of what happens. Keep in mind that the thing that makes fluid "fluid" is constant density. Ideally, the amount of mass per volume unit in a fluid shouldn't change. In Obi, all particles in a fluid have the same mass, so the amount of particles per volume unit should stay constant. This is what makes particles repel/attract each other: try and keep their neighborhood constant. When a layer of fluid has too many particles, any new particles added to it will instead "pop up" and begin forming a new layer on top. This is what causes the 'lumpy' look.

(10-02-2022, 12:50 AM)devPatrick Wrote: Moreover, the lower layers don't even have to be 'full', i.e. filled to capacity, stretching from one side of the container to the other.  Since the particles are spheres, you can actually have a situation where successively less complete layers are stacked on one another in a kind of mound or pyramid type of shape.  I'm guessing increasing the surface tension would largely eliminate this scenario, though leaving us with just one incomplete layer.  Excluding fluid 'beading' of course.

Large surface tension would help indeed, but it's not always desired. Al larger smoothing radius (which determines the size of the neighborhood considered by each particle when calculating local density) should help create a more even particle distribution too.

(10-02-2022, 12:50 AM)devPatrick Wrote: If my assessment is correct, then wouldn't the solutions generally be:
1) Keep the scale of the particles small enough so that you won't be able to notice the uneven surface
2) If you want to use larger particles, just be aware that this is the situation and try not to focus on it

100% spot on. The only real solution to this is to have more, smaller particles: that is, increase fluid resolution. Same as you would increase the amount of triangles in a mesh to make it less "blocky". If you can't afford to have such high resolution fluid, your only option is  to live with it.
Reply


Messages In This Thread
Lumpy Water - by devPatrick - 07-02-2022, 07:20 AM
RE: Lumpy Water - by josemendez - 07-02-2022, 09:03 AM
RE: Lumpy Water - by devPatrick - 07-02-2022, 09:36 AM
RE: Lumpy Water - by josemendez - 07-02-2022, 09:48 AM
RE: Lumpy Water - by devPatrick - 10-02-2022, 12:50 AM
RE: Lumpy Water - by josemendez - 10-02-2022, 08:47 AM