Enabling Assassin's Creed 4 Black Flag with Advanced Particle Effects
Hi, I’m Dmitry Duka, engineering manager of the NVIDIA GameWorks team in Moscow. We have a passion for making games more realistic, and I’m excited to share some of the work we do here at NVIDIA, which enables developers to easily incorporate advanced effects into games.
We collaborate with game developers to make games more exciting. A great example of this was our work with Ubisoft Kiev on Assassin's Creed 4 Black Flag. We supported the Ubisoft Kiev team in integrating interactive smoke effects into their title. In this article I will share some of the considerations when using interactive smoke.
What is interactive smoke?
Interactive smoke billows around the player as he moves through the scene. It is affected by geometry and influences like wind gives the player a more realistic feeling. Assassin's Creed 4 Black Flag takes place in a bygone era of pirates and buccaneers. In those days black powder firearms like muskets and blunderbusses produced a lot of dense smoke so this game seemed like an ideal candidate for lots of cool interactive smoke effects.
To implement great looking smoke we used 3 technologies:
PhysX Particles, PET and PSM
The smoke effects were authored using the Particle Effect Tool (PET). This tool supports creating effects using different kinds of particle emitters and force fields. The force fields control the particle motion using vortex, jets, turbulence, noise etc. The tool allows changing parameters for particles like color, scale, rotation, sub-texture at runtime. These parameters can be changed based on local density, lifetime, distance from the camera and other influences.
To ensure realistic smoke rendering, we used Particle Shadow Mapping (PSM), which adds correct self-shadowing to the smoke. PET allows you to enable and disable rendering features which allows the artists to closely match in-game rendering and therefore reduce iteration time significantly. Below you can see a picture of the same particle effect without and with PSM (from left to right).
We used PhysX Particles to ensure that the smoke particles collide properly against the static and dynamic environment. The PhysX collision also works with other physics engines by mirroring the required collision data.
In order to drive the simulation, collision data from the game’s physics engine (in this case Havok) is passed to the Turbulence simulation which models the velocity field caused by moving objects. The PhysX Particles get advected through the velocity field and result in swirls and vortices which create the interactive smoke.
NVIDIA Turbulence uses 3D Computational Fluid Dynamics (CFD) using the well-known Navier-Stokes equations. This gives an amazingly realistic effect but is computationally expensive so more traditional particle simulation techniques were used for distant smoke effects. The trick is to ensure that the animated smoke and interactive smoke look good when they meet and this is achieved by ensuring they respond to the same environmental factors like wind.
Additional GameWorks technology used in Assassin’s Creed IV: Black Flag
This game also uses a slew of NVIDIA GameWorks technologies including:
- TXAA for anti-aliasing
- HBAO+ for ambient occlusion
- NVIDIA Enhanced DirectX 11 God Rays
- Percentage Closer Soft Shadows
- GeForce Experience integration