Each game typically finds its own best way, so it’s often done differently in different games (often even in games using the same engine), especially if the player can go underwater, because this means water has significant gameplay implications, and gameplay obviously differs enormously between games.
With modern engines that have a lot of tools, these days how to portray water is an art direction decision more than a technical one, with the usual caveat of beauty-vs-performance often being a tradeoff. It’s also the sort of thing that a technical artist might be tasked with, or a collaboration between departments; the art department needs it to look a certain way, while the design department needs the implementation requirements to not conflict much with how it would be used in maps, while the engineering department might be involved if standard or out-of-the-box techniques are falling short of producing what one of the other departments wants so some special water handling features need to be created.
Typically moving from above water to below water is multiple layers working together: a visual layer of surface from above, another of surface from below, some shoreline interaction stuff, some kind of switch/detection layer to select game-mechanics, visual overlay & atmospherics, sound adjustment, etc, and sometimes a division in the level/map sectors, depending on how it’s implemented
The visual layer typically uses a reflection cube rather than raytracing for reflections because the difference is visually all but imperceptible and the performance advantage is massive. Sometimes the reflection cube might be recalculated from time to time, especially if the scene changes (day to sunset to night, etc)
Latest Answers