Dispel Posted May 22, 2013 Author Share Posted May 22, 2013 (edited) Okay, I tried a lot of different methods and I still can't get a happy result out of this. I cleaned up the scene to my best ability of extra junk. Here is the scene. At one point I had it working pretty close to good with 50-100 substeps depending on the cup animation (I have 5, but this scene is the easiest one) but now it doesn't seem to work or matter, and I can't track down why. Please help me understand why this is so hard, I expected this would be my easiest sim so far, with such a simple premise. (Fluid is supposed to stay in the cup at all times, the lid is there to help keep the sim under control if it happens to go berserk on me) Sorry, odforce upload is not working for me. Here is a direct link. Edit: When preview testing, I stick to between 25k-100k particles, when doing the real sim I try for 500k-1mill, just for reference. Edited December 1, 2013 by Dispel Quote Link to comment Share on other sites More sharing options...
Skybar Posted May 22, 2013 Share Posted May 22, 2013 I haven't looked at your scene, but have you tried slowing down the cup and sim with that - and then retime it back? Playing with the timescale of the FLIP at the same time as well, so that it behaves properly when retimed back to the original speed of the cup. Quote Link to comment Share on other sites More sharing options...
Dispel Posted May 22, 2013 Author Share Posted May 22, 2013 (edited) Yes, I have tried that extensively.. Retiming has some success, but it ends up making the fluid splash around far too quickly.. And if I use the timescale on the DOP network to or flip solver to compensate, I'm right back to where I started. Edited May 22, 2013 by Dispel Quote Link to comment Share on other sites More sharing options...
ryew Posted May 22, 2013 Share Posted May 22, 2013 Unless you are deadset on using FLIP for this, have you had a look at Andrew Lyons' clever "Contained Fluids" procedural method? It's a nice effect for a non-dynamic solution Quote Link to comment Share on other sites More sharing options...
Dispel Posted May 23, 2013 Author Share Posted May 23, 2013 I will take a look at this, thanks a lot for the recommend! Quote Link to comment Share on other sites More sharing options...
johner Posted May 23, 2013 Share Posted May 23, 2013 As you've found, this is a challenging setup, as you're basically looking for non-physical behavior from the sim (which is why people are recommending retiming and non-simulated approaches). You can get a FLIP sim to keep up with the fast moving cup, but keeping it inside the cup is physically implausible unless you put a lid on it. I've attached a full sim of your file that works just by using your lid object to keep the fluid in the cup, which might look really strange or might not matter once the whole thing is motion blurred. A few notes on this file: I went back to using $F to bring in the geometry and Timeblend-ing, as you'll need more than the 10 substeps you've written out from Maya. You had gravity doubled, I assume to try to keep the fluid in the cup. This will make the fluid very jittery at this scale (6 cm cup), so it's back to default. Smoothing was zero; you want a high value here, as it adds a small viscosity that you'll want for milk and tames things down. I set it to 0.3-0.5 range. Use Move Outside Collision as it gives smoother collisions if your collision geo is thick enough, which it is, and is less likely to bunch particles up at the collision surface and have them deleted by Reseeding. Reseeding is back on as it otherwise can help keep volume up. I left your old nodes in the file so you can compare the settings. A more controllable approach is to separate out the cup's rotational motion, which is not too extreme, from its translational motion, which is very fast. ExtractTranform will let you do that, so in the second attached file I parented the collision cup to only the rotation from the original cup. This lets the fluid slosh back and forth, then pour out at the end. This still uses 10 DOPnet substeps as even the rotational motion is "twitchy", and keeps the lid the cup on until before the pour. Then you just parent the resulting FLIP particles to only the translational motion so it will match the cup. You'll also need to add the cup's translational velocity back into the FLIP particle velocities as I've done here, to get proper motion blur. Finally, you can use the Reference Frame force to add back in some of the translational force, which you can scale to suit. This is done by creating two new pieces of Position data attached to the flip object that represent the cup's current and previous translational position. A Copy Data solver copies current to old on each timestep. This is obviously a more complicated setup, but you really are looking for a "pseudo" physical sim and need a bit more work to get one you can control sufficiently. (Re-timing would probably work for this as well, but again it's a bit tricky to setup). milkcups_v089_clean_lid.hip milkcups_v089_clean_refframe.hip 4 Quote Link to comment Share on other sites More sharing options...
Dispel Posted May 23, 2013 Author Share Posted May 23, 2013 Good lord, epic post. I will pore through these materials you have prepared tomorrow and make sure not a drop is wasted! THANK YOU!! Quote Link to comment Share on other sites More sharing options...
johner Posted May 23, 2013 Share Posted May 23, 2013 Very welcome. Don't let this get in the way of looking at the video ryew recommended; it's a really cool approach (although getting a pour out at the end would be tricky.) Also, I just ran a higher res test of that Reference Frame file. You might increase the Reseeding Birth / Death threshold if you're still losing volume, like to 0.75 / 1.75. That just makes FLIP more likely to create new particles and less likely to delete any. And possibly increase the Smoothing even more. 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.