fluid disappear from moving bottle - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Fluid (https://obi.virtualmethodstudio.com/forum/forum-3.html) +--- Thread: fluid disappear from moving bottle (/thread-2504.html) Pages:
1
2
|
fluid disappear from moving bottle - actsai - 21-09-2020 Hi, I'm trying to simulate the chemical experiment which required fluid pouring, mixing between bottles. I simply pour the fluid from a bottle to another, some fluid flies off, and if I move the bottle quickly, all the fluid goes out of the bottle and disappear. https://youtu.be/fP3F8r2qk9g How to keep the fluid stay inside the bottle if I did not pour it out? Please kindly help, thanks. Albert RE: fluid disappear from moving bottle - josemendez - 21-09-2020 (21-09-2020, 07:40 AM)actsai Wrote: Hi, Hi Albert, This is called tunneling and it affects all physics engines. See this video for more info: https://www.youtube.com/watch?v=ms0Z35GY6pk RE: fluid disappear from moving bottle - actsai - 22-09-2020 (21-09-2020, 07:43 AM)josemendez Wrote: Hi Albert, Hi, The attached script "ObiKinematicVelocities" and the parameter "Fixed Timestep" did help a little, but still the fluid fly off when moving the bottle. Really need some hint, please kindly help, PM the project link to you. In unity Game mode movement: WASD camera: mouse mode switch: T hold bottle: left click pour bottle: Q, E, A, or D Many many many thanks, Albert RE: fluid disappear from moving bottle - josemendez - 22-09-2020 (22-09-2020, 01:46 PM)actsai Wrote: Hi, Make sure you're not using a MeshCollider for the container, as MeshColliders are hollow (which means they're made of paper-thin triangles, and have no concept of inside/outside). If possible, use distance fields instead as they're much more robust. See: http://obi.virtualmethodstudio.com/tutorials/distancefields.html RE: fluid disappear from moving bottle - actsai - 23-09-2020 (22-09-2020, 01:58 PM)josemendez Wrote: Make sure you're not using a MeshCollider for the container, as MeshColliders are hollow (which means they're made of paper-thin triangles, and have no concept of inside/outside). Hi Josemendez, Thanks for the suggestions. The water is ratoting after cooperated with distance fields, please see https://youtu.be/6uOrPHEIHaE How do we keep the water steady? Thanks, Albert RE: fluid disappear from moving bottle - josemendez - 23-09-2020 (23-09-2020, 05:00 AM)actsai Wrote: Hi Josemendez, Hi Albert, Particles should not rotate or move, unless: - The container's scale is non-uniform. Distance fields only support uniform scaling, as described in the docs. - Collision constraint iteration count is very low. Also, a thickness of 0.1 in your collider might be a bit too much. If you need a thicker container to prevent tunneling, use a second, different mesh to derive the distance field from, instead of using the same mesh used for rendering. RE: fluid disappear from moving bottle - gontz - 28-09-2020 Hello, Is it possible to have an example in Obi with a fluid container that is never losing fluid, however you move it? Thank you RE: fluid disappear from moving bottle - josemendez - 28-09-2020 (28-09-2020, 03:06 PM)gontz Wrote: [...] however you move it? Not possible, not in Obi, not in any physics engine. There's always a movement speed beyond which tunneling will take place. It's built in the digital nature of computers and the way they represent time. Best you can do is try to prevent it in as many cases as possible, but it will never go away completely. Best practices to avoid tunneling: - Use the ObiKinematicVelocities component to help CCD. - Use distance fields or primitive colliders instead of MeshColliders, as they're more robust to tunneling. - The thicker your container's walls are, the better. - Limit user interaction speed below tunneling speed. - If all else fails, reduce your simulation timestep. Will make an example scene using these for you. RE: fluid disappear from moving bottle - josemendez - 29-09-2020 Hi there, I modified the ObiKinematicVelocities script to update rigidbody velocities always in sync with the particle solver. This allows robust CCD even at very high speeds. Replace your ObiKinematicVelocities.cs file with this one. Also make sure to give it a reference to the solver in your scene. let me know how it goes. RE: fluid disappear from moving bottle - gontz - 29-09-2020 Thank you Yes, it is very stable now. Quick question: how can I set the lifespan of the particles to infinite? |