5 years in the past, we wrote about how the visible results in Returnal got here to life, together with the real-time voxeliser that dissolved Phrike into volumetric fog. For those who haven’t learn it, that put up is an effective companion to this one.
That is how that story continues.
With Saros, we didn’t simply prolong what we’d constructed for Returnal. We stepped again, checked out thirty years of gathered engine growth, and rebuilt it as a unified framework: Graphite.
What we had, and why we modified it
Our proprietary particle engine, NGP (Subsequent-Gen Particles), began as a prototype for Resogun in 2013 and grew with each recreation since, all the way in which to Returnal. By SAROS, NGP was mature, nevertheless it was additionally a product of twelve years of incremental selections, each made within the context of a particular, remoted recreation.
Then one thing else modified: us. Becoming a member of PlayStation Studios meant delivering experiences on the degree our gamers anticipate, and our instruments, and the names we’d given them, now not matched the studio we had been turning into.
Enter Graphite. It brings GPU simulation, rendering, tooling, and DCC integration below one structure, constructed immediately for PlayStation {hardware}. NGP didn’t disappear, it grew to become a part of Graphite, advanced and extra succesful than ever.
Each Housemarque recreation has a visible id gamers recognise instantly. Graphite is what makes that attainable.
And what it truly does, body by body, is finest defined by the unimaginable individuals who constructed it:
Housemarque Graphics Architect Sharman Jagadeesan and Senior Graphics Programmer Konsta Toivanen will stroll you thru the volumetric fog in Saros: the way it advanced from Returnal, and the 2 programs we constructed to make Carcosa’s environment really feel alive.
Risto Jankkila (VFX Architect) will clarify how we prolonged Graphite with knowledge from Houdini, together with a full breakdown of the participant spawn sequence.
Volumetric fog
Fog in video games is usually an afterthought, one thing that fills empty house and hides draw distances. In Saros, we needed it to be a residing a part of the world, reacting to all the things occurring in it.
In Returnal, our volumetric fog was already reactive, however too low frequency, and heavy temporal filtering saved it from displaying superb element. For Saros we constructed two complementary options: low frequency fog for ambient environment, and excessive frequency fog for the character results seen in particular story rooms in Carcosa.
Low frequency fog
We took Unreal Engine’s froxel fog, a frustum-aligned voxel grid, as a place to begin and rebuilt vital elements of it to meet our imaginative and prescient.
The primary problem was temporal stability. The hysteresis coefficient controls how a lot of the earlier body’s knowledge the fog holds onto: Unreal’s default of 90% retains the picture steady however makes the fog sluggish on fast-moving cameras and lights. We pushed it down to 50%, utilizing blue noise jitter and depth clamping to preserve the ensuing aliasing below management.
Saros additionally wanted fog that might characterize all the things from low density ambient mist to excessive density floor fog. To render these faithfully we used:
- A twin Henyey-Greenstein part perform, modelling how mild scatters ahead and backward via the fog relying on viewing angle.
- A colored absorption coefficient, figuring out how a lot mild is absorbed because it travels via a medium, for a far wider vary of colors than conventional monochromatic options.
- A self shadowing system that aggregates incoming mild sources right into a dominant shadowing route and ray-marches towards it.
- A bodily primarily based sky lighting integral, for correct distant lighting with out sacrificing efficiency.
Collectively these gave Carcosa’s environment a grounded, bodily high quality.
Lastly, the low frequency fog is totally interactive. Advection from our player-following fluid simulation feeds immediately into the density hysteresis step, making each participant motion, projectile, explosion, and enemy readable within the fog in actual time.
Excessive frequency fog
For the high-frequency fog we constructed a customized ray marcher. To maintain efficiency in verify whereas preserving constancy, we cluster the scatter knowledge into 8x8x8 voxel teams earlier than marching, drawing solely the clusters that include knowledge, with a user-defined threshold protecting their quantity in verify. Whereas marching, empty areas between clusters get skipped, letting the marcher take bigger steps the place it will probably.
For lighting, we evaluated a light-weight quantity per scatter quantity, containing irradiance from all mild sources, with pre-marched self-shadowing for each mild voxel. We uncovered parameters for albedo, absorbance, density, and shadowing, letting artists stability visuals towards efficiency for every quantity.
The 2 fog programs are then merged: we pattern the low frequency fog’s scatter knowledge through the excessive frequency march, and feed outcomes again so each keep per one another.
Use circumstances
We used the excessive frequency volumetric fog in just a few situations. One use case was within the Prologue within the type of a smoky cranium with cables connected to it. One other use case was with what we name Mirages. In 4 of our biomes there are particular narrative rooms the place Arjun is confronted with smoke creatures.
Reactivity is vital to all of the VFX we make, and these results had been no exception. Since affect knowledge doesn’t want excessive decision, we retailer it in a separate, low decision quantity, which for the cranium additionally holds its low frequency velocity subject.
The movies beneath present that quantity on the left, and mixed with the cranium on the appropriate. Impacts are evaluated as a Signed Distance Subject that closes again up over time, whereas velocity is proven in color, you’ll be able to see each the affect holes and the turbulence they create.
Right here’s the ultimate cranium impact with out the cables and different secondaries and in a unique surroundings.
The mirage impact is analogous to the cranium impact. The distinction is that there are so known as mirage “scenes” that rotate. We additionally used our real-time skeletal mesh voxelizer to deliver current meshes into the scenes. The video beneath reveals a sweep between the voxelized end result and the ultimate end result with advecting knowledge from the earlier body.
Right here’s the ultimate impact with rotating two mirage scenes in a check surroundings. For reactivity, we used the identical methodology described for the cranium impact.
Extending Graphite with knowledge from Houdini
As well as to bettering the rendering high quality of our volumetric results we needed to introduce new methods for our artists to writer them.
Beforehand, volumetric results had been created by writing per-voxel expressions for density emission, mixed with fluid simulations driving the advection (the directional motion) of the density subject. As a result of this grid-and-voxel strategy is the business normal for movie VFX, it was our pure first step as properly.
From Returnal days: voxelising Phrike right into a grid for density emission
Throughout Returnal’s growth, we realized we would have liked tighter management over precisely the place density is generated. Per-voxel logic allow us to emit density on close by surfaces or voxelised meshes, however something extra complicated got here with extreme runtime overhead. Emitting density from only a character’s arm, slightly than their complete voxelised physique, was very tough to do effectively in actual time.
Additionally from Returnal: full physique density emission from the voxelised mesh
To unravel this, we turned to particles to drive volumetric density emission. Graphite’s totally programmable particle system gave us a stable basis for tightly managed volumes, leading to two new instruments:
An Offline Houdini Data Pipeline: lets artists pre-compute complicated, high-fidelity knowledge in Houdini that might be too costly to generate at runtime.
A Runtime Point Cloud Rasterizer: a high-performance part that takes simulated factors and rasterizes them immediately right into a quantity in actual time.
Collectively, these freed us from stateless per-voxel expressions and inflexible fluid simulations. Particles can now exactly comply with a personality’s animated mesh, giving artists full management over an impact’s habits and lifecycle.
In observe, an artist imports an animated Saros character into Houdini and makes use of its instruments to compute beginning positions and attributes for an impact. That baked knowledge feeds into the sport engine, the place real-time simulation takes over. Within the video beneath, factors generated in Houdini intently match the in-game character, and customized runtime logic detaches them from the enemy on bullet affect, so preliminary positions come from Houdini, however the habits reacts dynamically to the participant in actual time.
Creating level knowledge in Houdini
Utilizing level knowledge from Houdini in engine
Since artists can export any sort of knowledge from Houdini to Graphite, it’s simple to transcend static particles connected to characters. Beneath, particles stream throughout the floor of an animated mesh: the floor was unfolded in Houdini right into a 2D simulation house, then exported and mapped again onto the animated mesh in actual time.
Particle stream on Arjun’s physique on the left. Within the center we extract an ISO floor from the particles. On the appropriate we’ve volumetric fog emitted from the particle stream.
A chief in-game instance of this expertise in motion is the participant spawn sequence in Saros. This complicated impact is inbuilt a number of layers, beginning offline in Houdini, the place we generate splines immediately onto the participant’s skeletal mesh. When exporting these splines into Graphite, we deal with every management level alongside the spline as a person particle.
Simulating particle positions in Houdini. These are solely used as goal positions within the engine and the expansion movement will likely be re-simulated dynamically throughout runtime.
At runtime, our programmable particle system controls how these components behave over time. At first, the splines drift freely in house, then regularly information again towards their goal positions on the character mesh.
We needed the participant to appear to be they’re bodily reforming from a pool of shifting “goo.” Marching Cubes gave us that viscous, solid-surface look, and controlling it with particles allow us to construct a sequence the place the participant kinds from separate strands into a personality.
Marching cubes constructed from particle splines
Very similar to the splines that generated the goo floor, we are able to additionally emit volumetric density as properly. Within the spawn sequence we positioned various particle splines close to the participant location and spawn volumetric fog from them to simulate rising steam or smoke.
Volumetric fog emitted from particle splines
As a last contact, we added spark particles that collide with the participant character, utilizing a signed distance subject computed from the participant’s collision capsules. The programmable particle system once more gave us flexibility right here: the participant attracts particles, however as soon as they get too shut, the participant mesh repels them, serving to promote the look of rising from scorching, lava-like liquid.
Particles colliding with participant capsule SDFs
Right here’s all the things mixed. Each component is simulated at runtime, at 60 fps on base PS5, with no baked simulation belongings. This lets us ship a number of spawn animations, every with slight randomization so it seems to be just a little totally different each time the participant wakes up.
Remaining participant spawn sequence
An ever-evolving growth journey
Studying via what Risto, Sharman, and Konsta broke down right here, the objective for us and our expertise has all the time been the identical: each simulation, each impact, each rendering choice exists to make you’re feeling one thing once you play.
Making video games means believing in one thing you’ll be able to’t but show, and the one individuals who can ever verify it are the gamers themselves. Saros gamers instructed us, in their very own phrases, that what we constructed mattered. And which means all the things to us.
Our video games will preserve informing the expertise we develop for Graphite, all the time showcasing what PlayStation as a platform can do. We are able to’t wait to share that future with you.


