At the Games Developers Conference Sucker Punch Rendering Lead Bill Rockenbeck held a presentation titled “The Infamous: Second Son Particle Architecture,” giving us quite a few pointers on the impressive particle system used by the game.
Rockenbeck mentioned that the PS4 grants a much greater variety of particle behaviors then its predecessor, and making changes requires a lot less time than on PS3.
The main reason why developers are starting to use GPU compute on PS4 is that GPUs are now faster than CPUs. The PS4’s GPU has 1152 shader cores and 1.84 teraFLOPS of computational power. In addition to that, the memory that can be accessed only by the GPU is very fast (176 GB/s bandwidth).
It’s also possible to use the programmable GPGPU (General-purpose computing on graphics processing units) feature and like with most newer GPUs, it allows general parallel computation.
That results in some really impressive numbers: the typical frame in inFAMOUS: Second Son includes 30,000 particles (up to a maximum of 128,000), Rain adds 30-40,000 to that number.
Since there are thousands of particle emitters, and tens of kilobytes of code per emitter, the particle system is tens of megabytes of code. Rockenbeck’s comment about this is “Good thing PS4 has so much memory!”
Below you can see an overview of the Particle emitting architecture and a schematic of its data flow.
Extremely important to inFAMOUS: Second Son particle systems are a turbulence method called Curl Noise and Sucker Punch’s own method to create ribbon particles. Below you can see a graphical representation of curl noise and of how ribbonizing particles works.
In addition to that, particle meshes were also used. They’re the technology that allows Delsin to decompose when he dashes, or emissive textures (like neon signs when they’re drained) to emit particles with the right color and brightness.
In practice, each function acts like a “Lego piece” and combines with others to enable wide variety of results.
Tile-based deferred lighting is used for particles, adding to the global lighting, while size, color and brightness is expression-controlled.
Another reason why GPU compute was used in inFAMOUS: Second Son is that complex particle systems are heavily reliant on randomization, and standard random number generators create a sequence of outputs where each depends on the one before. Sucker Punch needed a “super-parallel” system where thousands of random numbers could be generated at the same time, and that’s where compute comes in.
If you want to read the full slides (beware, most of it is extremely technical) you can check them out here.