Water


(The real Billster) #1

I know how to make water(create a brush texture it with water but if you want to fit the water in an irregular shape (not a square how would you do this?


(SCDS_reyalP) #2

Overlap your ground with the water and/or make your water out of multiple brushes and use nodrawwater on the parts that don’t make up the surface.


(Prophesy) #3

Ah a major breakthrough occured tonight when I finally figured out how to get the foam effect on water seen in Battery. Probably not news to most of you, but for one who is not that familiar with shaders it was a religious experience. To say the least :smiley:

But there was a reason for sharing this with you. I now need to figure out how to edit the direction in which the foam is moving…

I assume the answer to that question might be hidden in these lines somewhere? Does anyone know which numbers to change to change direction of foam-waves?

textures/battery/ocean_1
{
q3map_baseshader textures/battery/ocean_base
cull none
deformVertexes wave 1317 sin 0 2.5 0 0.15
deformVertexes wave 317 sin 0 1.5 0 0.30

{
	map textures/liquids_sd/seawall_specular.tga
	blendFunc GL_ONE GL_ONE
	rgbGen vertex
	tcGen environment
	depthWrite
}

{ 
	map textures/liquids_sd/sea_bright_na.tga
	blendFunc blend
	rgbGen identity
	alphaGen const .8
	tcmod scroll 0.005 0.03

}
{
	map textures/liquids_sd/seawall_foam.tga
	blendFunc GL_SRC_ALPHA GL_ONE
	rgbGen wave sin 0.2 0.1 0 0.2
	alphaGen vertex
	tcMod turb 0 0.05 0 0.15
	tcmod scroll -0.01 0.08
}
{ 
	map textures/liquids_sd/seawall_foam.tga
	blendFunc GL_SRC_ALPHA GL_ONE
	rgbGen wave sin 0.15 0.1 0.1 0.15
	alphaGen vertex
	tcMod turb 0 0.05 0.5 0.15
	tcmod scroll 0.01 0.09

(chavo_one) #4

I would play around with the ‘tcMod turb’ and ‘tcMod scroll’ lines of the seawall_foam stages. For definitions on what these do, see the shader manual.