DF Retro: The history of water rendering in classic games
A refreshing antidote to the summer heatwave.
Fire up any recent game and if it features water in any capacity, chances are good that it'll look suitably refreshing. While actual fluid simulation remains computationally expensive, the visual representation of water has continued to evolve and impress for years. It's fair to say that water looks great in most game today but if you dive back into the early days of gaming, water is one of those things that has always been difficult to get right. In this DF Retro special - with more titles examined in-depth in the embedded videos on this page - I take a look at the standout water implementations across 15 years of classic gaming.
Now, something to keep in mind as we progress through the annals of virtual water is that there are basically three elements which make up the display of water in games. There's the visual element of the water surface including the animation and reflection of light, there are the wave patterns and finally, there's the rendering of underwater segments. Some games focus on just one while others attempt to simulate all aspects of water. Most older retro games typically focus on just one element.
Back in the 2D era, effectiveness of water rendering would vary from game to game, but the fundamental concept was based on the same technique: hardware registers would be manipulated during the frame refresh to change colours, effectively cutting the screen into two - above water and below. Beyond that, fascinating tricks were used to add authenticity to the effect. This scanline trick is used in Vice Project Doom - a late NES release, where reflections, ripples and indeed, the entire parallax background effect are displayed using mid-frame register writes.
Batman: Return of the Joker for Nintendo Game Boy is another great example. Lines are manipulated in groups of two, allowing the developers to create a warping effect as if water were passing in front of the scenery. This is combined with a pulsing effect were the water is blanked out every other frame. Thanks to the slow pixel response of the original Game Boy's LCD, it helps give the impression of transparency since the screen can't update fast enough between frames. It sort of blends together.
16-bit consoles opened greater possibilities when it came to displaying water. Games such as Sonic the Hedgehog for the Sega Genesis made use of its own mid-frame register writes or raster effects to change the color palette at a defined point during the screen refresh. This enables large bodies of water to appear differently than the surface without requiring bespoke tiles. It's even possible to manipulate scanlines to create this underwater ripple effect.
On the Super NES, the introduction of colour math allowed developers to utilise bespoke foreground layers specifically for water. With the right values, you could create the illusion of true transparency and it looks great. This also applies to games like Secret of Mana with its rivers and streams. Donkey Kong Country is renowned for its underwater stages but it's just smart use of the hardware: the foreground makes use of a scanline effect to create the illusion of ripples while line scrolling of the background plane allows for increased depth. What sells this is the colour palette choice. The sequels took this even further.
Processing power was limited during PS1 and Saturn era and most water surfaces in 3D games were treated as simple planar surfaces with artist-generated textures applied to their surface. The original Panzer Dragoon, released in Japan in early 1995, is one of the first examples that comes to mind. The first stage roughly simulates the appearance of a large body of water with associated reflections. The Saturn's second video display processor manipulates this plane on a per-line basis to give the illusion of waves while textures, designed to appear warped, are manually placed beneath scenery to simulate reflections. This technique was used again in both Panzer Dragoon sequels and would also crop up in the epic JRPG Grandia. The warping and rippling effect seen in the original Saturn release is completely absent from the PlayStation port of this game.
Tomb Raider is another interesting example - while its water surface is a simple transparent texture, Core Design attempted to simulate water refraction by warping the vertices designated for underwater zones. The Saturn version has the edge here over its PlayStation counterpart as you can see geometry distortion. It's crude but it does give the impression of water refraction.
As impressive as these games are, no game made waves in this space quite like Nintendo's Wave Race 64 - one of the very first titles to build a full 3D water simulation using GPU hardware acceleration. The idea is simple - the plane on which the player races is represented using a triangular mesh. Using various equations, the developers can dynamically undulate this polygonal mesh which gives the impression of waves. The jet skis then are designed to collide with this surface simulating buoyancy in the process. In motion, the effect is remarkably convincing. While it's true that Wave Race 64 runs at a not-so blistering 20 frames per second, it was perhaps the first game of its kind to properly simulate the effect of waves in a 3D space on player movement.
Moving into the next console generation, there aren't actually a lot of Dreamcast games pushing boundaries in the area of water rendering. The arcade port of Hydro Thunder looks nice but what else is there? Well, one of the very best examples of 90s-style water rendering is found in Ecco the Dolphin: Defender of the Future. The basic makeup here is simple - the water surface is still just a large flat plane with a nicely animated texture applied. Where the game comes alive, however, is below the ocean surface. The combination of depth fog, water caustics and great texture work really helps bring the world of Ecco to life. I'd actually recommend checking this title out on PlayStation 2 - the frame-rate is much, much higher.
PlayStation 2's unique hardware architecture opened many doors to developers. The design features two key components - the Emotion Engine and the Graphics Synthesizer. The former features a pair of vector processing units, VU0 and VU1, which are basically DSPs designed for fast 3D math - almost like a precursor to a vertex shader pipeline. Knowing this, developers could use the vector units to aid with water calculations, generating vertex distortions when Ico jumps into a pool of water, for example.
Over time, interactive water meshes would become increasingly common the system. Even games like Neo Contra featured areas with simple interactive water meshes but perhaps one of the best examples of this can be seen in Baldur's Gate Dark Alliance. Dark Alliance itself is a bit of a technical masterpiece featuring a smooth 60fps frame-rate, hugely complex geometry and the best image quality on PlayStation 2. What makes this title stand out is the quality of the water ripples used in the game: every game object can interact with every water surface, with all actors producing ripples while moving through it. This can lead to some dramatic effects during a hectic battle and the game simply never, ever slows down. Even today, the fluidity of the water in Dark Alliance stands the test of time. It looks stunning,
With the introduction of Nintendo GameCube and Microsoft Xbox in the fall of 2001, new doors were open to developers and impressive visual effects were soon to follow. Xbox introduced the console world to programmable shaders while the GameCube offered its own unique feature set, utilised beautifully in highly innovative ways - especially by Nintendo's first and second-party studios.
Wave Race Blue Storm follows up and expands upon the interactive water simulation found in the N64 game. The first thing you notice is the addition of full-scene reflections - an element lacking on Nintendo 64. As you race, the environment is reflected and distorted across the surface of the water. It looks fantastic but how exactly is this achieved? Well, the reflections appear to take advantage of an embedded frame-buffer trick in which the current scene is used as input for the EFB, where it can be manipulated and re-integrated with the main scene for each frame.
From what I understand, this idea of writing memory contents to an intermediate buffer and manipulating the contents is rather common today in the form of render targets. The basic idea involves storing the various buffers required for things such as a deferred renderer or complex surface effects then using them to create the desired result. You can render to a texture, manipulate the texture using pixel shaders then utilise the results in your main scene.
Then there is the wave simulation itself - with the increased polygon crunching power of the GameCube, NST greatly increases the density of the water mesh while pushing its view distance out further from the player. Racers all interact with the water surface as well producing both polygonal water trails while exhibiting realistic buoyancy. Beyond this, the water surface itself features an animated surface texture to further increase the sense of realism. Taken together, the result remains impressive to behold. The smooth waves and ripples vary greatly from track to track and the simulation feels suitably realistic. This title was a great way to launch the Nintendo GameCube and to demonstrate its capabilities.
Less than a year later, Nintendo released the next mainline Mario adventure - Super Mario Sunshine. Unlike your typical Mario adventure, Sunshine focused on a singular island and its surrounding lands. It also features Fludd - a back-mounted water cannon that Mario uses throughout the game. Ask anyone about the topic of water in video games and Mario Sunshine is typically one of the first games mentioned. Water plays a huge role in Mario Sunshine and it looks excellent. The beautiful waves and sparkling surface are gorgeous to behold but, how was it done?
The water, like many things in graphics rendering, is a combination of careful design and clever techniques and one aspect of it has already been examined in detail by a software engineer known as Jasper St Pierre over on his blog Clean Rinse. A clever mip-map trick is used to create the illusion of sparkling water, combined with water refractions above and below the surface, in addition to specific areas receiving full-screen reflections, with a separate opaque surface generating a distortion effect. Then there is the wave simulation - while not as robust as Wave Race, it manages to look great. The water surface produces a smooth wave pattern causing the water to lap up on the shore.
And finally, in addition to all of that, there's the goop that Mario cleans up during the game that appears reminiscent of what we would later see in the Splatoon series. There's also the Fludd water cannon itself and the water spray which even uses an EFB copy to display Mario's reflection in puddles made by the water cannon. It doesn't even stop there - there's the goop that Mario cleans up during the game that appears reminiscent of what we would later see in the Splatoon series. It's all really cool stuff but difficult to explain without visual aids - in the second video embedded on this page, you'll see animated examples of how all of the component elements come together, but suffice to say, it's a remarkable achievement.
Beyond the GameCube, we move onto Xbox and the emergence of programmable pixel shaders - code that effectives allows developers to address the GPU directly rather than relying on, or expertly exploiting, the fixed hardware functions built into console hardware. The OG Xbox had some impressive moments in the original Halo and the under-rated Blinx titles, before we move towards the last-gen era. From here on out, with the GPU power available to developers, water simulation reached a new level, but there are still some standout titles - Halo 3 featured one of the best implementations of the era, and actually seemed to regress in 343's later titles. It's a reminder that different developers have varying objectives and deploy a finite level of GPU power in different directions, depending on their priorities. Last-gen also played host to the phenomenal Uncharted 3 ship sequence, but even lesser-known titles had the capacity to surprise.
Take Hydrophobia, developed by Blade Interactive and based on its bespoke HydroEngine. The basic idea here is that water is completely dynamic - fluid dynamics are simulated using a combination of geometry and surface effects but what sets it apart is the way in which it behaves. The water mimics the behavior of liquid - it can fill a room or be drained based on what's happening around the player. This allows the developer to play around with rising and falling water levels to create some harrowing sequences. Open a door and water will realistically spill out, while a break in the hull can have the opposite effect with previous open hallways filling with water as you make your way through the stage.
Beyond the simulation, Hydrophobia also presents beautiful reflection and refraction effects. It has an appearance reminiscent of Bioshock - another last-gen game with a superb water implementation - but it is far more dynamic and systems-driven. I can't say the game itself is a resounding success, but I was really impressed by the ambition of this project. It's been eight years since the game was originally released and while we often see highly impressive fluid simulation PC demos from the like of Nvidia, we're still not seeing games attempt this type of fidelity as a core element of the experience. Water implementations began by offering graphical tricks backed by minor tweaks to gameplay, but generally speaking, in later years it's the level of interaction that really makes for a memorable experience - and something we hope to see explored further in the next wave of console hardware.
Digital Foundry specialises in technical analysis of gaming hardware and software, using state-of-the-art capture systems and bespoke software to show you how well games and hardware run, visualising precisely what they're capable of. In order to show you what 4K gaming actually looks like we needed to build our own platform to supply high quality 4K video for offline viewing. So we did.
Our videos are multi-gigabyte files and we've chosen a high quality provider to ensure fast downloads. However, that bandwidth isn't free and so we charge a small monthly subscription fee of £4.50. We think it's a small price to pay for unlimited access to top-tier quality encodes of our content. Thank you.Support Digital Foundry