halflife icon indicating copy to clipboard operation
halflife copied to clipboard

[HL] Barnacle tongues are invisible underwater

Open rjd1922 opened this issue 1 year ago • 5 comments

Barnacle tongues cannot be seen underwater, which can easily blindside players in the maps c2a3a and c3a1a when they are suddenly pulled up by seemingly nothing. 20240718161816_1 c3a1a0000

rjd1922 avatar Jul 18 '24 21:07 rjd1922

Oddly, this issue isn't present in Blue Shift. 20240720230010_1

rjd1922 avatar Jul 21 '24 04:07 rjd1922

This happens because the water in c2a3a and c3a1a is a regular world brush as part of the map's "worldspawn" entity. The water you mention in Blue Shift is a "func_water" entity, which it needs to be so that it can rise when the flow control valve is turned.

The reason for this is that when you pass through a water surface of a world brush (as in c2a3a/c3a1a) the water's surface is also compiled as a visibility portal, as the opaque face couldn't possibly allow anything to be seen the other side of it. (Or so we'd think.) The visibility origin for the barnacle is at the top centre of its body, where it attaches to the ceiling, therefore the whole model is culled from your player visible set. This doesn't happen with "func_water" because the surface of this entity does not compile into a visibility portal.

Not a solution, just an insight into the issue. (We've looked into it already for Sven Co-op, it's not a simple one to solve.)

The same problem will happen without water if a barnacle is placed behind a high wall with a low cutout (e.g. hole for a door): Here is a crude drawing from 7 months ago of the problem: image

This can be replicated in a section of Office Complex: image

Adambean avatar Aug 24 '24 16:08 Adambean

I'm not sure if this is directly related to the reported issue here, but while playing Half-Life multiplayer on the crossfire map, I’ve encountered a similar visual bug. When I walk towards a window, flush up against it and then crouch, both point entities and brush entities outside the window disappear from view, even though they should remain visible. These entities reappear when I rise back to a standing position. Here's a video demonstration of the issue for further context:

https://github.com/user-attachments/assets/a1f31b30-3595-44a5-a6b8-1a1494867cba

OS: Windows 11 x64 GPU: AMD Radeon RX 6900 XT Game Version: 20:26:26 Sep 12 2024 (10185) Video Renderer: OpenGL Video Resolution: 2560x1440 (full screen)

0Ky avatar Oct 03 '24 05:10 0Ky

That's not the exact same issue as the Barnacle one but is kind of related. For studio models in particular they only render when their origin point is not being culled by PVS regardless of how large the model is. This problem becomes more noticeable with larger models such as trees being around the corner of a wall/building.

I don't know why the brush model for the railings is disappearing though. Unless the map's visibility portals have been very over aggressively optimised that brush model shouldn't be getting culled from PVS there. Are you using a non-standard FOV?

Adambean avatar Oct 03 '24 07:10 Adambean

I was using default_fov 100, but I've just tested with the default 90 fov and gl_widescreen_yfov 0, it doesn't make any difference. There's still a clear line of sight from the player's view to the objects and they are not occluded or outside the player's field of view. The issue could be related to an overly aggressive PVS optimization, but I'm not certain.

0Ky avatar Oct 03 '24 11:10 0Ky