A question about water

squ1rrel

L4: Comfortable Member
Apr 11, 2016
167
24
I've read on the wiki about something saying you cannot have water on multiple levels of your map. Could someone elaborate on this more please?

For example: Water 256hu high then a separate brush of water 512hu high. Would this cause glitches or problems?
Ty.
 

Vel0city

func_fish
aa
Dec 6, 2014
1,947
1,589
You can have cheap water on multiple levels. If you do more expensive water (one with cubemaps or real-time reflections) one of the two bodies of water will turn into cheap water while it's being rendered (note, not visible bodies of water can still be rendered making both bodies cheap).
 

squ1rrel

L4: Comfortable Member
Apr 11, 2016
167
24
Ahh so only one body of water with cubemaps will properly work whereas cheap water can be used on multiple levels.
 

henke37

aa
Sep 23, 2011
2,075
515
Note that the limit applies to PVS. You can have expensive water of different levels as long as only one level can be visible at the same time.
 

BigfootBeto

Party Time 2.0!
aa
Jun 8, 2016
496
847
You can see exactly what happens in pl_cliff_edge. At the very beginning, there is a small area of water in front of blu spawn, and then a little further back is a deathpit with water further down. When you stand so that you can see both areas of water at the same time, the game has trouble deciding which water to put transparency on, so the water flickers and goes back and forth between transparent and non transparent.
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,694
2,579
I think cheap water also has no internal fog (although you can set a color that it applies uniformly to everything under it, just like if it were colored glass) and no refractions. If it were just the reflections thing then it wouldn't even matter because by default, all water materials in TF2 use cubemap reflections for performance and/or stylistic reasons.
 

[Rx.] Christian Troy

L5: Dapper Member
Jan 23, 2017
223
64
How do we properly separate waters? In one of my maps there are 2 sinks with water in buildings and a main body of water outside of them. The main body of water reflects fine most times but if you are inside the buildings near the sinks, it's reflections change.
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,694
2,579
For things like sinks or fountains just use cheap water since the lack of fog or refractions won't be noticeable. Even if you don't have regular water anywhere on your map, this is my recommendation.
 

Tumby

aa
May 12, 2013
1,084
1,192
Fog is exactly what breaks when using multiple waterheights.
Cheap water not having fog comes from the fact that cheap water uses a different, cheaper shader than water, which does not allow fog. This can be lightmappedgeneric or unlitgeneric.
You can see how both 2fort's skybox water and hydro's water look extremely different: One is opaque and the other is transparent. One has cubemap reflections the other has none. And yet, none have fog, as they are both cheap.

Using multiple water-brushes will result in the game using the closest water-brush for the underwater fog settings. Therefore, using multiple different water textures, and especially different heights, will cause fog to break for waterbrushes that are further away.
 

squ1rrel

L4: Comfortable Member
Apr 11, 2016
167
24
So while browsing water textures, it comes up with ones that say 'cheap' then the standard ones and 'expensive' textures. For example the expensive 2fort water texture. (very reflective and pretty)
My question is: How different are these 'expensive' versions compared to the standard water textures? (which still use fog and cubemaps)
 

Crowbar

Spiritual preprocessor
aa
Dec 19, 2015
1,455
1,297
"Standard"? AFAIK, there are "cheap" ones and "expensive" ones. Latter use pretty features, former don't. No in-between.
 

squ1rrel

L4: Comfortable Member
Apr 11, 2016
167
24
But there's a "water_2fort_skybox" with the word 'cheap' on the texture preview, "water_2fort" and "water_2fort_expensive" with 'expensive' on the texture preview.
 

Viemärirotta

sniffer
aa
Feb 5, 2016
1,013
590
But there's a "water_2fort_skybox" with the word 'cheap' on the texture preview, "water_2fort" and "water_2fort_expensive" with 'expensive' on the texture preview.
The ones without cheap nor expensive are the ones that transition from expensive to cheap between a distance set by the water_lod entity. Cheap water textures force cheap water and the same for textures with expensive.
 

Vel0city

func_fish
aa
Dec 6, 2014
1,947
1,589
Cheap water has no reflections, no refractions, no fog, nothing. "Normal" water has fog, refractions and cubemapped reflections. Expensive water has fog, refractions and real-time reflections. It's called expensive becuase the reflections are rendered during runtime instead of being pre-calculated like cubemaps. It takes more GPU power to render.
 

squ1rrel

L4: Comfortable Member
Apr 11, 2016
167
24
Ohh ok thanks guys.