Jump to content

Home

retarded question


JerAir1587249581

Recommended Posts

How to make water:

 

1. Before you get started, open up common.shader (in base/shaders/) and add this code to the end of it:

textures/common/caulk_water 
{ 
  surfaceparm water 
  surfaceparm nodraw 
  surfaceparm nonsolid 
  surfaceparm trans 
}

Now download this image and save it as "caulk_water.jpg" in the textures/common/ directory.

 

2. Now you can fire up Radiant.

 

3. Create a brush that is the size and shape of the water you want.

 

4. Using shift+click, select the entire brush.

 

5. Load the "common" texture set by choosing "common" from the textures menu.

 

6. With the brush still selected, apply the caulk_water shader to the entire brush.

 

7. Hit escape to deselect everything.

 

8. Using ctrl+shift+click, select the top surface of the brush. Only select the surface, not the entire brush.

 

9. Texture this surface with the bespin/water2 shader.

 

10. Using ctrl+shift+click, select the bottom surface of the brush. Only select the surface, not the entire brush.

 

11. Texture this surface with the bespin/water2 shader.

 

12. Compile, and that's all there is to it.

Link to comment
Share on other sites

The caulk_water part is a fix for a long-standing Radiant bug. RD's tutorial mentions using regular system/caulk for the sides of your water brushes--most people use system/nodraw instead--but sometimes, if you do it that way, your water will fail at compile time. You'll get weird, unpredictable errors; sometimes you'll have a normal looking surface of water but it's just "air" underneath, sometimes you'll have working "water" but the texture doesn't appear on the top, et cetera. This happens because surface order isn't preserved when .map files are saved--the "first" surface of a brush you want to be a "water" brush must be a "surfaceparm water" surface, or else you get errors. Well, neither system/caulk or system/nodraw have "surfparms water" in them (I mean, why would they? That's not what they're for), so if one of the caulk or nodraw surfaces gets saved as the "first" surface of your water brush, then you're screwed at compile time. This is especially annoying since there is no way to accurately predict what the "first" surface of a brush is going to be.

 

To fix this, you can apply a "surfaceparm water" shader to ALL sides of your brush--that way, there is no way the "first" surface will not be a water surface. However, since you still want it to behave like caulk or nodraw, that's why it's got the "nodraw nonsolid trans" parms as well.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...