Check out Half-Life Re-imagined competition results!
Check out Skewing textures in Hammer, our newest tutorial!
Say hello to al_mam, our newest member!


Site Stuff






Feeling Blue

What's your favourite shade of blue?














6 mins

Instant Mix

24 mins


35 mins


38 mins


1 hours


2 hours


2 hours



A gaming and technology blog by TWHL admins Penguinboy and Ant. A music blog by TWHL users Ant and Hugh.

Horizonal Bubbles

By James Parkwood

In the Blast Pit chapter of Half-Life the player must activate power, oxygen and fuel lines before they can fire a jet engine to kill a trio of tentacle monsters. When the fuel and oxygen are activated there are several sets of pipes which have bubbles moving horizontally through them.

Horizontal bubbles can not be made using the env_bubbles entity. But Valve included a slightly flexible model for just this purpose. Inside pak0.pak in the models directory we find the file pipe_bubbles.mdl. This is the model, you can check it out with the Half-Life Model Viewer if you like, to get a feel for just what it is before putting it to use. There are a ton of other interesting models in this pak file, well worth poking around for.

So how can we use this exactly? The normal way of placing models in game is the monster_generic entity. This does not work with the bubbles model for two reasons. The first is that the model will get stuck and Half-Life will put a cloud of 'fireflies' around it if you stick it in any sort of small pipe. Second, it doesn't seem to want to animate properly, which defeats the purpose of using the bubbles.

To place the bubbles in a map properly you must use the cycler entity. The setup is as follows:

classname = cycler
model = models/!pipe_bubbles.mdl
rendermode = 5 (Additive)
renderamt = 255

This will place a cluster of animating bubbles in your map. So far, so good. But we can do a lot more with them. For starters you can activate them simply by setting their initial renderamt to 0 and then targetting them with an env_render. This is how Valve made the bubbles in Blast Pit. But we can do a bit more with this model. By changing the Pitch, Yaw and Roll of the cycler we can direct the bubbles in any way we like, making them even flow down! I'll go over the angles key/value pair because the pipe_bubbles is a little tricky at first.

The values used with angles are easiest to understand when looking at the map from above. The specifics can be read about in the Angular Velocity and Rotating func_trains by Unquenque. QuArK comes in handy here with it's unique'compass-based' viewing system, which displays which is X Y and Z at all times, thus making things a little less confusing. But it still takes some practice to get then hang of using angles, which is a very powerful feature of Half-Life. Anyways, on to actually working with the bubbles. To change the direction of the bubbles, that is make them go in reverse, you do not just rotate the model around the Z axis, because it is double-sided. This will produce no visible change in the bubbles. Instead you must roll the model around its X Axis. Here are a few quick settings for various orientations.

angles = 0 0 0
angles = 0 0 180
Flowing Up:
angles = 0 90 270
Flowing Down:
angles = 0 90 90

As you can see, you are able to point the bubbles in any direction you like and make them flow either forwards or backwards. With the use of non-squared rotations you can also make the bubbles flow diagonally! I'll leave the experimentation up to you. I have also prepared a quick .map and .bsp to demonstrate some of the techniques discussed here, as well as a simple multi_manager to create a sequence similar to Valve's original in Blast Pit.