Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  How to stack different colors but keep their volumes
#2
(30-04-2020, 09:26 AM)wm4583816 Wrote: Hello,

Forgive my English. I am using Obi Fluid for a game. However, I am stuck at 2 questions that I thought would be easy.

Q1
I am pouring two colors in a container one by one. Then I found when I stack the second color on the first one, the volume of the first one will be smaller. It seems the gaps in the particles are compressed. Could I just keep the volume of the first color? BTW, the liquid in our game should be very thick.

Q2
The borderline of the two colors is not very smooth(We want the borderline more clear, not diffused). We tried to make the particles smaller, it got better a little bit. But the FPS will be very low. Am I missing something obvious?

Many thanks,
Meng

Q1 -Fluid compressibility depends on what your simulation budget is. If you spend few iterations and have a large-ish timestep, fluid will be more compressible. In other engines, it would outright explode or become inestable. Obi degrades much more gracefully though, as it is unconditionally stable.

Try increasing the amount of density constraint iterations, and/or the amount of substeps. To see how iterations/substeps affect the simulation, see:
http://obi.virtualmethodstudio.com/tutor...gence.html

A trick that many games use to avoid having to crank up simulation quality, is to simply reduce gravity a bit. This reduces the fluid pressure, and allows density constraints to be more effective.

Q2 - More particles->less performance. If you want a clearer interface between the two fluids, you can try reducing "smoothing" in the fluid renderer.
Reply


Messages In This Thread
RE: How to stack different colors but keep their volumes - by josemendez - 30-04-2020, 09:38 AM