I'm trying to fill a bottle I designed with liquid on Blender. I've looked at tutorials and they all use the type "obstacle" in the fluid tab in physics. My blender software does not show this obstacle option I'm wondering how I can do this. I'm using the latest version of Blender. Here's a screenshot of my problem, The list only shows Flow, domain, none and effector.
You will need to use Type: "Effector" and Effector Type: "Collision".
Here the steps for a basic fill the bottle setup:
- Have a cube big enough to cover the bottle and the source of the liquid, maybe even some spilled liquid, who knows ;)
- Make sure the cube has it's scale applied! Ctrl+A "Scale"
- Go in the Physics Properties and activate the Fluid, Type: Domain.
- Select the bottle, make sure the Normals (please see at the end of the answer for a deeper explanation) are correct, better check early then wonder about the wonders Blender can give you later. Switch on the "Face Orientation", which can be found in the "Viewport Overlays" drop-down-menu at the top right of the viewport.
- With the bottle all blue (correct Normals) you can also apply Fluid physics to it and select the Type: Effector, with the Effector Type: Collision.
- As for the settings needed here, i ended up testing a bit and ended up with these settings, you may need to adjust them depending on the thickness of the bottle though.
- Pretending that you use a sphere as source, it needs to be scaled down to make sure it goes in the bottle, scale it in edit mode, or if scaled in object mode, make sure to apply the scale Ctrl+A "Scale"
- Setting up the source is done by activating it as "Fluid" and setting it as Type: Flow, with the Flow Type: Liquid. The settings are rather plain, but can be adjusted later. Important to note is that if you want to fill a bottle, you may want to animate the inflow. Check the Use Inflow and press I over it to set a keyframe. Move to one frame before the time you want it to stop and press I once more to add a keyframe. Now go to the next frame and uncheck Use Inflow and press I one last time, effectively closing the hose.
- Domain, bottle and source done, you need to adjust some details in the domain to get a result. I found it easiest to check if i like the simulation by activating the X-Ray Alt+Z.
- Being able to see through the cube(domain) and the bottle helps, so now you can go in the Physics Properties of the domain and scroll all the way down to find the Cache panel. Here to get a fast feedback set the Type to Replay, means the simulation will run when you press play (usually with Space). Adjust the time frame for how long the simulation will be calculated. The liquid simulation will run further in replay even if you only simulate for 50 frames but have 100 frames running. Later for the baking, you may need to increase the length of the simulation that will be calculated to ensure that it is covering the entire filling and settling. Here roughly what it looks for me.(excuse the cheap bottle :p)
- Now comes the tough part, you will need to re-simulate and adjust a lot, so a tip i wished i had heard before: Should you suddenly have the liquid fall through the bottle and ignore it completely, set the time to 0, then go in the Cache section of the domain and switch the Type to Modal and then back to Replay, if that does not do the trick it helps if you change the Frame Start from 1 to 2 and back to 1. I wish there was a reset button somewhere but at least this seems to help. You can also delete the cache, by opening the folder, going out of the folder and deleting it.
- Let's pretend you got the simulation set up now and want it to be finalized, go in the Cache section of the domain and set the Type to Modal.
- Go back to frame 1
- Scroll up in the domain to the settings area and click on Bake Data, this will run through the set frame-range and generates the particle simulation (we are not finished yet though)
- Now you can play the animation again to see if all is still as you saw it in replay.
- With the particles baked, you now most likely want to see some liquid. For that you need to scroll down a bit to find the Mesh panel, which you need to check/activate in order to be able to click on Bake Mesh. Leave the settings and maybe change to preview if you have a rather long simulation to get a fast result. Later you can play (yes have fun) with the values to get the best (to your liking) result to commit to the final baking. Note: That the liquid will only be simulated for the set time, after that the domain will show up again, so if you want more time for the liquid to settle, you have to give the simulation more time extra!
- There is also one Type Final in the Cache, where you can Bake All, but it still does not change the fact that the simulation will only show the simulated liquid for the time it's set up. For that, you can duplicate the domain, select the new one, go to the last calculated frame and Apply the modifier, giving you a stopped in time version that you can use instead of the simulated one once that is run to it's last frame. A simple switch from simulated to the new final state object should suffice in most situations. Animating the Visibility in render will do the trick.
Here the final result with the simulation playing to frame 49, where i then switched to the finalized copy of the domain (frozen in time 49).
Finished, i hope this helps getting started.
Added info regarding Normals:
A bit deeper info regarding the "Normals" as in "Face Orientation", since this is a point often underestimated. NOTE: The faces will only be in color if "X-Ray" mode is not active
With "Face Orientation" switched on, faces will be color coded blue for what pretty much all should look like when viewed from outside the object and red as for the inside the object. I tend to imagine it as the meat of the object, as that would be red. You could say if you stand in front of a blue face, you are outside, if you stand in front of a red face, you are inside the object, thus seeing parts of your object red even though you are a distance away from your object, means those red faces are oriented wrong.
Normals do affect not only the shading and thus the look in the render.That said, Normals will affect the subdivision surface modifier (or rather how the object looks if subdivision is added to it), the simulation of cloth, fluids and particles as well even 3D-Printing, since essentially only the inner part of the object (go in the object and look, it should be all red) will be printed/filled by the slicer software.
Should there be Normals that need to be corrected, it's usually the easiest to select all and press Shift+N which "Recalculates the Normals" in case you only need to Flip one or a few select faces, you can press Alt+N to open the popup menu and select "Flip".