
Map 6 : A Fountain Versions: You must be logged in to view history.
This next tutorial is slightly more advanced, but should be easy enough if you follow the instructions and study the diagrams.
Mapping 101 - Adding a Fountain with Moving Water and Sound - Tutorial 6
Ok, you should know the procedure by now, but just in case, load up tutorial5 and save it as tutorial6. This is the last time that I remind you. :o) By now you should know the basics and be able to build basic map structures, texture them, add a sky and even a bit of water. This next tutorial is slightly more advanced, but should be easy enough if you follow the instructions and study the diagrams. We are going to add a simple fountain to our pond, which will demonstrate the use of the Clipper tool, and we will also add some sound.
We are going to do some close up detailed work so set the grid to 1, and zoom in to the center of the pond. Turn the entities off with Ctrl-Shift-N to get the light out of the way. In the center of the pool make a brush 2 x 2 x 28 points, with the bottom of the brush touching the bottom of the pool. This should protrude 4 points out of the water. Make a brush 8 x 8 x 8 which is centered and sits o要 top of the last brush. Figure 1.

Figure 1. Switch to the front view and click o要 the clipper button. Now when you click o要 the map you should see a blue dot with a number beside it. Click the 2 points as shown in Figure 2. If you were off, and clicked o要 the wrong grid point, hover the mouse pointer over the blue number until it turns into a crosshair. Now click and drag it where you need it.

Figure 2. Part of the brush should turn yellow, this is the part that will remain after clipping. Press Enter to clip the brush. (You can cancel with the Esc key)
You can also apply the clip points by using Ctrl-Right-Click, instead of using the clipper button. The clipper works in a clockwise direction but if you find the wrong part is going to be clipped press Ctrl-Enter to switch them.
Repeat for the other side, and then switch to the side view and do the same. You should end up with a pyramid shape. Now clip the bottom using Figure 3 as a guide. Notice that we have to move point 2 down & left 1 point, this is because the clip points must be more than 1 point apart.

Figure 3. Repeat for the other side and switch views and repeat , apply the "armory/vaultmetal" texture to both brushes you've just created. It should now look like Figure 4.

Figure 4. Now we need to add some water spouts. Set your grid to 2 points. Make a brush which is 12 x 4 x 10 points and place it as in Figure 5.

Figure 5. Clip the brush as shown in Figure 6.
Figure 6. Now apply the 2 clip points as shown, in Figure 7. Instead of clipping this brush we are going to split it. Press Shift-Enter. The brush should split into 2 along the 2 points.
Figure 7.
Now do the same using the clip points in Figure 8.
Figure 8.
You should now have 4 brushes, we don't need the bottom left rectangle, so delete it. Finally clip the top left brush so you end up with 3 brushes as shown in Figure 9. Note we could have made the 3 brushes individually quite easily, but we used this method to show you brush splitting.
Figure 9.
Select all 3 brushes, apply the "tokyo/water" texture and press S to bring up the surface inspector window. Now uncheck the "warp" box, check the "flowing" box and type "50" in the "Value" box o要 the left hand side. Click Ok. While you have the 3 brushes selected, Right-Click o要 the map, to bring up the entity menu, select func>func_group. This will group the 3 brushes together to make selection easier. You may have noticed when you deselect the group it disappears, don't panic this is because you still have show entities turned off, and since you turned the brushes into a func_group it is now an entity. Hit Ctrl-Shift-N, to turn them back o要, and it should reappear. Now using the copy, paste, flip & rotate commands learnt in the last tutorial copy the group to the 3 other sides, so you end up with Figure 10. If the light is getting in the way, use Ctrl-Shift-G, to turn it off, this works separately from other entities.
Figure 10.
If you compile and run the map now, you may notice that some of the water is flowing the wrong way. You have probably guessed that it is the "flowing" property we checked in the surface inspector window that makes the texture flow, and you may also have guessed that the "50" value we put in is the speed. But you are probably wondering what tells it which direction to flow in. Well this is quite simply the texture orientation. Take a look at Figure 11.
Figure 11.
These controls in the surface inspector window control the textures position, size and orientation. If you have the "texture toolbar" enabled in the preferences, you will be able to change them at the bottom of the main window, rather than bring up the surface inspector window.
With most textures and especially the water texture it is very difficult to see which direction it is going to flow. So he is a little trick.
Make a folder in your sof\base directory named textures, and inside this folder another named general. so you end up with something like, "c:\games\sof\base\textures\general" Click here to download the arrow texture, and save it in this directory. Select your 4 water spout brush groups, and then select then menu item Textures>Find/Replace In the "Find" box type "tokyo/water" In the "Replace" box type "general/arrow" Check the "Replace within selected brushes o要ly" option. Now click "Apply" The water texture will now be replaced with the arrow texture WITHOUT losing any of the other surface properties. The direction of the arrow is the direction of flow. To prove this compile and run the map.
Use the above trick, and then rotate the texture o要 each face using the surface inspector, until it looks like Figure 12. I have scaled the arrows by 1/2 to clarify the image. You might find you have to scale them down to see clearly, don't forget to scale back up afterwards.
Figure 12.
When you have checked them all and are happy, (do a compile to double check) use the Find/Replace to change the textures back to "tokyo/water" Finally we want to add some sound. Right-Click o要 the map to drop down the entity list and select target>target_speaker. Center this in the middle of the pool and make it sit just above the fountain, in the side view. Press N while the target_speaker is still selected. to bring up the entity dialogue. Check the "looped-on" box at the top and type "noise" in the "Key" box, and then type "ambient/gen/wtrfx/poollp.wav" in the "Value" box. Press N to close the entity window.
Figure 13.
Save your work and the compile and run the map. All being well you should have something that looks like Figure 13, and should have the running water sound. Move o要 to tutorial 7.
|
|
|