Liquid Simulation - Tips/Tutorial

These are just a few tips I have for anyone trying liquid simulation in blender 2.40 alpha… I spent all of today working on it.

  1. To start your simulation, make a big box that shows how far the liquid can go, this is like the walls of the simulation, after baking the animation, this will become invisible. Once you have created the walls, go to the animation buttons, and particle section, and enable fluid simulation. This object will be a “Domain”

  2. Place other objects that are the shape of the liquid you want within the domain, and enable liquid simulation on them. The types are:

Domain - Edges of simulation.
Fluid - Takes your object and replicates it for animation as liquid.
Obstacle - The liquid can not pass through this.
Inflow - Introduces a constant stream of liquid.
Outflow - Removes liquid from that area.

  1. For better sub-surfacing and more detail, raise the “Resolution” in the domain options. However, there seems to be a bug that does not permit the resolution to be greater than 149 (the program just freezes until you click escape).

  2. In order for obstacles to be recognised, the resolution must be pretty high (I would recommend over 100 anyways).

  3. To let Blender start simulating the motion, click Bake on the domain options.

  4. If for some reason, when baking you never see liquid, just start over (there is apparently a bug).

  5. Once Baked, you can texture the liquid.

  6. I am not fully sure how to remove the liquid emitters and such, so just set them to a material with no specular and alpha at 0.

Yeah, that’s pretty much it… If you find some problem that you cant figure out, just post here… I undoubtedly experienced it today, and know how to get around it.

:< Nobody is replying…

do you have posssibly a rendered animation of it that we could see?

Yup.

http://media.putfile.com/Water-Goodness

That was my initial try, I made another vid thats 32 megs, so I’ll be resizing it for the internet, then posting it.

That vid had some issues with lighting and materials, but my new ones look amazing.

ok I just tried it and I have a few questions… if I have an object that I want to be an obstacle and there the thing that you set to emit constantly (kind of two different questions mushed together) how do u bake the settings? do you just make the domain huge so it doesn’t effect the other two objects?

OK, as far as I can tell, the bigger the domain, the longer it takes to bake. Make the domain just bearly big enough to work with.

also

Did you like my animation?
There’s another one coming soon.

oh yeah… I found a way to make the resolution be much higher… but its very weird.

Resolution wont go above 149, so just make the res 100, then make your scene for instance 2 times as big.

Akey to select all, Skey for scale, 2 for 2 times as big.

When you are done baking the animation, go back and make it small and the resolution will stay good.

Thanks for the info. I’ve been trying to learn how to animate liquids, without any success. With your pointers, I was able to make my first successful liquid simulation! :slight_smile:

Awesome.

Hey that is very cool. I am bookmarking this so that I can come back and re-read your suggestions. I thought the animation was sweet - like a heavy black oil…

-CF

lococobra: nice tutorial! To my knowledge the easiest way to remove the fluid/emitter objects is to place them in a seperate layer (with the M-key) that is hidden for rendering. Btw., I’m also starting to update the documentation in the mediawiki, so hopefully there’ll be an up-to-date description of the fluidsim stuff here http://mediawiki.blender.org/index.php/Manual/PartX/Fluid_Simulation soon.

Unfourtunatly, it looks like the only reason I couldnt go above 149 resolution is because I was completely maxing my memory… gotta go get some more, guess 512 doesnt cut it.

However, I found that If I increased domain subdivision, it would have the same effect :D.

just wondering if anyone got obstacles to work? whenever I do it it screws up :(… also has anyone tried the constant emitter thing? I did it once, but it wasn’t really “constant” it kinda splurted then stopped then splurted then stopped etc…

Yes, I have gotten obsticles to work, and for the emitters, it is a constant flow when the resolution is higher.

Use approx 140 resolution for pretty accurate simulation.

when I do that stuff in 2.4 I can’t find a bunch of the stuff for fluid stuff mostly advanced things (yes I looked under the advanced tab) like resolution or initial velocity etc… can someone post some pics cuz I think mine is screwed up :S

It’s in the options of the domain.

Ok, I’ve hit a few problems with the Liquid simulator.

An easy test with 2 cubes one smaller then the other works fine, but when I delete the default cube thats the domain and replace it with something like a “cone” or a “sphere” and make them the domain and then bake it, the water falls down and takes the shape of a “cube”! Tryed many diff things but nothing seem to work.

Another thing that I tried was to make a “plane” a domain and see what happend. This time when I hit “bake” blender crashed, tried a few more time and everytime blender crashed.

One more thing that happens whenever I hit bake is that a shit load of files are created on my desktop wich all say “1_surface_final_0001.bobj.gz”. I ended up with close to 1000 files on my deskttop.

Whats up with that?!

Maybe you could help with some of this?

ok I got it to work kind of except when i did it it went really slow (not the calculating or rendering but the actual animation) I’m not sure which setting did that :S… 2 more things too… when I make a domain cube and try to have 2 different liquid objects it doesn’t work… (I wanted to have to drops running into each other straight sideways)… also liquid simulation doesn’t seem to work without gravity… which kind of blows…

way2lazy2ca: uh, good point - i never tried a zero gravity test case… but you’re right, it should work. setting the gravity to a really small value (e,g, 0.01) should work, though.

Well the Fluid animation system isn’t yet developed enough, but I did mess iwth it alot when it first came out,

http://media.putfile.com/Liquid-Cube

Obstacles work, and to get a constant flow of a fluid you have to set the object as inflow. Be sure to set teh gravity on teh inflow option to -z to make it go down or else it will just hang in the air.

Outflow sucks away the fluid.

Fluid tab makes the current object teh exact amount of fluid you want to use.

Obstacle tab makes an obstacle duh.

Domain this makes teh object’ bounding box teh boundries for the inflow or fluid.

There is a problem though, when the domain is too large and you have a small mesh set as an inflow, when you bake it nothing will happen, the domain has to be in poportion with the inflow.

Here is another test it did with obstacles.

http://media.putfile.com/Volcano81

Cheap and cheasy test but they get the idea accross.

Ok, as I understand… the domain does not at all effect the liquid in any way, it is simply the boundries of the simulation (it can also act as an invisible obsticle). If you want the liquid to be a different shape, the liquid emmitter/liquid object must be the shape you want it to take.

This would make sense… You cant keep liquid inside a box that doesnt exist. :smiley:

These are the stored calculations of the “Baked” animation. You can change where they will be created in the domain options.

I’ve had similar problems, and found that correcting the domain’s normals to be facing the inside can solve the problem.

and Haker, those animations were really cool! Thanks for sharing.