Fallout 4

Fallout 4

View Stats:
Kaldaien Nov 10, 2015 @ 11:56pm
Fallout 4 "Works" - v 0.3.4 [Texture Cache] - (8/31/2016)
Introduction
This project uses advanced features from WIndows 8, 8.1 and 10 to improve frame pacing. Some of these features are available in Windows 7 (with Platform Update), but to get the most out of the mod you need a modern Operating System.

The primary goal is to increase render smoothness without sacrificing input latency. This is not something that can be done effectively in Windows 7. On Windows 7 triple-buffering adds a constant frame of latency and nothing can fix this. Windows 8+ allows triple-buffering without added latency, in fact it can do far more than 3 buffers without any added latency.

In addition to improving frame pacing, the mod also includes a texture caching system to reduce VRAM consumption, eliminate texture streaming bottlenecks and prevent memory fragmentation. This feature works on Windows 7 or later.

Download

    The mod
    The latest GitHub Release is here[github.com].
    Microsoft Visual C++ 2015 Redistributable (x64)
      This is REQUIRED and can be found here.[www.microsoft.com]

Usage
  1. Unzip the contents of FO4W.zip to SteamApps/common/Fallout 4/

  2. Ensure no driver overrides for VSYNC or Pre-Rendered Frames are active

    • Both should be set to application preference, or the driver will give you massive input latency and probably stuttering as well.

  3. Run the game in Borderless Window mode (for best frame pacing)

    • If you opt to run in Fullscreen mode, you will probably need to change PreRenderLimit to 2 for decent performance

    • The game may hang when it first starts in Fullscreen mode in certain resolutions, if this happens use Borderless Window mode instead

    • Fullscreen mode should only be used on laptops or SLI-based systems, borderless window mode offers the most reliable frame timing for minimum stutter.

Configuration
    Settings you SHOULD tweak
[Manage.Memory] ReservePercent=66.0 ; Amount of system memory the game is allowed to consume before the cache begins pruning itself. ; This is set conservatively low, you can probably set it up to about 80 or 90%... ; The idea is to self-balance the texture cache size so that nothing is ever paged to/from the swap file [Textures.Cache] MaxSizeInMiB=3072 ; Default = 3 GiB, you will probably want to increase this value ; (A good rule of thumb: up to 0.25 * Installed System Memory + 1 * Installed VRAM). MaxEntries=8192 ; Default is appropriate for up to 4 GiB, double this if you set your cache > 4 GiB. ; (Keeping this value low slightly reduces CPU overhead, but 8192 entries isn't enough to fill out a cache larger than 4 GiB) ; The other settings in Textures.Cache should be ignored, I already tuned them.

    It is unlikely that you will need to spend any quality time adjusting these, so do not let them overwhelm you.

These are the current default settings, along with a description

[Render.DXGI] PresentationInterval=0 ; Use 0 for Windowed mode, 1 for Fullscreen (to fix tearing) SwapChainBufferCount=5 ; 1=Double-Buffering, 2=Triple-Buffering, ... PreRenderLimit=3 ; 1=No Render-Ahead, 2=1 Frame Render-Ahead, ... -1=Driver Preference TargetFPS=60.0 ; Custom framerate limiter (0.0=Unlimited) UseFlipDiscard=true ; Automatically drop late frames on Windows 10

Many of those INI options can be changed in-game if you have Riva Tuner Statistics Server setup.
  • Open/Close the console by pressing Ctrl + Shift + Tab
  • "PreRenderLimit ..." (requires a game restart)
  • "BufferCount ..." (requires a game restart)
  • "PresentationInterval ..."
  • "MaxDeltaTime ..."
  • "UseFlipDiscard ..." (requires a game restart)


dxgi.dll adds a feature to any Steam game it is used in where it plays the PSN trophy sound when you unlock an achievement. If for some reason you don't like this, you can disable it by editing dxgi.ini:

[Steam.Achievements] NoSound=True

You can make it play any sound you want by supplying the name of a .wav file in SoundFile=....

Likewise, dxgi.dll also adds an OSD that is more thorough than MSI Afterburner or EVGA Precision. If you do not like this, it can be disabled by changing dxgi.ini:

[RSFN.OSD] Show=False ; Or simply press Ctrl + Shift + O while the game is running to toggle this


†NOTE:
RivaTuner Statistics Server v. 6.4.0 or newer is required for the overlay features to work. This ships with certain overclocking software such as MSI Afterburner, or can be downloaded as a standalone package from Guru3D here.[www.guru3d.com]

See here[github.com] for suggested RTSS settings.

OSD Functions
Toggle Framerate Counter
Ctrl + Shift + F
Toggle Clock / Version No.
Ctrl + Shift + T
Toggle GPU Monitor
Ctrl + Shift + G
Toggle CPU Monitor
Ctrl + Shift + C
Toggle Memory Monitor
Ctrl + Shift + M
Toggle I/O Monitor
Ctrl + Shift + I
Toggle Disk Monitor
Ctrl + Shift + D
Toggle Page File Monitor
Ctrl + Shift + P

Resize OSD
Ctrl + Shift + + / -
Toggle Entire OSD
Ctrl + Shift + O

Toggle Command Console
Ctrl + Shift + Tab


Version History
FO4W v 0.3.0 (6/10/16)[github.com] Testing Texture Caching
  • Reduces driver performance bottlenecks caused by poor texture memory management
FO4W v 0.2.2 (12/2/2015)[github.com] SteamAPI Compatibility
  • Fixes a situation in this game where achievements were backlogging
FO4W v 0.2.1 (11/23/2015)[github.com] Improved Stability
  • OSD and Steam API related stability fixes
  • Parses Fallout 4's ini file to determine if the game is running in windowed mode or fullscreen
  • Will change desktop resolution if a borderless window is requested at a different resolution
    • The game's "Maximize Window" feature is supposed to work this way, but it does not scale the framebuffer correctly.
FO4W v 0.1.1 (11/14/2015)[github.com] Support for Windows 7 and Vista
  • Detects when Windows 7 Platform Update is present and can use the DXGI 1.2 Flip Model for best performance
    • Uses DXGI 1.0 otherwise on Windows 7
  • Disabled NVIDIA Optimus bypass code from the original Batman Fix project
  • Increased SwapChainBufferCount to 4 to reduce latency in Flip Model mode
  • Slightly improved Fullscreen support
FO4W v 0.1.0 (11/13/2015)[github.com] (Experimental) Fullscreen Mode Support
  • Adds support for fullscreen mode
    • Performance gains are not as substantial as windowed mode, but this does make enabling triple buffering extremely simple
    • Tends not to work unless the fullscreen resolution selected is the same as the desktop resolution
  • Renamed BackBufferCount to SwapChainBufferCount in Render.DXGI because it was misleading
  • Bringing up the command console (Ctrl+Shift+Tab) will pause the game
    • The game will stop responding to keyboard input until the console is closed--as designed.
  • Adds (and enables by default) a feature that takes a screenshot whenever you unlock an achievement
    • You should disable the screenshot sound in the steam overlay because the DLL already plays a different sound on unlock
FO4W v 0.0.4 (11/12/2015)[github.com] AMD Compatibility Fix and NVIDIA Framerate Limiting
  • No longer prints an NvAPI error message when run on AMD GPUs.
  • Can setup arbitrary framerate limiting on NVIDIA GPUs
    • [Render.DXGI] TargetFPS=...
    • A value of 0 means unlimited
    • The game will restart itself the next time you run it whenever you change this setting in the INI file.
  • Prevents BackBufferCount from being set to anything less than 2


For the time being, this only works reliably if you run the game in borderless window mode.
Last edited by Kaldaien; Feb 16, 2017 @ 4:09am
< >
Showing 1-15 of 1,377 comments
Spectre6 Nov 11, 2015 @ 12:06am 
Sounds like something to keep my eye on. Thanks for the fan support!
hemicore Nov 11, 2015 @ 12:22am 
THANK YOU SO MUCH!
I wasn't able to get above 10fps, even with the new nvidia update.
I dropped your .dll AND .ini into the folder and presto, running like a charm.
Kaldaien Nov 11, 2015 @ 12:55am 
No problem. I've built this whole DLL up over several months and used it to fix Arkham Knight originally and then Tales of Zestiria. At the rate things are going I'm probably going to have to add new features to it every time a console game is ported to PC, lol.

I'm working on some frame pacing stuff right now. I hope to iron out the little microstutter problem that still exists in 0.0.1. I'm pretty close to ironing that out on my system, but this is again, going to require Windows 8.1 or newer :-\
Kaldaien Nov 11, 2015 @ 4:11am 
0.0.2 Released

I added MaxDeltaTime to help you guys balance the input latency vs. framerate equation a little bit more precisely. I also made the DXGI Flip Model option for Windows 10 optional, so this will work on Windows 8.1+ now.

Last, there's a command console that you can activate by pressing Ctrl+Shift+Tab that will allow you to fuss with (most of) those variables while the game is running to figure out what works for your system.

The parameters in the .ini file on GitHub right now are tuned for my system and they drastically reduce stuttering to the point where the game is actually playable. I think most other systems will also benefit from them, but go ahead and tweak the parameters yourself and report back what works for you.
Glory Nov 11, 2015 @ 4:15am 
Which folder do I put the files in?
Kaldaien Nov 11, 2015 @ 4:18am 
The same one as your executable. So SteamApps/common/Fallout 4
S7even Nov 11, 2015 @ 5:45am 
Hmm i can't subscribe this thread if i dont write any comment. Really strange. Btw waiting your another work project Kaldaien. Thx for your help before with ToZ and now with FO4
Kaldaien Nov 11, 2015 @ 5:59am 
lol, yeah. I have to play these games too... so, in the process of making them playable for myself I might as well share my work with others. I really never expected this game to work as poorly as it does, it's insane. You can't walk more than a meter without hitching without this fix in-place.

I think there's a framerate limiter built-in to the game that's messing with all of this. Same problem as ToZ had, though much, much worse.
Last edited by Kaldaien; Nov 11, 2015 @ 6:00am
ClutchNelson Nov 11, 2015 @ 8:29am 
Does this work with G-Sync enabled?
Toxic Nov 11, 2015 @ 9:02am 
I'll give it a try.
I use ctrl + shift + tab for the steam overlay so I guess I'll have to change that if I want to chance parameters in-game.
Kaldaien Nov 11, 2015 @ 11:00am 
Originally posted by GritsWithGranny:
Does this work with G-Sync enabled?

Chances are pretty good that it doesn't since it needs the Desktop Window Manager to handle framepacing. If you run in proper fullscreen mode, then the DWM steps aside and lets the game pace itself.
Kaldaien Nov 11, 2015 @ 11:00am 
Originally posted by Toxic:
I'll give it a try.
I use ctrl + shift + tab for the steam overlay so I guess I'll have to change that if I want to chance parameters in-game.

Eh? You use ctrl+shift+tab for the Steam Overlay? Not just Shift+Tab?

As long as Ctrl is down when you hit Shift+Tab, it won't interfere with Steam. I chose that combination of buttons for precisely that reason. One extra button on a combination nobody's likely to accidentaly hit in the first place :P
Last edited by Kaldaien; Nov 11, 2015 @ 11:01am
Neromishi Nov 11, 2015 @ 11:05am 
I've found that the IFPSClamp=60 command fixes microstuttering completely, the only issue is that it makes the game run in slowmotion if you drop below 60fps
mrorange Nov 11, 2015 @ 11:08am 
Is this working on Win 7?
Kaldaien Nov 11, 2015 @ 11:09am 
No, it requires DXGI 1.3 (Windows 8.1+)
< >
Showing 1-15 of 1,377 comments
Per page: 1530 50

Date Posted: Nov 10, 2015 @ 11:56pm
Posts: 1,377