Realistic Liquid

For this tutorial, I'm going to go over creating a certain type of water effect. No two effects are the same, so you may need to modify your own scenes to show how you want the water to look. For my scene, I'm going to simulate a large gush of water emitting from some sort of tube like you'd see in a sewer or something. The water will then hit the ground and accumulate in a corner.

Now, before we get started, I should point out how taxing on a compuer particle effects can be. I'm running a 2 Ghz processor with half a gig of RAM, and my system still renders this stuff out really slowly, so bear with me.

First, I'll make my scene which you can download HERE. It is simply a "L" shaped wall along with a cylindrical pipe object. I've also put in simple 3-point lighting. A camera object is placed were I'll be rendering my example pics if you want the same view.


First, we'll head to the Dynamics menu displays (F4) and choose Particles > Create Emitter. (Fig 1)

Figure 1
In the emitter's attributes (CTRL + A), make these changes:

  • Emitter Type: Volume
  • Volume Shape: Cylinder
  • Away From Axis: 0
  • Along Axis: 1

What this does is change the point of emission to an area of emission. The particles will emit from an area, rather than just a single point in space. Since the "water" will be exiting a pipe, I've made the area of emission into the shape of a cylinder. I've changed how the particles are emitted from the default of emitting from the axis of the area to emitting along the axis of the area. If you press play, you should see something similar to what is found in Figure 2, with the particles emitting along the axis of the cylindrical shape. Rotate and resize the emitter to fit into the pipe.

Figure 2
If your water effect is different, such as a shower head or something, your particular settings may vary to achieve what you are looking for.

Now, we'll mess with the particles themselves. Press play and allow the particles to emitt for a second or two. Press stop. The particles should be frozen in their current place. Select them. Go into the attributes and make these changes (Fig 3):

  • Particle Render Type: Blobby Surface (s/w)
Click the Current Render Type button and make these changes:
  • Radius: .130
This makes the particles react to each other as Blobby Surfaces, which is more liquid-like. We're not done by a long shot, but before we continue, let's put a water shader on the particles. I like using a certain Utility combination that makes transparancy of the particles fade toward the center of each. I'll show you how to do this next.
Figure 3

Alrighty, this is really quite simple.

1. Open the Hypershade. Create a blinn material node. Create a Sampler Info and Color Blend utility node. (Fig 4)

Figure 4
2. Middle click and drag the Sampler Info utility onto the Color Blend. The Connection Editor will pop up. Choose Facing Ratio on the Sampler Info side and Blender on the Blend Color side. Close the Connection Editor.

3. Middle click and drag the Color Blend utility onto the Blinn material and choose Transparancy as the attribute to map. You should get an effect like in Fig. 5.

Figure 5
4. Next, Dbl click the Color Blend node to open its attributes. Change color one to white and color 2 to black. You'll notice that the outer edge of the blinn material is opaque, while the inner area fades to transparant. I'm going to adjust mine a little to be light grey in color 1, and dark grey in color 2. That way, the outer edge won't be totally opaque, and the inner area won't fade to totally transparant. (Fig 6) Figure 6
5. Open the Blinn material's attributes and give it your desired color. You can also mess with it a bit more. For example, I'm going to give my ambient color a bluish charge as well as map the specular color with a Brownian texture to give it a little more interesting look as well as choose the material preference of your choice, such as anisotropic. (Fig 7) Figure 7
Name and apply the shader to the particles.


Now, we're going to finish up the tweaking on the particles and the emitter to get the look of a huge torrent of water gushing out of a sewer pipe. First of all, let's see a render of what we've got so far: Fig 8.

Figure 8
Obviously, not quite there. I'm going to increase the rate of emission waaay up.... like 10,000! Now when you hit play, you'll see this big, blue... thing start pushing its way out of the pipe... not exactly fluid, eh? Let's also increase the speed of these things. Now because we're using a Volume Emitter, the normal Speed attribute no longer controls the speed. Instead, we're going to increase the Along Axis to... say, 10. Now let's see what we've got: Fig 9. Figure 9
It's shooting out of there pretty quick now, but when it gets across the hallway, there, it just goes straight through the wall! Let's setup collisions. First, select the particles, then shift select the floor/wall object. Go to Particles > Make Collide. Now, when the particles reach the wall, they'll collide with it rather than pass through it. But, this water shouldn't be reaching all the way over there, though, right?

Right! We need gravity! Select the particles and go to Fields > Gravity. With the particles selected, the gravity is applied to them. Now, we can see our "bubble-beam" is arcing downward and actually bounces off the ground! (Fig 10)

Figure 10
First, let's get rid of all these bubbles, and actually get some water in there. The Threshold attribute of the Blobbies is what controls the way the particles "merge" with each other. The higher the threshold, the further a particle can be from another to merge. Let's start off with a small number. A Threshold of .3 gives us Fig 11, while a larger number of .8 gives us the effect in Fig 12. You may also need to adjust the radius of the particles to get the effect you want. If you're doing a scene with water coming from a kitchen sink, your particle radius would probably be higher than on a large scene such as this because of the volume of water involved. For example, in Fig 13, I've increased the radius while keeping a high threshold. In this image, we have a larger radius of .63 with a threshold of .8. This makes the water look much thicker, almost gooey like sludge. So you'll find yourself experimenting with the balance of Threshold and Particle Radius to get the water effect you want. Figure 11Figure 12Figure 13
Now, let's see about fixing the "bouncing" water. Water will bounce slightly when it hits a surface, but it shouldn't bounce like a rubber ball. If you select your floor object, you'll find a new attribute in the Channel Box called the GeoConnector. In this section, you'll find Tessellation Factor, Resilience, and Friction. Resilience is how "bouncy" the surface is, while Friction is how "slippery' the surface is. A low resilience and low friction will have a rigid, but slick surface, like a non-stick frying pan. I'm going to set resilience and friction to .25. Also, I'm going to add a Turbulence Field by selecting the particles, and choosing Fields > Turbulence. Adjust the magnitude of the gravity and turbulence to your liking. I'm using Gravity magnitude of 9, with a turbulence of 30. I get this result: Fig 14. Figure 14
Obviously, we're getting closer, yet if I'm wanting a huge gush of water to be coming out of that pipe, I'm going to need larger particles, yet have them become smaller when they hit the ground. There is a way to do this, however you'll need to know exactly how long the animation is going to last. For mine, let's say it'll be a 5 second animation: 150 frames. Open the particle's attributes and change the Lifespan to Constant of 5 seconds.

Then, scroll down to the Per Particle (Array) Attributes. We're going to add an effect to the radius controls of each particle. Click the General button below the PP (Array) section. In the box that opens, click the Particle tab. This opens up a HUGE list of different attributes of particles that you can change. Look in there until you find radiusPP. Select it and click OK. (Fig 15)

Figure 15
In the array section, you'll see that radiusPP has been added to the list. Right click and select Create Ramp. You'll see the particles grow HUGE. That's ok. Now, right click on it again and choose Edit Ramp from the new menu. You'll see a black to white gradient. The gradient colors determine the radius of the particles from their "birth" to their "death". The default of black to white makes the particles start off huge and dwindle until they die 5 seconds into the animation. We're going to change it so they start off small, but then dwindle to even smaller when they die. Black is small, white is large, while the top of the gradient is death, bottom is birth. With this in mind, make the following change: Fig 16. Figure 16
As a result, we get the following: Fig 17. Figure 17
I hope this tutorial gets you on your way to creating realistic liquid effects! Email me any comments, questions, or concerns you may have with this lesson. There's still a ton of different things you can do to add to the realism of the liquid, such as using multiple water emmitters to show a varied water flow, particle emission upon particle collision to show little "splash" when the water hits the floor, lots of stuff! Here's what I came up with after a few different effects. WireframeRender
What I did in this scene was have the liquid particles emit more liquid upon hitting the surface (the purple particles) and also emit steam as if it were corrosive acid or something. The reason I emitted additional liquid, was because the huge torrent of liquid coming out of the pipe didn't seem to create a large enough amount of liquid on the floor, so emitting MORE liquid upon contact makes it seem that much more large. It'll take a bit of experiementing to get it all working like you want. Good luck, and thanks!

Michael McKinley