[solved] Water made of multiple brushes

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
dichtfux
Posts: 571
Joined: Thu Feb 02, 2006 10:51 pm

[solved] Water made of multiple brushes

Post by dichtfux »

I'm having problems building water of multiple brushes, the place where they meet looks crappy.

I remember having the problem earlier and thought that using the no_draw texture on the sides of the brushes would do the trick and found a post that suggests it should in these forums. This is however not the case for me.

Any suggestions?

Thanks for your time and a happy new year,

spirit

EDIT: no_draw solved the problem but i had a pk3 file of the map lying around that was used instead of the fixed version with no_draw. sorry.
[color=#FFFFFF][url=http://maps.rcmd.org]my FPS maps[/url][/color]
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Post by obsidian »

If you used the nodraw method, it should look fine visually, but you may encounter issues with how the water interacts. If that is the case, then you may have an issue with inconsistent brush shader properties.

The problem with using nodraw and water volumes is that both shaders affect the properties of the brush rather than just the face. The brush may take on the behaviour of water as it is supposed to, or it may behave as it wasn't there at all. The brush itself behaves according to the first shader face listed for that brush in the map file. Since the order of faces changes on a frequent basis, how the brush behaves is entirely unpredictable.

Thankfully, with a slightly modified nodraw shader, we can solve these issues. Add this to your common.shader:

Code: Select all

// Obsidian: 2 usages for watercaulk depending on water brush complexity
// SIMPLE WATER BRUSHES - use watercaulk on faces between water brushes
// COMPLEX WATER BRUSHES - overlap complex water brushes with watercaulk
//	water shader should be nodraw, nonsolid, trans, *no surfaceparm water*
textures/common/watercaulk
{
	qer_trans 0.5
	surfaceparm nodraw
  	surfaceparm nonsolid
  	surfaceparm trans
  	surfaceparm water
}
A little explanation about the comments:

Normally, you add watercaulk between water brushes as you would with nodraw.

But on more complex water volumes, (particularly alphamod blended water volumes) it may be useful to create a water surface shader that just takes care of the appearance of the surface and then create large blocks of overlapping, invisible watercaulk to take care of how the water behaves.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Post by obsidian »

Well then... never mind.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
dichtfux
Posts: 571
Joined: Thu Feb 02, 2006 10:51 pm

Post by dichtfux »

Thanks for the details and your efforts anyways, Obsidian!
[color=#FFFFFF][url=http://maps.rcmd.org]my FPS maps[/url][/color]
Post Reply