Jump to content
breadbox

Flip Fluid Scale

Recommended Posts

I'm trying to simulate my object at "real world scale". I have a problem though the default settings for the flip solver don't work at a small scale, so i need to adjust the particle separation and resolution for the fluid to behave correctly. It seems that houdini more or less defaults to a 1 - 10 meter sim scale. That's generally the range I think things work right out of the can without adjusting too much. you can pop the shelf tools down and blam decent looking stuff. now the problem is I have an object that I'm trying to simulate which would be only 1.5 inches across. I'm trying to do this more or less mathematically, so I take my default object and scale it down 1/10th in units. then I go into the flipSolver and try to multiply all the crucial settings by that same value 1/ 10th. mainly these 3 settings.

particle Separation

particle Radius Scale

Grid Scale

the effect is not exactly correct. I would think I would get more or less the same number of particles on the large scale as the small scale IF I have correctly multiplied all the factors by 1/10th their values. The result I am getting is way too unstable simulation at the small scale, and way too many particles, plus they jump and skip around, it seems like its erroring on the substeps of the solver, plus it flat out takes forever to sim.

any way to take a simulation at normal scale and create more or less the same resolution of sim at a smaller scale? should be simple right? I'm just not sure I'm multiplying the right parameters.

BW_MilkSim_RealWorld_V15.hip

Share this post


Link to post
Share on other sites

here are my settings for the two fluids, basically Im trying to find out the best way to use a multiplier to go up or down in sim scale.

post-5696-0-78735900-1366176333_thumb.pn

Share this post


Link to post
Share on other sites

Isn't it easier to just play around with the Spatial Scale parameter in the solver?

To go your route, you'll probably have to plug that multiplicator in a LOT of parameter/nodes inside the solver, and I'm not sure we have access to which one is working in world units or "percentages", and how they all tie up together to come up with a formula that allows scaling by number.

Share this post


Link to post
Share on other sites

You would think this would be simple right? I tried adjusting the Spatial Scale and it alone does not look like it will work. Yes there are several parameters that need to be adjusted, but this should be straight forward, I just can't figure out which ones to adjust and by how much. but everyone tells me that you should simulate at "real world" scale, but clearly this doesn't work unless you can adjust the right parameters to make that happen.

Share this post


Link to post
Share on other sites

The spatial scale is usually used for changing the units of the .hip file, for example if you're working in centimeters. These units are set in Preferences | HIP file options, and you should change them before creating the FLIP network if you can, in which case all the parameter scaling should happen automatically.

If you want to stay in meters, just use really small objects, you should only scale down the Particle Separation. The Particle Radius Scale and Grid Scale are just multipliers on the Particle Separation, so you shouldn't scale them.

Share this post


Link to post
Share on other sites

I have been warned against changing the units. seasons pros have told me not to adjust that, but to always work in meters is best. I suppose there is always an exception to the rule.

so leaving everything at defaults, except changing particle separation seems to work better, but there are some pretty big gaps in the simulation, because of the scale the particles seem to move in clumps a bit more and have gaps between sections. Its really strange and doesn't really feel natural at all. It's also hard to explain here is an image and the hip file. it seems like there maybe more parameters that I need to adjust

post-5696-0-21834500-1366591704_thumb.pn

BW_MilkSim_RealWorld_V16.hip

Share this post


Link to post
Share on other sites

hey, im havin the same sort of troubles. ive gotten the particles to behave, more or less, the way i want... but i cant seem to get the particle surface to behave correctly on that scale. here is what i've got.. id ove to keep this dialogue going :) thanks

CUP.hipnc

Share this post


Link to post
Share on other sites

for my file best I can tell right now is it looks like the emmiter geo is having a problem at that scale, but in alex it seems to be ok in yours. I wonder if scaling the geo at the OBJ level makes a difference. When viewing the volume you can tell its creating a much larger object. not sure why? I can experiment some more and try to post another hip.

Share this post


Link to post
Share on other sites

here is a screencap of my emitter and the resulting volume produced with the emit particle shelf tool. you can see the volume is WAY too large. This may not be the only problem but it seems like its a big problem.

post-5696-0-93017400-1366690775_thumb.pn

Share this post


Link to post
Share on other sites

also not sure, but i was originally trying to emit from a flat circle. maybe flip has a problem with that and works better with a sphere?

Share this post


Link to post
Share on other sites

for some reason your sim was quicker when i changed the sprites to particles... also i tried adjust a bunch of stuff in it and yea its wacky, to mess with the size of the emitter (not having it be 10x the size of the actual geometry i just messed with the "creat_surface_volume" node within the emmiter geo. specifically a combo of the division size (scalar vol>settings), edge location (scalar vol>sdf from geo), and the particle separation (you already know). but i just popped open a tutorial talking about the new VDB stuff in 12.5 so that might help with meshing the fluid particles. let me know if you find anything else out, and i'll do the same. sorry for the delay. :)

Share this post


Link to post
Share on other sites

for some reason your sim was quicker when i changed the sprites to particles...

I just ran a performance test. This is 5 frames of the simulation the first ran with sprites, the second particles. Unless I'm missing something I don't think the visualization makes much of a speed difference. I haven't even gotten to the mesh stage yet, which im sure will bring up some issues but mostly still working on sim times for small scale simulations.

post-5696-0-82061600-1366940419_thumb.pn

post-5696-0-46917700-1366940428_thumb.pn

Share this post


Link to post
Share on other sites

I tried a test, I think I might be onto something here. Maybe its the emitter geo that is creating the slowdown. compare the sim times with the small scale to the normal scale. mostly the difference is in the emitterVolume creation.

post-5696-0-72078800-1366941721_thumb.pn

Share this post


Link to post
Share on other sites

This seems to be the culprit. The create volume seems to be slowing the sim down. I don't know why it doesn't create the volume on the first frame and then re-use the volume for the rest of the sim? The volume sample gets its particle separation value from the DOPs via an expression, I'm not sure what the relationship is but it seems to place particles way smaller than what is necessary? because I can raise the particle separation in the Fluid Source Volume and lower the particle separation in the Flip settings, the simulation still can have good resolution? It makes it go way faster but I'm not sure if there are any negative side effects with this.

I had to break the expression in the fluid source node and multiply this by 10.

BW_MilkSim_RealWorld_V19.hip

post-5696-0-53604600-1366950918_thumb.pn

Share this post


Link to post
Share on other sites

... I don't know why it doesn't create the volume on the first frame and then re-use the volume for the rest of the sim? ...

it does, it just needs to regenerate source particles each time since you are animating seed on jitter

The volume sample gets its particle separation value from the DOPs via an expression, I'm not sure what the relationship is but it seems to place particles way smaller than what is necessary? because I can raise the particle separation in the Fluid Source Volume and lower the particle separation in the Flip settings, the simulation still can have good resolution? It makes it go way faster but I'm not sure if there are any negative side effects with this.

I had to break the expression in the fluid source node and multiply this by 10.

you guessed correct value, the reason for the mismatch is that you've scaled your emitter object to 0.1 so if you use particle separation value from flip which is 0.01, you'll end up with separation of 0.001 in world space which is 10 times smaller than flip is actually using, so your fix is correct since it negates emitter object scale, you can as well link it to FlipParticleSeparation/EmitterScale

it is very good practice to not use scale at object level at all unless it is really required (as for animation)

Share this post


Link to post
Share on other sites

Thanks Tomas,

Its starting to make better sense, although if we are talking scale percentages I'm not sure why I would have to alter the shelf setup by breaking that connection? If the values are percentages and linked relationships I don't understand why I would have to break this relationship for it to work properly.

I tried to set this up one more time with a few modification, I do not scale anything or move at the object level, everything is internal to each geo.

I created new networks with the shelf tools. The volume for the emitter that the flip created is quite a bit larger than the geo. I wonder why this is? If I make my own volume its fine.

I feel like the shelf tool that is creating the emitter volume is generating the source of all these problems. If I modify the volume then the particle separation seems to work fine? If I lower the edge location and raise the division size it seems better. Then It seems that the particle separation works more as expected without having to modify or break the connection in the volume sample?

post-5696-0-68027400-1367039078_thumb.pn

post-5696-0-39593300-1367039154_thumb.pn

BW_ScaleSetup_V3.hip

Share this post


Link to post
Share on other sites

you don't need to break the connection if you are not scaling the emitter since the separation will work

if however the source volume is very big, you'll have too many particles, but still correctly separated as flip requires them

so to your problem with larger volume, there is some user input necessary to get correct result as it seems to not make a good job from shelf as you noticed

additionally to lowering the Division Size and setting Edge Location to 0 you need to uncheck Minimum Distance in this example (in case of the planar circle it was good)

and you can as well set Iso Offset to 0 (in Visualisation tab) to see the volume with correct size, even if it's only for visualisation it's good to see it correctly

Share this post


Link to post
Share on other sites

Thanks Again Tomas,

things are working better with those few adjustments. I getting a pretty large speed hit from the small emitter compared to the large. any idea why this would be? performance monitor tells me that the DOPS Flip is about equal, but its really in the volume creation of the smaller emitter. specifically:

grid_container

raw_Volume_by_sdf

poinJitter

they total up to 20 additional seconds on a 40 frame sim.

I tried to match the settings as best I could on a small emitter and a large one. The large one actually has a few more more particles created (yet it's faster?), here are the results.

post-5696-0-52734400-1367074156_thumb.pn

post-5696-0-18920700-1367074181_thumb.pn

BW_EmitterSpeedTest_Large_V1.hip

BW_EmitterSpeedTest_Small_V1.hip

Edited by breadbox

Share this post


Link to post
Share on other sites

first of all the volume is much denser in small emitter and even though it's not recomputed each frame some things that depend on it are

you can notice that almost all time is spent in pointsfromvolume and that's mainly because it's time dependent since you are animating jitter seed

and because it is dependent on more nodes which are not cached due to sop unloading it needs to recook them each frame as well

to make it more efficient without losing jitter variation or breaking into the asset you can clear jitter options on Fluid Source SOP making it time independent and therefore computed only once

and add Point Jitter SOP with correct values and seed animation after that, it will make is super fast since it's just jittering points without any other steps

BW_EmitterSpeedTest_Small_V1_fix.hip

Share this post


Link to post
Share on other sites

first of all the volume is much denser in small emitter and even though it's not recomputed each frame some things that depend on it are

is it denser? Because it is smaller, I had to lower the division size yes, but its smaller so shouldn't the volume resolution be the same either way? a sphere that is 50 x 50 has the same number of divisions weather its 100 units or 0.001 units.

or a volume that is 10x10x10 and division size of 1 is the same density as a 1x1x1 with division size of 0.1?

I guess a lot of confusion comes from the shelf tools. They seem ok, but not all together fully thought out. I'll probably stop using them until i can learn a bit more about volumes and fluids.

I'm glad you showed a way to do point jitter but fast, because we need that otherwise the particles seed in the same place and it doesn't look as good. (this would be very easy for the shelf tool to do though, why not side effects?) but ultimately that relies on the volume resolution. because we don't have that problem if the emitter is large, we don't have to manually create a point jitter, the built in point jitter is fast enough.

so really the question is still how to make the small volume behave like a large volume.

Edited by breadbox

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×