• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

How inFAMOUS: Second Son Used the PS4s 8 (4.5) GB of RAM + more details

ICPEE

Member
inFAMOUS: Second Son is definitely one of the most visually impressive games available now on a new generation system, and at the Game Developers Conference Lead Engine Programmer Adrian Bentley Explained the ins and outs of its engine and how the resources of the PS4 were used for the game.
Interestingly enough, the first thing we learn is that the game uses only 4.5 GB of RAM and 6 cores of the eight included in the PS4′s CPU. The data about memory matches what was shared about The Order: 1886.
Here’s what we learned from the panel:

The RAM if the PS4 allowed Sucker Punch to increase memory budgets by four to eight times.
I/O (input/output) speed was a big problem, even from the hard drive. Input/Output speed is the communication speed between the drive and the CPU.
Measures were taken to reduce I/O pressure, caching seven more streaming chunks with a memory budget of about 240 MiB (Mebibyte, basically a more professional equivalent of megabyte) and using more and bigger media streaming pages with a budget of 40 MiB.
Texture atlases were used for many purposes, with a budget of over 200 MiB. A texture atlas is a large texture that includes many sub-textures that can be used for many objects, instead of having separate texture files for each object.
Ambient index was cached per static vertex with a budget of about 30 MiB.
The tiled light list was stored for forward pass (4 MiB).
Code was kept simple, using big linear buffers.
Most of the 4.5 Gb of RAM actually available were used. You can see the full allocation below.
iNFAMOUSMemory.jpg



We also learn that the CPU does hundreds of different jobs while running inFAMOUS: Second Son. Each “job” is a single computing task.
iNFAMOUSMemory.jpg


Below we can see the difference in the tasks performed by the SPUs (Synergistic Processing Unit) of the PS3′s Cell processor to render inFAMOUS 2, and the six available cores of the PS4′s CPU while rendering inFAMOUS: Second Son.
iNFAMOUS2Render.jpg

iNFAMOUSSSRender.jpg



The PS4′s CPU is defined “decent,” able to handle 30,000 draws instanced in 10,000 actual draw calls, 100-400 asynchronous raycasts per frame, 50-100 animated characters with 300+ bones, even if prefetch is not a replacement for the SPU’s direct memory access.
It was also hard to max out the CPU (while we learned in a previous interview that the GPU is used at its maximum capacity most of the time), with 50-70% used for main jobs and 5-16% for other threads.
Below we can see a breakdown of the Geometry buffers between the various effects used in the game.
iNFAMOUSSSgbuffers.jpg



Physically based materials and lighting were used. They’re less intuitive for artists, but better for lighting changes. Deferred shading was also implemented in most cases besides preintegrated skin, anistropic cloth and hair and glass.
A variety of post production effects are implemented, broken down in the slide below:
iNFAMOUSSPost.jpg



The following effects were also used:
Indirect Diffuse Lighting with a budget of 25 MiB for the whole world and a resource cost of 1-3 ms. Data was cached to avoid redundant computation.
Indirect Specular Lighting with Local Specular Cubemaps and Screen Space Specular Reflection.
GPU compute was used for some of the game’s rendering, having a positive effect for caching data like tiled lighting and specular probe application, particle and mesh processing, and easier code generation. Yet it also comes with some problems. While compute is fast, synchronization with the CPU can be a problem. It was solved by frontloading compute phases or using compute queues running alongside the graphics pipeline. The register count was also reduced to hide latency better. Ultimately GPU compute is defined “Super awesome”
The following slides show how compute was used for different effects:
Compute1.jpg

Compute2.jpg

Compute3.jpg

Compute4.jpg

Compute5.jpg


As a wrap-up, Bentley mentioned a few elements we (or at least developers among us, gamers will just see the effects) could see in the future:
Much more threading and compute.
lighter weight instantiation.
Improvement in perforce sync time.
less manual ambient and faster baking.
Better distant environment LOD (level of detail).
Overhauled pathing system.
Easier scripting reference for parts of objects.
Fewer heavy weight objects.

Link to article: http://www.dualshockers.com/2014/04...am-cpu-and-gpu-compute-to-make-our-jaws-drop/

Please close if old.

*Edit: Apologies for the horrible format. Will rectify it. *Added pics from the link.
 

Creaking

He touched the black heart of a mod
Below we can see the difference in the tasks performed by the SPUs (Synergistic Processing Unit) of the PS3′s Cell processor to render inFAMOUS 2, and the six available cores of the PS4′s CPU while rendering inFAMOUS: Second Son.
iNFAMOUS2Render
iNFAMOUSSSRender
In the gallery below you can see how tasks are split between threads and jobs are queued while rendering a scene.
ISSThreads1
ISSThreads2
ISSThreads3
ISSThreads4
ISSThreads5

Wow, amazing!

Clicking the link, the article itself is very fascinating. I love seeing the tech stuff I don't understand. Reading it... not so much.
 

JaseC

gave away the keys to the kingdom.
4.5 gb? I thought this thing had 5.5gb Available?

What the fuck is eating up 3.5gb of ram?

4.5GB + 512MB of "flexible" RAM that is managed by the OS on-the-fly, IIRC. The OS's 3GB footprint will go down over time; Sony just opted for the "Better safe than sorry" approach as not reserving quite enough for the PS3 OS initially is why cross-game party chat was conspicuously absent even late in the PS3's life. Sony claiming back some of the RAM it had freed up would have caused huge issues with games that had been developed with the larger pool in mind.
 

Sweep14

Member
I twitted Jason Gregory some time ago about his presentation of ND in a Portuguese convention where he described PS4 memory usage. He replied that the figures described (4.5 - 5GB) was a general indication and was subject to change.
 
Some of it is future proofing. Save room for possible future OS enhancements.

4.5GB + 512MB of "flexible" RAM that is managed by the OS on-the-fly, IIRC. The OS's 3GB footprint will go down over time; Sony just opted for the "Better safe than sorry" approach as not reserving quite enough for the PS3 OS initially is why cross-game party chat was conspicuously absent even late in the PS3's life. Sony claiming back some of the RAM it had freed up would have caused huge issues with games that had been developed with the larger pool in mind.

I understand that, I was still was under the impression the reserve was lower. Never mind, It doesn't make the game look any less good.
 
Have we heard any complaints about the ram allocation yet? No, so why are gamers so interested about how much ram each part of the console uses, there is no need for you to get disappointed if people that actually make games aren't disappointed.

The OS footprint will shrink over time just like the PS3 OS going down from 120MB to 50MB while adding bunch of features. This is just future proofing as usual.
 

Ein Bear

Member
Have we heard any complaints about the ram allocation yet? No, so why are gamers so interested about how much ram each part of the console uses, there is no need for you to get disappointed if people that actually make games aren't disappointed.

The OS footprint will shrink over time just like the PS3 OS going down from 120MB to 50MB while adding bunch of features. This is just future proofing as usual.

Well, if the PS3's OS only used up 50MB, then devoting 3GB to the OS on the PS4 does sound a bit wasteful... But I'm not a dev, and everything I've played so far on the PS4 looks/runs great, so eh, fuck it.
 

aY227

Member
Anyone managed to download pdf? Dropbox link is dead now, because of traffic.
If yes, please reupload it, thanks :)

-----
very interesting, the render target alone is 290 MB. the XO will surely run into a lot of problems in the future.

They are wasting tons of memory with those buffers. They do not need to be as big as they are. Check Ryse or Crysis 3 presentations.
 

Gurish

Member
Wow, developers are already using all available RAM.

Sony really needs to give some of the allocated RAM the OS is taking, it's suppose to be games first isn't it?
 

Danneee

Member
How is a game using up all RAM a good thing in any way? It's not a fantastically beautiful game, it's not an incredibly big or detailed world, character models are good but not great and there is no AI to speak of so that would mean that it's just poorly optimized?
Why brag about yourself being bad at your job?
 

R_Deckard

Member
4.5 gb? I thought this thing had 5.5gb Available?

What the fuck is eating up 3.5gb of ram?

This is the safe approach from Sony, you can always give back you cannot take away.

I imagine the OS will be squeezed down to around 2GB I would say with a 512mb buffer overflow, hell they got the PS3 footprint down to 48mb in the end and added features so who knows how tight they can get it.

Great read and interesting to see the amount of work they are putting on the CPU still with the Ray Cast Collisions all happening on the CPU.

Sucker Punch have done a great job, but they are not (and did not have the time) to optimise 210 for a Render Target is HUGE!!! by anyones standard. But the game looks superb so as we already know simply a taste of things to come, this is just possible from the well put together piece of kit the PS4 is, gamers need not panic.
 

le.phat

Member
Wow, developers are already using all available RAM.

Sony really needs to give some of the allocated RAM the OS is taking, it's suppose to be games first isn't it?

Developers always use all ram. The key is to give them the tools to use the ram more efficiently.
 

madmackem

Member
Wow, developers are already using all available RAM.

Sony really needs to give some of the allocated RAM the OS is taking, it's suppose to be games first isn't it?

Of course they are, you could use it up doing next to nothing if you wanted, as time goes on they get more efficient with it.
 

Hoje0308

Banned
How is a game using up all RAM a good thing in any way? It's not a fantastically beautiful game, it's not an incredibly big or detailed world, character models are good but not great and there is no AI to speak of so that would mean that it's just poorly optimized?
Why brag about yourself being bad at your job?


1) It's arguably the best looking console game on the market.

2) I guess I must have imagined fighting all those dudes and having pedestrians react to my actions.

Did you comment in the wrong thread, or are you just having a bad day?
 
What are you talking about?

I'm talking about devs only having access to like 55% of the ram for games.

Why does it matter if 3.5GB is "OS bullshit"? If the game is great looking?

I'm not talking about the game looking great or not. The Last of Us looked great. Super Mario Galaxy 3D looks great. Ryse looks great. Halo 4 looks great. What do games looking great in this or other platforms, has to do with what I'm saying?

Have you thought that maybe the game would look even better, or do even cooler stuff with more memory available?
 

JordanN

Banned
How is a game using up all RAM a good thing in any way? It's not a fantastically beautiful game, it's not an incredibly big or detailed world, character models are good but not great and there is no AI to speak of so that would mean that it's just poorly optimized?
Why brag about yourself being bad at your job?
You sound like an expert.

Ever thought of debating the entire Sucker Punch team? You know? To defend your mettle?
 

ICPEE

Member
Why does it matter if 3.5GB is "OS bullshit"? If the game is great looking?
I think some people are getting too eager for games to have that huge jump in terms of visuals and performance and thats the call for using as much RAM as possible not knowing that these things slowly improve over time as devs get used to the new architectures.
 

orochi91

Member
I'm talking about devs only having access to like 55% of the ram for games.

Yea, I have to agree. 3.5GB reserve for potential future OS features seems excessive.
I appreciate the "better safe than sorry" approach, but 3.5 GB reserve will leave me
to assume how games could have looked/performed better if some of that was available
to developers.
 
4.5GB + 512MB of "flexible" RAM that is managed by the OS on-the-fly, IIRC. The OS's 3GB footprint will go down over time; Sony just opted for the "Better safe than sorry" approach as not reserving quite enough for the PS3 OS initially is why cross-game party chat was conspicuously absent even late in the PS3's life. Sony claiming back some of the RAM it had freed up would have caused huge issues with games that had been developed with the larger pool in mind.

Yup. Hopefully they'll be able to give some more to devs in the future.
 

MJLord

Member
I'm talking about devs only having access to like 55% of the ram for games.



I'm not talking about the game looking great or not. The Last of Us looked great. Super Mario Galaxy 3D looks great. Ryse looks great. Halo 4 looks great. What do games looking great in this or other platforms, has to do with what I'm saying?

Have you thought that maybe the game would look even better, or do even cooler stuff with more memory available?

For comparison the PS3 had 512MB of RAM in it total.
Even if you know nothing about computers or programming you can appreciate that they have around about 8x available to use than the PS3 had in its entirety.

Don't worry about quality because you're going to see some amazing shit this gen.

EDIT: Anyone got another link to the full slides? DS's dropbox is down.
 
Top Bottom