Water and Lava

Implementing water and lava within DromEd can be a tricky business, both for new users and experienced ones. The key to success lies in the flow brushes. This tutorial should, hopefully, help outline some of the problems so they can be avoided. It is accompanied by a demo mission - 950k - that will illustrate each of the methods described. This tutorial is also contained within the zip and will appear in a tutorials folder in your Thief 2 directory if you use DL. If you have anything to contribute to this tutorial please get in touch with me.

Room 1 - The Basics

Water comes in three brush types:

  • Fill Water: Turns the entire brush into water.
  • Flood: Turns only the area of the brush that is in air into water.
  • Solid->Water: Only turns a solid into water.

    All types of water brushes need to have a flow brush as well to turn them into water - a water brush without a flow brush appears as jorge.

    Let's start by making a very simple square pool. Carve out a pool in the floor of the room using an air brush - this will allow us to put a gap between the top of the water and the top of the pool. Now clone that brush and reduce its height by 1 foot. Align the bottom of the new brush with the bottom of your pool and set it to "fill water".

    If you optimise your level now, you will see what water looks like when it has no flow brush.

    To add the flow brush, select from the list just to the left of the bottom-centre of the screen.

    Set your flow brush around the water brush, placing it within the world in the same way as any other brush. Ensure that your flow brush completely covers the surface of the water. The flowbrush will be purple in the 2D views.

    Now we need to specify the flow's properties. With the flow brush highlighted, look to the bottom-centre of the screen for the "edit group" button.

    This brings up the following box.

    Although there are many options, the only one of interest for the moment is "texture name", which allows us to set the colour of the water. Enter "bl" in the box (without the quotes) and select OK. Optimise (or portalize) your level again and you should find you have a pool filled with still blue water.

    You may have noticed the number 1 above the "edit group" option. This is the group number to which your flow brush belongs. From now on, any flow that is assigned to group 1 will make still blue water.

    Now that we have made a water pool, we will look at setting up a similar lava pool.

    Create another pool identical to the first, select the flow brush and use the arrows to put it in flow group two.

    Select "edit properties" and enter "l4" into the "texture name" box - this makes water in flow group two look like lava. To make it act like lava, we must move its position in the object hierarchy. Open the hierarchy and chose Flow Groups from the drop-down menu.

    Open the "Water Flow Group" menu by clicking on the "+" - you should spot "flow group 2" amongst the list of objects. Move this to "Lava Flow Group" by clicking and dragging it.

    Now enter the game and test your new lava pool.

    Finally add a little decoration and you will have a pair of pools that look something like this:

    Connecting Corridors - 1

    Next we will look at the advantages of using solid->air brushes and how to add a current to the water. This will be demonstrated with a pair of connecting tunnels - one that allows you to exit the room and another that will let you enter.

    Create a ten-sided cylinder (a decahedron), angle it at 22.5, and place it so the bottom section of the cylinder's top is level with the floor.

    Surround the cylinder with a flow brush - leave it set to group 1 for now.

    Set the cylinder as a "fill water" brush. Now optimise and go in game to look at your new brush. You will see that there is a segment of water above the floor where the cylinder pokes through.

    One way to fix this would be to chop off this block with an air brush, but a much better way is to use the water type "solid->water". Reset your cylinder to this brush type and optimise again - there should no longer be any water above floor level.

    Now that we have made the cylinder, we need to add a current. Set the flow brush to be a part of group 3. Now select "edit Group". You will see three boxes that are labeled y change/sec, x change/sec and z change/sec. These allow you to input the current along each of the axis. Our tunnel points downwards and we wish the current to flow along with it, so set the z-axis to -10. Z-axis to select the up/down axis and - to select downwards. Also set the colour of the water to red (texture "vm"). Now go for a swim in your cylinder. You should find you can go down it, but the current is too strong to come back up. You have now created your exit tunnel.

    Create a second tunnel to act as the entry tunnel using flow group 4. This time set the water to green - "gr" - and the current to z, 10. If done correctly you should be able to bob on the surface of the water but not swim into it. Illuminate your tunnels so swimmers can find their way through them.

    Room 2 - Dos and Don'ts

  • DON'T forget to check your surfaces.

    The first thing we will examine in this room is getting the surfaces of the water to look as they should. When you enter, turn around and look at the surfaces of the water in the tunnels. You should be able to see that it looks wrong - they are covered in long streaky lines instead of the normal surface. This is because the flow brush surrounding them has not been set correctly.

    To see how to set the surfaces, create three free-standing cubes of water. With all the flow brushes set to group 1, the top and bottom surfaces of the cube look correct whilst the rest look wrong.

    The property controlling this is "axis: 0=x, 1=y, 2=z". Set the second cube to flow group 5, make the water blue and change the axis to y (1). Now go back into game mode and see which surfaces are correct this time.

    Finally set the third cube to have flow group 6, blue water and axis x. Again the surfaces that look correct have changed.

    When creating water, it is preferable (at least at first) that you only have a single surface of each brush showing to avoid getting the effects seen in the three cubes.

  • DO use flood brushes to create floods

    This may seem an obvious statement, but often during building it is the water that gets placed first, with the scenery being placed after. Flood brushing will allow you to build the structure you desire and then place the water.

    Let us say that we wish to create a flooded canyon, with a house at the center. It would be much easier to build all the details within the canyon before you add the water - to avoid having to jump in and out of water to see what you are doing and to minimise the risk that your placing a new brush "just so" will cause your water to revert back to jorge.

    The canyon in the example is an enclosed rectangle on a table. The house is a small solid cube set off-center. There are also several small pyramids used to represent hills.

    With the canyon built, it is now a simple case of filling it with a single water brush - this one set to "flood" and giving it a flow brush set to group 1 (our still blue water.).

  • DON'T allow solids and flows to share the same center point.

    Combinations of water and solid can, however, cause problems. Many of these are caused by a flow brush sharing its center point with a solid. If you go to the right of the partition, you will find two examples of this probblem.

    Create a simple circular pond. Use a decahedron (a 10-sided cylinder), set to fill air. Clone the cylinder, reduce its width and depth by 0.5 feet and set to "fill water". Finally, create a central pillar within the pond by cloning the solid cylinder again and reducing its width and depth to 2 feet. Surround your pond with a flow brush.

    You can see that this creates a situation where there is a solid in the center of the flow brush. Optimise and you will discover that your water remains as jorge. In-game this jorge is red to indicate that there is a flow brush present but that it is invalid.

    One solution you may think of is to use an air brush to hollow out the center of the solid - unfortunately, this does not work either. If you look at the second pond, you can see that an air brush has been used to cut it in half, thus taking away the center of the solid brush.

    The water, however, remains jorge.

    In fact, the solution lies in the flow brushes. Recreate the pond, but this time use two flow brushes, slightly overlapped, to cover the water.

    This time when you optimise you should have real water.

    The flow brush halving method is often useful for getting around tricky problems like this. However, it is much better to plan things so that you don't encounter this problem in the first place - especially as this splitting method is not garanteed to work every time.

    Continue or Back to Tutorials Page