SECTION 2 - SIMULATING THE FLOOD
All right! Now we can get to the good stuff, the fluids. For this scene I want to flood the subway that you (the camera) are in. This is similar to my Trapped animation. So we will have a Domain and an Inflow and an Outflow along with the subway station we just modeled acting as an obstacle.
Go to top view and and add a cube. Since we want to flood the subway we have just made we want the domain to be right on the edges of it. So skew the cube by a rate of 10.
-- 7; Clik Add--> Mesh --> Cube ; S ; 10
If you move out of top view you may notice that there is a ton of wasted space underneath our subway. This is bad. The more wasted space in your domain or the bigger your domain is the longer it is going to take to bake your fluids.
Make sure you are in 'Face Select Mode' and select the bottom of the cube. As you can see, the dead space is half (!) of the total cubes size. So, grab the bottom of the cube you just selected and move it along the Z axis by 10.
-- Select the bottom face, G; Z; 10
Yours should look similar to this.
Now that we have the domain in the position we want we can add the inflow. Go to the top view, and add a cylinder. I left it at the default settings. While we are in the top view, grab the cylinder and move it by '7' on the Y-axis and by '8' on the X-axis.
-- 7; Add --> Mesh --> Cylinder;
-- G; Y; 7; G; X; 8
Now we need to make sure the inflow is at the right height. Go to the front view and move the cylinder up by 8.
-- 1, G, Z, 8
Now for the outflow. Get into object mode, top view, and I added a cube. Move it vertically upwards by 1, and put it under the camera by moving it along the X axis by '7' and along the Y-axis by '-7'.
-- 7; Add --> Mesh --> Cube;
-- G; Y; -7; G; X; 7
-- G; Z; 1
Now we have all of our pieces set up.
Go bak to 'Object mode' if you haven't already and select our domain, the big rectangular shape surrounding our subway. Once that is selected, go to the 'Physics Tab' and in the fluid simulation area hit 'enable'. A bunch of buttons will appear with one of them being domain. Select it.
-- F7; Physics Buttons; Select the cube
surrounding the subway; Clik Enable
; Clik Domain
Now select the cylinder and do the same thing except instead of 'Domain', you want to clik 'Inflow'.
-- Select the Cylinder;
; Clik Inflow
Next select the small cube under the camera and in the corner and make that an outflow.
-- Select the small cube;
; Clik Outflow
Finally lets select our subway and make it an obstacle.
-- Select the Subway
; Clik Enable
; Clik Obstacle
Now all that needs to be done is the adjustment of some settings. Select our inflow again and change the inflow velocity on the Z axis to '-.5'.
-- Select the inflow
; Set Z under 'Inflow Velocity' to -.5
Now select the domain and hit BAKE
. Now you may have noticed two problems.
1. The water is very gooey.
2. The water goes over the top of our subway edges.
Here is how I plan to fix these problems. Select the Subway and go into edit mode. Grab the faces that line the stairs and raise them higher by about 2.
-- Select Subway; Edit Mode; Select Faces; E;
Clik Region; 2
As for the gooeyness, we need to change the end time of our simulation. I am going to assume your animation is running for 250 frames, 25 frames a second. This is the default. That means our simulation should be for 10 seconds. If you clik the Std
button in the domain settings you can see the simulation end time. Right now it is set at .30. This means that over our 250 frame, 10 second animation the fluid moves as it would in .3 seconds. I guess it would only make sense to change this setting to 10. But I won't.
Why? It will take ages to bake. But that is just me and my computer. I suggest you test it out if you do not know how well your computer works with baquíng. I will just set mine to 5
Now you can bake it and see what happens. As you probably noticed, our subway has filled up with water to a certain point until the outflow is covered and keeps the water level from rising. The bigger the outflow you have the more fluid it will suk in.
As you can see if you render a frame of this the water is really blocky. The easiest remedy is to Set Smooth to the domain. (This is under the 'Editing' button or hit 'F9') You can see the difference below.
If you want to actually raise the resolution of the fluids you would have to go into the same place that has the end time and directly above it you can see the resolution settings. The default is 50. So if you decide you want a higher resolution raise 50 to a higher number. But watch out, the amount of time it takes to bake fluids grows exponentially larger as you raise the resolution. This is another place to test out how high of a setting your computer can handle.
Now you can add materials for the walls and add more details to this gray subway flood. Get as detailed as you want.