How to remove the FOV-reducing vignette from Unreal Engine 4.5 w/ Oculus SDK 0.4.3 support

Update: Oculus confirms the overly large vignette is unintended.

Oculus recently released the updated 0.4.3 SDK and Runtime. There are some good and some bad things with this release.

Good first, is the ~0ms post-present latency, resulting in (timewarped) latency of about 5ms – sweet.

The bad, from my perspective at least, is the huge vignette added to the edges of the image. This obscures a lot of the rendered pixels on all four borders of each eye. The DK2 has slightly less horizontal FOV than the DK1 already, so we need to maintain what FOV is there, and this vignette does the opposite.

In an effort to keep Dungeon Survival up to date with the latest and greatest, I grabbed the Oculus fork of UE4.5 w/ 0.4.3 SDK support and took a look to see if the vignette could easily be disabled – it appears so (engine is currently compiling so I can’t test yet, but it should work).

First, (fork, then) clone Oculus’ branch of Unreal 4.5 (requires UE subscription).

Make sure to get the required 1 and 2 zip files and extract them after the clone has completed. Edit: Also don’t forget the Oculus require zip! It’s labelled “Link1” in their Github readme. If you get a linker error for GetEyePoses, this is the cause.

Generate projects with the batch file in the engine root directory, then open the solution, and find this file and line below (if you can’t find it, search “ovrDistortionCap_Vignette”).

File: Engine\Plugins\Runtime\OculusRift\Source\OculusRift\Private\OculusRiftHMD.cpp
Line: 1817

Change this:

DistortionCaps = SupportedDistortionCaps & (ovrDistortionCap_Chromatic | ovrDistortionCap_TimeWarp | ovrDistortionCap_VignetteovrDistortionCap_Overdrive);

To this:

 DistortionCaps = SupportedDistortionCaps & (ovrDistortionCap_Chromatic | ovrDistortionCap_TimeWarp | /*ovrDistortionCap_Vignette |*/ ovrDistortionCap_Overdrive);

Build the engine to update the Oculus plugin and it should now have the same vignette as 0.4.2 SDK.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s