Gaming Features stub

AC4: Black Flag Graphics Tech Explained - "The Most Realistic Virtual Ocean You've Ever Seen"

Posted on October 18, 2013

In a recent blog post by nVidia's Tony Tamasi and video blog by Assassin's Creed 4 Associate Producer Sylvain Trottier, we've been given deeper technical insight into AC4's driving technologies. From a hardware enthusiast perspective, such videos help us understand and visualize the many acronyms that plague PC graphics, "putting a face to the names," as it were.


In this detailed post, we'll explore the actual real-world meaning of Volumetric FX (fog, smoke), horizon-based ambient occlusion (HBAO), Percentage-Closer Soft Shadows (PCSS), new dynamic lighting FX, and graphics tech in AC4. First, let's start with the new AC4 video that showcases these technologies in action:


A lot of the highlighted technologies have been demonstrated before. For those who recall the CryEngine 3 and UE4 tech demos, tessellation, volumetric particle FX, and self-shading volumetric FX were all big deals at the time.

Exploring Assassin's Creed 4: Black Flag's Technology - Weather System, Particle FX

Assassin's Creed 4: Black Flag has a complicated, highly-detailed weather system integrated with its AnvilNext game engine. From a hardware-interaction and video game graphics standpoint, it's one of the most complicated weather systems we've ever seen in a game. This results in fully-dynamic environments with, for instance, foliage, cloth materials, and waves that actively respond to weather and wind simulations. Each individual plant reacts to the wind and player's gust as he rushes past.

Let's start with something easier to explain, like Volumetric Particle FX and volumetric shading (self-shading volumetric clouds). As the name suggest, volumetric particle effects are environmental or atmospheric elements that are voluminous in representation. Clouds, fog, and smoke are the most common examples of effects which present a volume.

Before we had 'real' volumetric particle effects, game developers would fake it by using multiple layers of interlaced 2D sprites. Counter-Strike is a fantastic example of this: In CS 1.6, smoke from smoke grenades was rendered using overlapped, two-dimensional sprites that intersected across two planes; when combined and interlaced, this produced a fake smoke effect that used minimal system resources and created the desired semi-concealment opacity. There were never any actual particles in these smoke clouds.

In modern times, GPUs and IGPs are capable of rendering more intense FX with actual volume and individual particles (rather than 2D sprite sheets). Assassin's Creed 4, running on the AnvilNext engine, is capable of individually drawing each particle in the sequence and, very impressively, lighting and shading each particle individually. Ocean spray from splashing or waves, for instance, renders individually-simulated, physically-tracked, and individually-lit liquid particles. The game's rain droplets (even in a downpour) are all individually-drawn and interact independently with the scene's light sources, wind, materials, and object collision events.

Further on this front, AC4 simulates puddles and ripples in real-time; pools of standing water (or any water, actually, including the ocean) respond to the wind's direction and strength. Downpour and ocean spray are projected on appropriate angles in response to active wind patterns.

Much of this is GPU-intensive, especially where using PhysX-enabled video hardware; physics simulations will likely be offloaded to the CPU (informed speculation) in the event a card is incapable of computationally-tracking physics effects.

As for self-shading volumetric FX, this is also something we've discussed in the past when talking about GRID 2's utilization of Haswell's IGP to render self-shading smoke. In rendering tech, self-shading smoke is when a smoke cloud's own volume can cast shadows upon itself. Think of the smoke cloud produced by a large fire in the real world, with the source of light being at an angle and above (the sun): The smoke isn't transparent to the sun, nor is it opaque. The sun can't "see" clear through the smoke. As such, a plume of smoke -- IRL, as it were -- will cast shadows upon itself given the nature of being a non-opaque gaseous cloud with volume. Thicker parts of the smoke will have darker shadows on the underside and deep in the center, in essence.

In graphics rendering, this isn't a trivial feat to simulate: it's resource-intensive, computationally-complex, and requires new render pipelines and methodologies that didn't exist until the last few years. There are different development methodologies (out of the scope for this site, but found here) for rendering self-shadowing volumetric clouds. Games will often render-out the slices of the volumetric cloud from the light's POV and the camera's POV (player), store this information in video RAM, and then reference the data to make computations for what the player sees. The end result is something like this:


As this technology moves forward, in combination with the higher-resolution textures that games are now shipping with, we'll see an increased demand for on-card RAM for the GPU.

Volumetric shadowing applies heavily in the case of AC4, which will make use of it in smoke, fog, and ocean scenes. Let's talk about fog for a moment: AC4: Black Flag, for the unfamiliar, is situated in the Caribbean; as a tropical environment, fog rolls into towns at certain hours of the day and is simulated based upon the game's built-in weather patterns. When encountering fog in-game, you'll notice that the volumetric fog particles respond to multiple light sources in the towns. A torch in the middle of a thick cloud of fog will cast its light upon surrounding particles in a fashion that produces the expected results in the real-world (obscured / blurred light source, brighter flickering immediately surrounding the torch, a lit circle on the ground, and cascaded light effects as you get further from the source).

AC4: Black Flag - Dynamic Lighting, Screen-Space Reflection, Sea Tech

Illumination in AC4 bounces around the scene respondent to materials and atmospheric effects. The game's dynamic lighting elements (already touched on in the fog discussion) are also fairly complex. AC4's engine computes the shaders for the aforementioned dynamic ripples and puddles, so when the player stands looming over a pool of water, the character's reflection will be rendered and obfuscated appropriately, based on atmospheric events and light sources.

AC4-oceanAC4's water shaders at work, producing a realistic sea floor with responsive shadowing.

Shallow water shaders are overlayed in ocean environments and ensure the sea is simulated in a fashion that resembles the Caribbean's unique mix of dark- and light colors, based upon depth and location. Deeper parts of the ocean will appear darker and more ominous, with starker shadows and more visual obfuscation at greater depths, while shoreline shallows are more transparent, allowing the player to see through to the ocean floor and underlying plants. The plants, again, respond to ocean waves and player movement.

As for Ambient Occlusion technologies, AC4 utilizes nVidia's proprietary HBAO+ (horizon-based AO) tech. Ambient Occlusion is the approximation of illumination and light radiation as it interacts with surfaces. When you see a dirt trail respond to light in predictable means in a modern game, that's likely the work of some underlying AO technology (there are multiple, including proprietary options - HDAO & HBAO - from AMD/NVIDIA). AC4 uses high-resolution shadows and nVidia's recently-upgraded HBAO+, which realistically generates shadows respondent to objects occluding light sources.

Take an example: In AC4, you might see "God Rays" rendered as the bright sun cuts through ribbon-like slices in a ship's sails, casting small shadows upon pieces of fabric that border these god rays. This is, in part, done with AO technology.

AC4-godrays"God Rays" at work in AC4.

Screen Space Reflection can also be seen at use in scenes that include reflective surfaces, like pools of water or certain materials. The player's thick cloth outfit will respond differently to lighting effects from a harder-packed, more reflective building exterior; further, puddles respond to distant light sources by emitting a faint luminance and reflection. This is done with AC4's screen space reflection technology (and more AO), which helps simulate environments as they interact with light, occlusion, and materials.

AC4-reflection-1Screen Space Reflection - Disabled.AC4-reflection-2Screen Space Reflection - Enabled.

NVidia has worked to minimize the GPU impact of AO technology, dropping its "cost" to roughly 1ms per frame. In essence, when your frame is being rendered, a full millisecond is dedicated strictly to AO -- that's a lot of time to a GPU (which performs thousands of cycles per second), but entirely insignificant to a human. The cost of other in-game elements, like hi-res textures and high-poly models, will far outweigh the cost of AO.

This is all part of nVidia's GameWorks promotional effort, which showcases their dedication to working closely with developers to troubleshoot and program games. AMD and Intel offer similar game developer services.

The game has a lot of emergent graphics techniques that makes it interesting from a technology standpoint, if for no other reason. Other on-the-horizon games making use of advanced graphics techniques would include Daylight (Unreal Engine 4, previewed here) and Star Citizen (technology discussed here).

- Steve "Lelldorianx" Burke.