Assassin’s Creed III (ACIII) follows the story and path of Desmond Miles as he uses the Animus once again to relive the memories of his Assassin ancestors while fighting the Knight Templars. In ACIII the adventure extends for the first time to the ocean, unable to even swim in the first Ubisoft Assassin’s Creed, the gamer can now master entire sea battles. But the job of producing the fluid ‘stage’ on top of which the games action plays out, was no easy task.
“Given the fraction of a cycle time we are allowed, we could render at 200 frames per second if there was only water in shot”
Georges Torres, Senior Technical Director for ACIII, explained that given the fraction of a cycle time they are allowed, his team could render at 200 frames per second if there was only water in shot. In feature films just a decade ago, rendering oceans was reason enough to seek an Oscar. Today Ubisoft’s team has to render complex oceans in realtime, interactively. Actually, Torres says they need to render the water – the ships and game action – much faster than real time to allow for the new AnvilNext Render Engine to still handle the characters, their ships and sails.
Early in the game, in fact before the ACIII game titles are even on screen, we the gamers are at sea traveling to the Americas, but it is the later Naval battles that are particularly impressive. Multiple ships are riding wild waves, while shooting canon fire rains debris of fragmented ships into the water, which is also reflecting water depth, sky conditions, ship wakes and forming crashing ships. Nothing like this has ever been attempted in an Assassin’s Creed and to achieve the shots an entire new water system had to be implemented as part of a new game engine. The game play is not only fresh but the various weather conditions from calm coastal ports to wild ocean storms just look beautiful. The AnvilNext provides – or cheats – refraction, sub-surface scattering, particles, buoyancy, storm conditions and complex atmospherics. The world of ACIII is just stunning. All of this leads to some really thrilling and unusual game play, ships need to be maneuvered to fire, masts come crashing down, as canons rain fire on our hero who can raid other ships, climb rigging and of course do what he does best, stealthily engage a military presence…and fight.
ACIII is a Triple A brand for Ubisoft. There is no doubt that the company, spread across the globe, has really pushed console technology harder than ever before. While it may have been longer than many would like between console revisions, the result is that the technical teams have been able to squeeze out amazing feats by really pushing the current technology hard, something that only comes with experience.
Ubisoft is one of the most successful game’s companies in the world. Ubisoft’s ACIII team has a real strength in environments and balancing art, design, and architecture – especially in this franchise which raids actual history to set the story in historically accurate locations and situations. This chapter of the story takes place in the 18th century. ACIII is currently the biggest franchise at Ubisoft, so the stakes were very high.
The game was built over several years, working from early concepts and historically accurate research. As the battle for the colony was equally a battle to control the eastern seaboard, the opportunity arose to take the action to sea. Early mood boards showed the extraordinary task ahead, capturing a fierce naval battle fully interactively. Early concept art renders were taken and then digitally painted over to really illustrate the detail and props that would be needed. Most complex amongst these was always going to be the water itself, and the lighting of it. The up side would be however that if the team could master all the fluids and fx animation – lit with the skill of the ACIII lighting team – in real time – it would add tremendous high end production value.
The water simulation was handled by the Ubisoft Singapore office, which worked in concert with Canadian teams in Montreal and Québec. Ubisoft is the third largest independent game publisher in Europe, and the third largest in the United States. The company’s largest development studio is Ubisoft Montreal in Canada, which currently employs roughly 2,100 people.
Georges Torres headed the team doing the ocean simulation for navel battles, with key staff such as Andrew Ellem for the the ocean rendering and water interaction, Dhani Susilo on the boat physics and many others like FX artiists Ulf Dahl and Wirginia Romanowska, or technical artists Vishang shah, Yan Geng and Kris KirkPatrick.
The ocean simulation required that the waves had to meet 3 key criteria. They needed to be:
To solve this the team needed new technology in ocean simulation, new game play based on ship physics and they had no reference inside their current game engine. The team worked hard with the new AnvilNext engine. The game’s new engine delivers improved visuals, character models and AI, better water as well as other major improvements – such as much large crowds and battlefields (ten times prior crowds – up to 2000 agents). In an article in CVG UK in March Ubisoft said it’s aiming to make Assassin’s Creed III “look next-gen” on current-gen consoles using the new AnvilNext engine.
ACIII establishes the Eastern seaboard of the United States as a playable area, with missions, side quests, and a hunt involving the treasure of Captain Kidd. As Connor, one can captain a ship, the Aquila, with which the player can engage in naval campaigns everything is highly interactive. The control of the ship relies heavily on environmental factors such as wind direction and speed, local presence of storms, high waves, water conditions and rocks.
As the ocean is used so widely, it needed to be able to easily scaled from flat calm to a complete storm. To provide sensible artist controls, the team mimicked and matched the Beaufort scale. This established wind and storm chart according to the National Weather Service starts at 0 – Calm – “where smoke rises vertically” to say level 6 – Strong breeze, wind 22-27 knots : “Larger waves forming – Whitecaps everywhere” to 12: which is a full Hurricane, winds over 63 knots, waves “16+ m (52+ ft)” and “violent destruction”, and this is exactly how the Ubisoft team built ACIII wave system. Level designers could dial in the weather and all the wave heights, form, spray and destruction would follow. Wave scale height and choppiness are fully artist-controllable. The only major break from reality is that the wind direction did not directly drive the waves, since the wind direction needed to be controlled for game design.
The waves were a combination of layers such as the foam, a normal map, low and high frequency wave patterns, transparency and color information. As mentioned above the developers built a scale 0 to 12 – which describes waves and wind conditions. For each level, just as the real National Weather Service does, Ubisoft Singapore defined a set of wave settings:
– surface scale
– height scale
– foam decay
For example, with the foam they specified a series of key values and looks for 0, 3, 7,12 and the if the game level designer wanted something in between these, the engine can interpolate:
To produce the waves a statistical model based on fourier transform was used, based on Jerry Tessendorf’s work (simulating ocean water). The team precomputed two sets of tiling and cycling wave displacements. These were stored as rgb textures. The water textures were projected from the camera position, thus distant waves are smaller and closer waves larger. The resulting waves are an input for vertex buffers.
The representation of screen space is a grid projected on a flat plane. Each grid vertex is moved by the displacement textures “we get better detail distribution from near to far distance and aliasing is controlled by decoupling the grid projector from the camera” explains Torres.
The wave foam levels are precomputed for each frame at the edge part of the waves. The solution is in effect a combination of pre-process and real time, with some temporal aspects – such as rate of foam disperse all handled in realtime.
This projection also solves the problem of game play guidance. When interacting in battle – a red band is over laid on the water as part of lining up and firing on a rival ship.This is achieved by effectively drawing one particle in projected space from the camera that produce the line when they intersect with the water looking like a red overlay on the waves.
The team also needed additional things when the water came close to land. Water closer to land looks very different from a deep ocean.
Coastal foam: for example there is a need for ‘coastal foam density’ or the foam water aeration that occurs around rocks at waters edge. This was more of an offline process which was built by sampling the terrain topology at regular intervals, and then used the form solution with feathered tapered results to sell the interaction.
The offline process consisted of sampling the terrain topology at regular spacing along the game maps.
The resolution is typically 512×512 for the 4km x 4km maps, this gives a precision of 8 meters roughly.
Additionally, 2d maps are used to represent the terrain heights above and below water. The team applied a series of image Gaussian blurs and Perlin noise to expand the foam level. This creates the fade of foam along the coast.
As the foam is white, three grey scale maps were placed in each of the R, G and B channels and then a color ramp would define the mix between the three course, sparse and medium foam maps. To modulate the foam an artist needs to only color correct the ramp.
- At 0.1 along the color ramp there would would be some red map ‘coarse’ foam not much green map ‘sparse’ foam not much blue ‘medium foam’…versus
- At 0.8 along the same color ramp it would provide all the red map ‘coarse’ foam, all of the green map ‘sparse’ foam and say half the blue ‘medium foam’
Transparency: Shallow water is partly transparent and also lighter in color. The water was tinted and varied in opacity based on a textured ramp (in rgb). Opacity was controlled by a similar ramp so two ramps covered all the control needed. This was mainly used based on distance to shore, but it was also used to fake sub surface scattering (SSS) even in deep water.
Ocean Water normally has some SSS but rendering it would be extremely expensive. To provide the effect the team used a simple SSS test based on viewing position, sun position and surface slope, this would then vary localized ‘shallowness’ or tint/opacity. It is remarkable how effective it is to fake SSS by just making the underside of back lit waves ‘less shallow’ (tint/transparent).
Depth: As water becomes shallower it changes color and at some point allows the view to see the sea floor below. To model this the team came up with two types of water shader level of detail (LOD).
“We use two shaders with different LOD 0 transparent – the complete shader with refraction was costly and was only used in shallow water,” explained Torres. The LOD 1 or opaque version was a simplified water without refraction and transparency. It was cheaper and ideal for deeper water where typically the naval battles occurred and run time cycles were most challenged.
To solve moving from shallow water to deep water without a user noticeable pop, the team produced the water in patches – each patch was either LOD 0 or LOD1. There is then an opacity ramp to blend between. 400m is the rough distance out that the LCD 0 blended to LOD 1.
In the end the water was rendered with:
- Normal map
- Depth & tint
- Refraction and ‘SSS’
- Complex Foam
The team at Ubisoft also had to solve the problem of the ships interacting with the water in a realistic time and covering such issues as drag, buoyancy and water displacement.
“It is a compromise between the real physics and needs for real time”
On board the ship, the sails can be reefed or set fully, providing more speed but reducing maneuverability. To determine the correct interaction the ships needed to bob and break through waves, reflecting buoyancy and immersion displacement. A ship crashing down on a wave pushes the wave down rather than just intersecting it. The wave ‘bends’ around the boat as the hull cuts through the water – it both pushes the water down and pushes back on the motion of the ship, as it displaces water. The difference is remarkable and completely changes the realism of the sequences.
Full detailed collision detection with fluid dynamics and rigid body interactions would be impossible in realtime, but it is effectively simulated by the use of multiple partitioned boxes or ‘buoyancy spheres’. Depending on the ship size, the number of such partitions vary, but an example would be in one battle there was four such huge spheres positioned in theoretical 3D space along each side of the ships which could then inform that ships height in the water and that of the waves. It is important that there is separate spheres on either side to allow for the roll and rocking that a sideways wave would have on a ship. “It is a compromise between the real physics and needs for real time, the boat’s floatation is effectively determined by a bunch of giant buoyant spheres,” says Torres.
In addition, there were depth ‘rods’ or probes that lined the gunnel. These would sense how far up the side the waves were rising and trigger bow waves and spray. The same technique was used for crashing sections of ships blown off by say a cannon. The only difference is that the ships would have a series of depth rods/probes while a flying piece of wood, sail or crew hitting the water would have just one indicator and fire off a water ‘splash’ FX (or spray & foam) to sell the debris hitting the water.
Another aspect of any ship moving through water is the fluid’s resistance. The ship’s drag is a combination of area, the drag co-efficient and ship velocity. The drag co-efficent is simplified by only taking the angle between the velocity and the surface normal into consideration. To simulate this there is a series of sample points along the ship’s hull, these each produce both drag and pushing forces. These sample points are then interpolated and the ship’s progress affected accordingly. A by-product of any forward motion is also the stern wake water interaction. In ACIII the boat trail, “needs to be cheap,” says Torres, hinting at the very complex solutions that have been used to solve this seemingly simple problem. Ubisoft’s team solved this by doing a reveal to the ocean form using a form of level particles. This produces a following wake that can then be moderated with sustain, decay and density to produce a very quick and workable solution.
Attacks are by canon fire, with broadsides and swivel guns. Other vessels can also be rammed, and boarded. The Aquila can be upgraded with more canons, other armaments including chain-shot, grapeshot, heated shot, hull reinforcement and a naval ram. To match this the ships have to react and float on the waves, indicate distance speed and when moving closer to shore, the water need to indicate water depth and proximity to land.
The end result is a stunningly interactive world to explore … at sea. The whole game pushes the technology envelope but the sea and oceans make such a dramatic extension to the world of Assassin’s Creed, and such a visually impressive one.
Join or Die”
Ubisoft Singapore is hiring and always looking for talented artists but it is worth pointing out that a great game like Assasin’s Creed III is a combination of a huge variety of artists and game designers. As Torres himself points out great work such as the naval battles comes form great game design, audio, animation, modeling, texturing, level design, art direction, research, lighting and much more.