Dispel Posted May 9, 2013 Share Posted May 9, 2013 (edited) Whether using FLIP or SPH, I seem to get something like the movie I have linked. The issue would appear to be that the collider is moving too fast. To get the fluid to even stay in the cup collision-wise I have to turn substeps on my DOP network up to 50-100 for FLIP fluid, and similarly high for SPH. It would seem like the collider object is imparting far too much force on the fluid at the moment it begins moving. (10-20 frames of settling in the cup, and then it begins moving, which blasts the water out of it) How can I tame this? The cup should remain with fairly level water surface at all times. Whether with FLIP or SPH. (My collider has been made very thick by means of a proxy collider geo, by the way, this method is necessitated even so) It would seem like my simulation is behaving physically faster than the water that is responding to it. Not sure how to fix this. The expected settings with the solver in terms of timescale, mass scale, solver scale, and so on don't seem to help whether I raise or lower them. I feel like I've tried everything thus far. Let me know what you would do. Edited December 1, 2013 by Dispel Quote Link to comment Share on other sites More sharing options...
TheAdmira1 Posted May 9, 2013 Share Posted May 9, 2013 have you tried feedback scale? not sure if this will help what so ever as I cannot see your attachments at work, but feedback scale might help. Quote Link to comment Share on other sites More sharing options...
ikarus Posted May 10, 2013 Share Posted May 10, 2013 If the water isnt supposed to leave the cup you could essentially zero out the simulation and apply forces equal to the movement (in the inverse direction) of the cup. This you could scale however you want and then just parent the particles to the cup post-sim. Quote Link to comment Share on other sites More sharing options...
Dispel Posted May 10, 2013 Author Share Posted May 10, 2013 I will upload a file in the morning (there is some cached geo and non-relative paths I need to fix before I upload) after I run a test with feedback scale on. Though my impression is that feedback scale is mostly relevant when you have solvers sharing forces back and forth again? I figured since my cup is static geo that it doesn't need any forces applied to it from the fluid and therefore feedback was irrelevant. Thank you for the ideas. Not too sure how to go about ikarus suggestion though. While it won't leave the cup, it should still dance around given the cups tilt and so forth. Quote Link to comment Share on other sites More sharing options...
Solitude Posted May 10, 2013 Share Posted May 10, 2013 Yeah, feedback scale is only for rbd interaction -- where the rbds will get forces from the flip. The cup looks like it's moving extremely fast to me (like a foot in less than a second). If you grab a glass of water and move it that fast I'm willing to bet you'll get some water flying out of it. You will definitely need to counteract the motion like what ikarus said, or by finding a way to slow everything down and retime it. You probably don't want to counteract forces 100%, because then in theory you'd be stuck with nothing moving, but you can certainly apply forces at 80% and still get some motion. Maybe you could try using a rest position... settle the particles, cache it out, link that to the glass, have the particles in a sim try and match the position of the rest particles... Quote Link to comment Share on other sites More sharing options...
Dispel Posted May 10, 2013 Author Share Posted May 10, 2013 Is it possible that my scale is just off? I have tried adjusting the solver scale factor as well as actual scene scale, but it seems to just be the same story at all levels. While yes, the cup is moving fairly fast, when I watch the animation of the cup alone with the characters, it seems not too bad. Strange difference in perception. I don't mind having my substeps higher than they would normally be if I can just get the collisions/momentum happening right Quote Link to comment Share on other sites More sharing options...
Dispel Posted May 10, 2013 Author Share Posted May 10, 2013 Okay, here is my hip file and geocache. Please take a look at and let me know what I'm doing wrong It is fairly simple, made mostly from shelf tools. (Ignore the vectorfield stuff in DOPs, that was me trying to take my velocity field and use it to hold back my particles, it worked a little bit but behaved fairly erratically and nonphysically) flipcup.rar Quote Link to comment Share on other sites More sharing options...
Dispel Posted May 10, 2013 Author Share Posted May 10, 2013 I am going to try retiming approaches shortly, because I figure that will have the best effect on my collisions and being able to keep substeps down. But open to other ideas and curious how others would approach. Quote Link to comment Share on other sites More sharing options...
Dispel Posted May 10, 2013 Author Share Posted May 10, 2013 I am having some success with retiming.. at least initially. I have slowed things down by 10x. The only issue is that with the usual 1-2 substeps in FLIP, I'm getting particles going through the collision volume, and then sticking inside it, which is odd because nothing in my sim is telling particles to stick. I can't figure out how to make my collisions work better without substepping the hell out of it. (and I'm effectively already substepping at 10-20, because of the retiming) What is the functional difference between me retiming my collider at 10x and running my sim 10 times longer, versus simply telling it to do 10 substeps in the first place? I guess the implication would be that I am working at a timescale of 10x also, but I had tried changing that setting to detrimental effect in all circumstances. Quote Link to comment Share on other sites More sharing options...
Dispel Posted May 11, 2013 Author Share Posted May 11, 2013 I feel as though I am pretty close to something working, but my fluid is losing volume in the cup fairly quickly (though particle count is still the same), and using reseeding is overkill and leads to too much fluid being created. I can't seem to strike the right balance with it.. Not sure why it's losing volume in the first place. It seems to lose less when I have "dynamically resize fields" off, but calculates much much slower. Quote Link to comment Share on other sites More sharing options...
Dispel Posted May 12, 2013 Author Share Posted May 12, 2013 So I recreated my scene in CM scale and now it is behaving much better, at a retime value of 10x. However, the water is acting too fast of course to be retimed back to 1x, and messing with timescales is giving me unstable results. So I'm still a bit stuck..... Quote Link to comment Share on other sites More sharing options...
bloomendale Posted May 12, 2013 Share Posted May 12, 2013 Don't think you need excessive timestepping. You can: 1) "Suppress" translation part of the cup - scale down these channels and simulate flip as if cup is barely moving, then link cached liquid to cup with initial movement. 2) add some sort of drag field inside cup (higher - stronger) to calm down liquid when it start to leave the cup 3) sim liquid in local, liquid space where cup is not moving and use reference frame force to apply forces from the cup movement. this way you can control how much force you need. After sim, fetch position data of the cup and apply to cached liquid. Quote Link to comment Share on other sites More sharing options...
Dispel Posted May 13, 2013 Author Share Posted May 13, 2013 (edited) I am most interested in your method #3 but I can't say I understand how to set it up.. I understand how to just have my liquid be simmed in local space, with a static cup, but I don't understand how to get / apply forces from the cup movement.. Could you (or anyone) help me understand how that would work? I know how to compute velocity, and I did set something up where I was taking velocities from a cup and applying them as forces, but I don't think I was doing it right because it just made things so much worse Even a simple demo hip file would get me started. Edit: didn't realize reference frame force was the name of a DOP node I will read the docs... Edited May 13, 2013 by Dispel Quote Link to comment Share on other sites More sharing options...
Dispel Posted May 13, 2013 Author Share Posted May 13, 2013 Struggling to get a reference frame force DOP node to function the way I would like it.. I am trying to take the position of my static cup at the current frame (or timestep I guess) and use the difference in positions to drive the reference frame force. But in looking at the few examples i can find using a ref force and the docs, I can't seem to get it to work like I would expect (or even any effect whatsoever). Could someone point me in the right direciton? Trying to make sense of it all. flipcup2.rar Quote Link to comment Share on other sites More sharing options...
Dispel Posted May 15, 2013 Author Share Posted May 15, 2013 Using normal methods, my fluid sim is behaving not-too-badly with extremely high substeps and particle counts, but I still can't figure out the reference force, for educational reasons at this point. Instead, my primary leftover problem is that I can't seem to keep my fluid from compressing.. As a cup moves up, the fluid compresses and then never uncompresses (even with reseeding on) It starts out at a 90% full cup, and by the time the sim is over, it's down to 10-20%.. Really frustrating to play whack a mole with settings trying to discover what is causing it. Quote Link to comment Share on other sites More sharing options...
ikarus Posted May 15, 2013 Share Posted May 15, 2013 (edited) FLIP isnt very good at handling fast moving collision objects. You lose/gain volume from the error of collision detection and correction within the solve. Also: Turn off reseeding, this allows for more of the volume error to find its way into your sim. Here's a sample way to apply positional impulse forces. If you need rotation it's simply a matter of rotating your gravity vector according to your collision objects orientation. parenting_flip.hip This isn't very accurate but will get decent looking results. I couldn't get reference frame force to work either Edited May 15, 2013 by ikarus Quote Link to comment Share on other sites More sharing options...
Dispel Posted May 15, 2013 Author Share Posted May 15, 2013 Thanks for the file I'll take a look tomorrow. About the collapsing, are you saying that the only way to improve this is to increase the resolution of the sim? (Perhaps by using the separate collision grid at a finer resolution) Quote Link to comment Share on other sites More sharing options...
Dispel Posted May 15, 2013 Author Share Posted May 15, 2013 Looking at your file, I immediately realized how to take one of my earlier non-working ideas to modify to be tried again. I had a fieldforce being driven by a sop vector field which was my collision objects velocity at all points imparted to a volume. I had hoped that would be able to guide the fluid along in the container, but I also wanted to try reversing it, so that large velocities up for the cup also impart some additional force down to keep the fluid under control and in the container. All I had to do was put a "-1" in my scale force to go the opposite direction, when I couldn't find a good way to invert it. I really just need a way to reduce that collision error, as it's the only thing stopping my sim from being better. Unfortunately, even at high substeps I'm seeing it. Quote Link to comment Share on other sites More sharing options...
Dispel Posted May 16, 2013 Author Share Posted May 16, 2013 Increasing substepping, nor increasing grid resolution, nor specifying a higher res collider grid, nor messing with collider attributes appears to help this problem of collision error, that I can find. Running out of ideas. Quote Link to comment Share on other sites More sharing options...
Dispel Posted May 20, 2013 Author Share Posted May 20, 2013 I got a lot of the fluid compression under control, mostly by having to substep a lot. I am curious to see what an SPH version of my sim would look like, but every time I try to set one up, I just get a random explosion of particles. I am also trying to add a very subtle amount of viscosity to my fluid, which works well right until my fluid heads downward, and then I get a weird floating particle effect. The docs mention that unresolved slightly viscous fluids will sometimes cause this, but also that no particles should be unresolved if you follow a sqrt(3) law with your particle radius / grid scale, which I am following, so I don't really understand why I'd still get that kind of error. I'll repost my scene tonight. Maybe someone could help me get started on an SPH version that doesn't explode instantly (Or help me figure out why it is) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.