Misc

From Bullets and More Wiki
Jump to: navigation, search

Optimal Performance Settings

BAM uses SteamVR and as such much of the tweaking for performance and image quality is done there. It is recommended to install the SteamVR Plugin: [| OpenVR Advanced Settings] which is a utility that makes many settings very easy to adjust

The [| Oculus Tray Tool] application also has some useful features for Rift users like automatically setting process priority when the game loads.

Oculus Tray Tool Note: currently the OTT (still present in Oculus Home release 1.19) cannot set SuperSampling if you make a profile for BAM_VR.exe due to the way the Oculus Debug Tool works with Pixel Density. The profile based setting of SS ends up applying its SS settings after SteamVR has already loaded, and the Oculus Debug Tool does not implement the SS changes once a VR application is actively running.

Reprojection settings

SteamVR

  • Asynchronous Reprojection: Enabled

Both HTC Vive and Oculus Rift platforms should have this setting enabled.

  • Interleaved Reprojection: Disabled

Both HTC Vive and Oculus Rift platforms should have this setting disabled. Due to how this feature works (forcing the application to render at 45fps) this interferes with the physics engine in Unity that operatings things expecting 90fps.


Performance/Image Quality

BAM graphics tweaks

If you are having performance issues you can see some small improvements by enabling low-quality mode in the Settings section of the BAM main menu. You can also adjust your SuperSampling settings, see the section below.

VR games in general are very CPU intensive games. Increasing the BAM .exe priority to above normal during gameplay can help prevent other applications from impacting your gaming performance. A modern quadcore or better processor is highly recommended.

  • SuperSampling Image Quality

SuperSampling is a form of antialiasing and it can be used to increase the clarity of the graphics in BAM by internally increasing the resolution of the game and then downsampling, at the cost of reduced performance. Both SteamVR and Oculus Home natively do this without applying any additional settings to increase supersampling. The Vive and the Rift both have a resolution of 2160x1200 but apply a default 1.4x supersampling to everything making the effective resolution 3024x1680. Further increasing supersampling can have a noticeable improvement in fine details making long distance visibility better, and there is diminishing returns of improvements beyond supersampling at about 1.6/2.5 old/new levels.

Note on Advanced Supersample Filtering: There have been some reports of performance problems (framerate slowdowns) on AMD GPUs that are resolved when disabling Advanced Supersample Filtering. Most notably the grass on suburbia is sufficient to trigger a framerate slowdown under this issue.

PhysX settings


Since BAM uses Unity, it uses a lot of physics via PhysX library and this can potentially present performance problems. If you have an NVIDIA GPU you can offload the PhysX processing to the GPU where it is done at much higher speed than can be done on a CPU.
To access this setting open up the NVIDIA Control Panel, go to 3D Settings, Configure Surround, PhysX and there should be a dropdown menu on the right half of hte page. It is titled PhysX settings and you can select your CPU or GPU for your PhysX processor. Select your GPU and then apply and close this window.

Increase BAM_VR.exe process priority can help with problems from CPU contention

For the most part, VR games are reliant upon GPU performance in order to have a smooth gameplay experience. However, in general, they also take more CPU to run and you can find yourself hitting CPU contention and causing some frame rate drops/slowness even on recent powerful hardware. This is doubly true if you are streaming/recording your gameplay or running other processes in the background.
Chances are most processes run on your system at the 'normal' priority level, meaning every process gets scheduled equal CPU time as they demand it, and when you reach very high CPU utilization levels you can run into contention that will cause some apparent slowdowns in game. Here is something you can try to help compensate.

  • Increase Process Priority

To fix this problem, start Task Manager while you have BAM running, go to the process under details/processes, sort by name and then right click on BAM_VR.exe and click Set Priority -> High. Now the BAM_VR.exe process will get "first dibs" on CPU time and the other applications will no longer interfere.

Unfortunately, this setting only persists until you close BAM. There are applications out there that claim to be able to help make this persistent, but many of them no longer work in Windows 8/10, and those that do require MORE CPU to implement their process controls.


Persisting the Priority change
  • Changing the executable launch priority with a registry change

You can also change how Windows treats the executable by making the following registry key.
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\BAM_VR.exe\PerfOptions] "CpuPriorityClass"=dword:00000003

  • Oculus Tray Tool

Recently (as of OTT version 0.80) the Oculus Tray Tool which includes some enhancements that allows configuring process priority for a game in a profile along with the ASW or SuperSampling settings. Use this to set BAM to High Priority.
Additionally, there is a checkbox for increasing the process priority of OVRServer_x64.exe. This is one of the key processes that Oculus systems use in processing various things like tracking, etc. Increasing the process priority can help as well. This is a great addition to the OTT because the above detailed registry key does not work for this process due to how the process is instantiated.

How to Stream BAM

Streaming VR games is a little bit trickier than your average game. This is compounded a little by the fact that the desktop mirror is only from your left eye, so if you aim a scoped weapon with your right eye you will not be able to capture the view down the scope.

Fortunately the fix is not that complicated. See the below sections for some specifics to Vive/Rift.

Beware: Streaming VR games, or non-VR video games, can increase CPU utilization by a considerable amount if you do not use GPU encoding. This might lead to lower FPS than the 90FPS to maintain an optimal experience, and when your FPS drop below 90FPS you experienced reduced movement speed and other issues.

Increasing the process priority of BAM_VR.exe to High can prevent this from negatively impacting your gameplay performance. If you have and some GPU headroom and the ability to use a hardware encoder, this is advisable over the software one as it will take a lot of the load from the CPU for the capture.

Configuring the Source for Capture

SteamVR Display Mirror

In the SteamVR settings (the dropdown from the desktop monitor window) enable the Display Mirror option, and then in the Display Mirror window you can change the view to the right eye. Using your broadcasting/recording application of choice select the SteamVR mirror window and you should be set!
Note that the SteamVR display mirror has somewhat poor visual quality. No SS is applied, in addition there is an interpolation "mask" that causes additional jaggies. Complaining on the SteamVR discussion hub might help get someone to improve this particular problem! (so far it has not.)

  • Notes

The native aspect ratio of one eye in a Vive/Rift is 1080x1200, which is very unusual to say the least. The SteamVR mirror outputs in this aspect ratio, so you will want to manipulate your OBS Studio canvas/output to capture a 16x9 aspect ratio (1280x720) for your stream/recording. This does end up cropping a lot of the SteamVR mirror so it cannot be seen, however, the SteamVR fov is such that much of the display output cannot be seen in your HMD, so it ends up being kind of a wash. To do so shrink the SteamVR mirror source in OBS until it fills the window side to side and then experiment with adjusting the height slightly until you find a good center.
Note that I need some supporting comments from a Vive owner for the above section, I only have experience with doing the same thing for a Rift.

OBS OpenVR Plugin

A very, very excellent OBS-Studio plugin was released on 7-8-2017 and is both easier and provides superior image quality to the SteamVR Display Mirror. You can download it here, along with some installation tips. https://obsproject.com/forum/resources/openvr-input-plugin.534/

Note, the native '16x9' presets for the OpenVR plugin do not appear to fill a 16x9 canvas properly. Try the following settings:
Crop preset: none
Crop top: 0.25
Crop bottom: 0.72
Crop left: 0.00
Crop right: 1.00

Oculus Mirror

The Oculus Mirror application is a CLI process that is located in the Oculus Diagnostics folder. The fov / aspect ratio of the Oculus Mirror is fixed, so while you can (as of 1.15) change the Height and Width of the mirror, the aspect ratio remains the same. The aspect ratio seems to be made for 16x9 output, with variances in a 16x9 resolution in the settings just stretching/cropping that aspect ratio. However, the aspect ratio provided is great for streaming AND it is a high quality output!
Navigate to your Oculus Diagnostics folder, under c:\program files\oculus\support\oculus-diagnostics\, right click OculusMirror.exe and select Send-To->Deskto(Create Shortcut).
Then navigate to the desktop, go to properties on the OculusMirror target, and change the Target to look something like this:

"C:\Program Files\Oculus\Support\oculus-diagnostics\OculusMirror.exe" --RightEyeOnly --Size 1920 1080"

  • Notes

The Oculus mirror outputs in a fixed 16x9 aspect ratio at a fixed fov, which is a little lower than what can bee seen in the HMD. However, considering you would have to morph the resulting window for OBS/etc to pick up, its kind of a wash. The greatly increased output quality make this a much better option for a capture source than using SteamVR Display Mirror if you are an Rift owner.

Example OBS Setup

This guidance is intended for OBS Studio v19 or newer, which includes NVENC encoding by default. There are some addons for AMD GPU encoding you can find if you search the internet, the configuration of which I believe will follow very similar settings. You can download that here: https://obsproject.com/download

Encoding with an NVIDIA GPU

Using GPU encoding for your OBS capture can greatly reduce the CPU load on your system, which should yield a better gameplay experience. You might need to lower your SuperSampling level a little bit to make sure you maintain good framerates.
Experiment with your Output bitrate and your video resolution/FPS to find an optimal balance between quality and performance overhead. File:OBS-Output.png File:OBS-Video.png