WHAT'S IN THE WATER?
The water in BioShock is one of the most fascinating aspects, technically and visually, of the game. I would argue it's the most realistic water I've ever seen in game. And, as Rapture is an underwater city, and is drowning as your character enters it, water is, of course, an integral part of the story.
Today we're going to focus on water, first with a video that highlights some water in Rapture, and then with a Q&A I had two water gurus at Irrational: Stephan Alexander, FX Artist, and Jesse Johnson, Graphics Programmer. They were very excited to talk about all aspects of building the water in BioShock, so I hope you enjoy.
Download a HD .zip of the movie.
Q&A WITH STEPHEN AND JESSE
How much of the DX10 technology will you be using for water effects?
JJ: All the water effects in the game were developed to work on both DX9 and DX10 technology. Where applicable DX10 is used to accelerate the performance of some of the effects, and this may allow more detailed water in some areas.
What did you do to get the water effects this realistic? Have you got your own water lab at Irrational Games, where you played with water? Did you go outside and watch spots with a lot of water?
JJ: A lot of the programming comes down to just doing the right research. Many of the algorithms we use in video games today, as well as in real-time rendering in general, have already been around in non-real-time forms for quite a while. So one of the biggest challenges we face is finding the algorithms that are suitable to real time rendering and then adapting them to our needs, adapting them to modern graphics hardware, and making them run at 30+ fps.
Of course, there are a lot of times when research just comes up completely dry, especially working with next-gen hardware. Whenever this happens, Stephen and I will think through the problem, drawing on real life examples when necessary, then sit down together and draft up a sort of a baseline approach we are going to try and take to solve it. If the approach works, Stephen will take the technology and try to push it to its limits. As he encounters technological restrictions, I’ll go back and address them with additional code. If the approach doesn’t work altogether, then it’s back to the drawing board.
SA: The key to the artistic side of the water in the game basically comes down to lots of observation followed by experimentation with numerous techniques. You really just use all the various tricks available in the tech to recreate what you see around you in nature. Lots of watching water spew out of gutters, cascade over rocks, pour out of fountains, etc.
As Jesse mentioned, there's a lot of back and forth in our process. It all comes down to being as creative as possible with what we have, and then coming up with new functionality where we fall short.
Will the water level change during the game or at certain places?
JJ: Yes. Rapture is in such a state of ruin that it is literally falling apart around you, and you are constantly reminded of that. At certain times, ocean windows will crack and start spurting jets of water, entire tunnel sections will collapse causing their emergency containment doors to bow out and leak under the pressure of ocean, and even indoor structures like pools and tanks that were built to contain water will break.
SA: As Jesse says, there are a few instances where we change the water level on the player.
In which ways are enemies or other characters able to interact with water?
SA: Water conducts electricity, which can be deadly, and it puts out fires, so a burning AI will run to the nearest pool of water and dive in if there's one close enough (spewing out an appropriate cloud of steam).
How far is the viewing distance into the open sea? I fear that I will see some fish and after a few meters I stare at a "ocean texture wallpaper", when I look out of the window.
SA: This really depends on the view and what we were trying to achieve visually in that space. The more going on inside, the less we can do outside, so it really varies depending on the scene. In some cases you can see quite far, in others not as much.
Are some marine life forms trapped inside the city of Rapture?
SA: With all that water coming in, it's inevitable that you'll encounter a few unfortunate fish.
How do PC and 360 differ in terms of water effects? What is possible on PC and not on 360?
JJ: The PC and the 360 versions of the water effects are nearly identical.
Will their be any completely flooded places? I know we've seen flooded bathrooms, but will there be entire city sects covered in water?
SA: There are numerous types and amounts of flooding in the game, but there's no place where an entire level has been completely flooded.
What about this new generation of technology has allowed you to make the water look so much better compared with other games out, in the past and right now?
JJ: With regards to comparing the new generation of technology to the past, a combination of three things are enabling these advancements: raw improvements in hardware speed, a larger number of resources we can work with simultaneously (like textures, for example), as well as completely new functionality.
The raw improvements in speed allow us to keep more water on the screen at once. It’s the difference between being able to put a puddle in each room, versus being able to flood each room completely while at the same time having water trickle down walls, burst out of pipes, and splash as it comes in contact with the game world.
Having a larger number of resources to work with means that we can add a lot more detail to the water, as well as have a lot more control over how it looks and behaves. We can make the water flow and animate more realistically, simulate multiple layers of water interacting, and we can create more types of water (from the crystal clear to the heavily polluted). It even allows us to do things as complex as have water flowing over a wall realistically and move over the bumps and into the cracks on that wall.
With some of the completely new functionality, we can do some very savvy things that are more of a quantum leap from the last generation of technology than just an evolution of it. In terms of the water specifically, its allowed us to create water effects that can react naturally to characters and objects in the game, such as splashing off of them when they move through waterfalls.
SA: From the art side, with better technology your tool set just expands. Having particles that can have per pixel lighting effects, multiple overlapping layers of waves, real-time reflections, very convincing specular highlighting, and other technical tricks give you numerous ways to achieve the visual results you want.
It has been mentioned that water is done on a particle system. Can you give a few examples of the dynamics and physics involved with this kind of system?
JJ: Particle systems were used to create several (but not all) of the special water effects in Bioshock. A particle system, at its core essence, is fairly simple and straightforward. A visual effect, such as a drop of water falling from the ceiling to the floor, is represented inside of a particle system as a single point with properties such as mass and velocity that dictate how that point is supposed to move and interact in the world around it. The particle system controls a collection of these points, including creating new ones and updating the parameters of old ones.
The dynamics and physics involved in any particular particle system are actually extremely open ended. Our “basic” particle system has more than 100 individual parameters that can be modified to produce an almost unlimited number of effects. Artists can control parameters that dictate everything from particle size, color, opacity, and each particle’s general visual appearance, to movement parameters like acceleration, velocity, direction, how particles handle colliding with other objects in the game, etc.
SA: The particle system is kind of a Jack-of-all-Trades. It can be used for everything from fire to electricity to water. It's really about adjusting all the various parameters available to recreate the motion of the phenomena you are trying to simulate. Our particle system has some pretty cool additions, such as the aforementioned per pixel lighting. This is especially useful on things like water drips and foam, which can be made to appear shiny and react to light. This really makes the effects seem like they are anchored in the world.
Will there be water in 3D waves where appropriate (such as around the lighthouse?)
JJ: So much of the game’s focus is based around the water inside of Rapture (where 3D waves are not appropriate), that we have not specifically created 3D wave code for the few scenes where they are appropriate. It is always hard to justify spending a large amount of time for a relatively limited of game play, so we focus our efforts on the situations that the players will encounter most often.
By the time any game ships, the team working on it always has a lengthy list of ‘wish list’ features that for various reasons did not find their way into the final
Will bodies float?
JJ: Yes! One of our programmers, Josh Downer, actually created a buoyancy system that works for all of the objects you interact with in the game, not just dead bodies.
Will there be a difference in the water effects if you are using DX9 or DX10?
JJ: Depending on the performance gain on DX10 hardware, there will potentially be some additional details and effects enabled on these cards.
How much of the water effects were programmed for specific situations, and what percentage of the game’s water relies on a general model of water behavior?
JJ: As far as the actual programming is concerned, probably the most accurate thing we can say is that our systems for water effects were adapted and extended over time to cover the situations we needed them too, leaving us with a few flexible systems that are capable of covering a wide range of different scenarios. The approach we took in creating the water was a highly iterative one. We started off with a few basic, general models of water, and as we found places in the game where those models were not enough, or “would have been cooler if …,” we either extended the original models or, whenever absolutely necessary, created new ones to handle those cases.
For example, at one point we realized that when the player walked in and out of water nothing particularly cool would happen to their view. Since we didn’t have any technology readily available to handle this, we actually did create a new system that would display waves of water as well as water droplets over the player’s view, giving the player much more natural sense that they are really interacting with the water around them. Sometimes the situations we encountered needed much simpler additions. As an example, in some scenes we needed the ability for water to have an arbitrary color tint. Something like this typically involved adding a few lines of code to our base water models, extending their general capabilities and making them more flexible for future use in the process.
SA: Almost all of the various water effects in the game rely on a set of core technology. The trick is in finding ways to use that technology to create as wide a variety of water behavior as possible. The water effects are created with a very specific result in mind, but it all emerges from some fundamental tools that are provided by the programming team.






