Half-Life 2

Half-Life 2

View Stats:
aprilmoon Nov 22, 2024 @ 12:56pm
Reflections in upgraded HL2
Ok, so what did they do to reflections? Are they using some fancy version of SSR? But SSR shouldn't work as reflections do in this version of the game. I am asking because as far as I know you can get reflections of objects not visible on the screeen only with 2nd camera rendering whole scene from different perspective (this is how Naughty Dog mirrors work) or with RT. But here I realized you can see objects (I have only small sample because I did spot it in canals so mostly looked at containers/boxes) reflected in the water that are not in camera view (so you don't see the reflected object on your screed. How did they do it?
< >
Showing 1-6 of 6 comments
Doc Shinpao Nov 22, 2024 @ 1:20pm 
Cubemap I believe.
aprilmoon Nov 22, 2024 @ 1:37pm 
Originally posted by Doc Shinpao:
Cubemap I believe.

ok, for some reason I thought cubemaps don't work on water. But it makes sense. Thanks.
Doc Shinpao Nov 22, 2024 @ 2:29pm 
There are three types of reflections in the settings:
Simple
The World
Everything
(May not be exactly that as I'm roughly translating to english since my game isn't in this language)


If I'm not mistaken, "World" would reflect only the geometry and some non-physical objects, while "All" also includes props and various physical objects.

I don't remember what "Simple" reflects, but I suppose it is a very limited version of "World".

Anyway, for a long time, the default option was "The World". But since 20th Anniversary update, "Everything" is now the default reflection setting.
I remember that there are some areas in the game, like the canal levels, where some geometry is LITERALLY mirrored underwater and is visible only because of "coding stuff in the rendered which allows you to see them not as 100% solid stuff poking out like a bug, but drawn on the water's surface".


I commented here because I was looking for an actual source for this, because "I remember a video I was 7 years ago talk about this" is NOT a good enough source.
Originally posted by Isaac Clarke S-laughter:
I remember that there are some areas in the game, like the canal levels, where some geometry is LITERALLY mirrored underwater and is visible only because of "coding stuff in the rendered which allows you to see them not as 100% solid stuff poking out like a bug, but drawn on the water's surface".


I commented here because I was looking for an actual source for this, because "I remember a video I was 7 years ago talk about this" is NOT a good enough source.
Ok, long story short: No.

I was mistaken. Maybe there is something else about HL2 that had this done for SOME reflections, but the Source Engine just does Real Time Reflections by "re-rendering with a camera *from the water's POV* to make real time reflections (for better & worse, sometime something may become invisible from a certain position)".

Source:
https://youtu.be/haEnMYAL-ho


"Extreme" example of what can be done:
https://youtu.be/PhVdu8lBqyM
Taehl Jan 11 @ 4:55pm 
No, there are no Screen Space Reflections (SSR). HL2 used cubemaps (environment maps) for almost all of its reflections, with the exception of ("expensive") water: Water reflections are essentially rendered using a separate, carefully-positioned camera (not from Gordon's eyes), and a third camera renders the underwater part.

IIRC, they talk about it in a Commentary node near the start of Lost Coast.
Last edited by Taehl; Jan 11 @ 4:56pm
< >
Showing 1-6 of 6 comments
Per page: 1530 50

Date Posted: Nov 22, 2024 @ 12:56pm
Posts: 6