Underwater Rendering Issue

LoftyTheMetroid

L1: Registered
Oct 12, 2008
16
0
Hey all, I'm a graduate student working with a team of students developing a Team Fortress 2 map for a class. We're having a rendering issue that we could use some help with.

We have an underwater cavern below the center of our map, and there are no issues if the player is above a midsection in the area. However, if the player is low near the ground and looks up, the above geometry doesn't render.

I've provided some screenshots below:

Near the ground (skybox shows through):

7Tft3HCl.jpg


Moving a little further up, skybox no longer renders, and instead everything is black:

nB7BePEl.jpg


And just above is the "midsection" line, after which the above geometry renders normally:

OHXy93zl.jpg


Looking down from there, you can see where the geometry nicely divides the space into "upper" and "lower" halves. I've tried to draw some lines to point out the exact division, where problems only occur at a height below those lines:

iYGoTPyl.jpg


Any help would be greatly appreciated. I'm not terribly familiar with Hammer, but my guess is that it's either a Visleaf issue or I'm missing some sort of water rendering entity. (Or, perhaps I simply misunderstand how water works and have placed improper water brushes in the space...)

EDIT: I think one of the problems might be that there are water brushes at different heights at different parts of the map. If that's the problem, is there any way around it, or is that a strict limitation in Hammer/Source?
 
Last edited:

colacan

L5: Dapper Member
Apr 14, 2012
235
85
Waterbrushes are not an issue as long as they are NOT expensive. Just use the water_2fort texture or something similar for it, not anything that has expensive in its name if you use multiple levels of water in the same PVS.
 

Samniss Arandeen

L1: Registered
Mar 3, 2013
33
7
To answer your question about water height limitations, no, that is not a hard limit. Cheap water can be at many different heights. However, the expensive, hard-to-render water can't.

That is all. For now.
 

colacan

L5: Dapper Member
Apr 14, 2012
235
85
Technically speaking, expensive water can be at different levels, as long as they are not possibly both visible from one place at the same time. (i.e. in the same PVS)
Also, it's TF2, you should not use expensive water, since it's not a good idea in multiplayer games due to performance drops.
EDIT: Also, you may not use expensive and cheap water in the same PVS.
 
Last edited:

Arne

L3: Member
Nov 22, 2012
114
55
Expensive water is, for best performance, used on low-ground water and scenery water. Take the rivers from HL2: EP2 as a exemple. You shouldn't use any water with a expensive water-surface texture on deep water-brushes.
 

LoftyTheMetroid

L1: Registered
Oct 12, 2008
16
0
Thanks for the responses! I'll boot up Windows/Hammer and try switching out the water texture.

I actually don't need/care about expensive water, I just went with one that seemed appropriate for the environment and didn't have "expensive" in the name. (I think it's the Sawmill water...?) I bet that's the issue, I'll look for a cheap substitute.
 

LoftyTheMetroid

L1: Registered
Oct 12, 2008
16
0
Sorry for the double-post, but I wanted to give a quick update.

First, I tried switching the water texture to something "cheap", so I used the suggested water_2fort. However, I was still getting the same problem, so I made a test project to isolate the issue.

Below are two screenshots from the test project, which has two separate height levels for the water. (And yes, I'd like to keep this aspect of our map if possible, it factors into the map layout and gameplay.) From one side, within the brush with the lower water level, there are rendering problems. From the other side, within the brush with the higher water level, there are no rendering problems. According to the rules linked here, there shouldn't be a problem, right...?

Within lower water level brush:

QOR6WBol.jpg


Within higher water level brush:

MBU7dt5l.jpg


I've also got the test project VMF I used if anyone wants to take a look.

I was able to eventually address the issue somewhat by including a water_lod_control and setting both values to zero, but of course it doesn't look super great. Is this what was meant by "cheap" vs "expensive" water? I thought it was referring to the textures themselves, which I assume are inherently "cheap" or "expensive" (i.e. water_2fort is cheap, whereas water_sawmill [which I was using previously] is expensive). If this isn't true, I must be misunderstanding how water rendering works.
 

Samniss Arandeen

L1: Registered
Mar 3, 2013
33
7
Is this what was meant by "cheap" vs "expensive" water? I thought it was referring to the textures themselves, which I assume are inherently "cheap" or "expensive" (i.e. water_2fort is cheap, whereas water_sawmill [which I was using previously] is expensive). If this isn't true, I must be misunderstanding how water rendering works.

It is. Expensive water is supposed to be super-realistic. TF2 doesn't do realism and it sure as hell could use the render cost savings. Textures have cheap/expensive in their names to denote what they were created for, actual expense is at water_lod_control.

That is all. For now.
 

LoftyTheMetroid

L1: Registered
Oct 12, 2008
16
0
It is. Expensive water is supposed to be super-realistic. TF2 doesn't do realism and it sure as hell could use the render cost savings. Textures have cheap/expensive in their names to denote what they were created for, actual expense is at water_lod_control.

That is all. For now.

That makes sense. I've known/heard about cheap/expensive water in the past, I just always assumed it was an inherent texture thing.

I'll go ahead and throw the water_lod_control in the map and let my students know what's going on with the water. Thanks for the help, everyone.