Posted by: Bulk
Date posted: Nov 22 2004 User Rating: 4.5 out of 5.0 | Number of views: 22509 Number of comments: 1 | Description: A quick guide on how to make that really fantastic looking water from Half Life 2/Counter Strike. |
This tutorial assumes you have basic knowledge of Hammer, either from Half-Life 1, or Source engine level design experience. You are expected to know how to place and create brush based entities, and know how to make at least a simple room.
By the end of the tutorial, you should be able to understand how water works, and its limitations.
There is an example map available; however this tutorial will assume you are building it all from scratch.
Water is a pretty simple effect to make, however because it is so expensive to render in the engine, there are some limitations that will dictate how you make and use water in a level.
Firstly, there are two separate types of water, "Expensive" and "Cheap". Expensive water is the best looking, but takes up more system resources to render. It will reflect the world, animate the surface, and generally look pretty damn cool. Cheap water, as the name suggests, takes far less resources than the expensive variety. It doesn't reflect anything, and is generally far uglier. Expensive water will fall back to the cheap kind if the card does not support the spiffy features of expensive water, and will be rendered as cheap if the user changes the visual quality settings in the options.
The limitations
In each visibility area (known as a PVS, or Potentially Visible Set), there can only be one water level. This means you can't for instance make a layered pond or something similar. You can however have different levels if the engine can't see one body of water at one level to the other body at the different level.
Secondly, you cannot have expensive and cheap water in the same PVS. You can manually create cheap water by using a material that forces cheap water, but unless you really need to it's not recommended. Who wants ugly water?
Lastly, water cannot slope in the Z-Axis. What that means in English is that you can't, for instance, make a flowing body of water that runs down a slope.
The easy part
Now we come to actually making the water, and that couldn't be simpler. All you need to do is create your brush, cover it in a water material (I like "nature/water_canals_water2". Now you need to cover all sides of the brush apart from the top face with the material "toos/nodraw". Then just give it something nice to sit in (I made a nice outdoor pond in the example map). Note: do not make the brush in to a func_water entity; the shader does all the work.
There remains one last thing to do, and that's creating an entity to control the level of detail for our water. So go ahead and place a water_lod_control entity anywhere in the level. Its settings are pretty straight forward, and I don't think they need explaining here. Note: if you don't intend to change the LOD (level of detail) settings away from the defaults, you don't need to place this entity; the compiler will add it for you if it doesn't detect it.
All you need to do now is sit back and enjoy your water.
That's it for this tutorial. It's all pretty straight forward but if you have any questions (or spot any omissions/mistakes), post them in the comments below. |
|
User Comments
Showing comments 1-1
You must register to post a comment. If you have already registered, you must login.
|
297 Approved Articless
8 Pending Articles
3940 Registered Members
0 People Online (2 guests)
|
|