Page 1 of 1
FluidVolume surface triangles. Are they always coplanar?
Posted: Fri Sep 30, 2011 12:23 pm
by Spankenstein
When using a FluidVolume to represent some fluid in a container there seems to be no change to the SurfaceTriangle vertices when objects are thrown in the water.
Is this something that you have considered adding to BEPU at some point?
No response occurs if I were to grab an object containing a FluidVolume and shake it but I guess that this would require simulating fluid mechanics?
Re: FluidVolume surface triangles. Are they always coplanar
Posted: Fri Sep 30, 2011 5:22 pm
by Fe_Yoshi
Try shaking it more.
Re: FluidVolume surface triangles. Are they always coplanar
Posted: Fri Sep 30, 2011 7:03 pm
by Norbo
When using a FluidVolume to represent some fluid in a container there seems to be no change to the SurfaceTriangle vertices when objects are thrown in the water.
Is this something that you have considered adding to BEPU at some point?
Yes, but it's not very high priority. The fluid volume was just designed for relatively efficient buoyancy effects. Fortunately, adding a dynamic surface is not very difficult either. When the fluid volume was mostly rewritten for v0.15.0, the buoyancy calculations were redesigned to factor in water columns. The remaining work would be to compute volume transfer around a 2d grid. A mesh could be built from the grid to simulate the waves. It would be slower than the regular old FluidVolume, but you could still have fairly big simulations on the CPU on a game's budget.
No response occurs if I were to grab an object containing a FluidVolume and shake it but I guess that this would require simulating fluid mechanics?
That would indeed require a much heavier simulation like SPH. While I've fiddled with interactive CPU particles and some related fluid simulation, it's hard to justify their existence when the GPU does it so much better. A CPU-side SPH simulation might simulate a reasonably large puddle (around 10,000-30,000 particles, give or take) on a modern computer given the whole frame time of a game. In the same time, a modern GPU could simulate more like a million particles.
I am not sure when or if I'll get around to actually releasing such a feature; I try to balance features with how useful they end up being. Game-usable fracture simulation and other things are more valuable at this point.
Re: FluidVolume surface triangles. Are they always coplanar
Posted: Fri Sep 30, 2011 8:23 pm
by Spankenstein
I am not sure when or if I'll get around to actually releasing such a feature; I try to balance features with how useful they end up being. Game-usable fracture simulation and other things are more valuable at this point.
That's cool. I'll focus my attention elsewhere when using the engine.
