Jump to content

Enable the use of HAM (hidden area mesh) in OpenVR


Recommended Posts

Posted (edited)

I casually stumbled upon a bit of "free" optimization that IL-2 seemingly doesn't take advantage of in VR: the hidden area mesh feature that the OpenVR API provides:

image.png.8424ccbce510ceba6d25909768dabf73.png

 

Source: http://media.steampowered.com/apps/valve/2015/Alex_Vlachos_Advanced_VR_Rendering_GDC2015.pdf

 

I initially noticed this when messing around with one of OpenComposite's options for manipulating the HAM - IL-2 is one of the games that does not react to such and then subsequently verified it by putting a breakpoint on the OpenVR GetHiddenAreaMesh function (https://github.com/ValveSoftware/openvr/wiki/IVRSystem::GetHiddenAreaMesh) and it was never accessed by IL-2 (as opposed to Elite Dangerous or DCS both of which use said feature).

 

Examples using the HP Reverb G2's HAM - the images below are not from the desktop mirror.

 

This is how Elite Dangerous renders to the HMD:

Spoiler

image.thumb.png.59a54954d8d7172d687ef171408122ff.png

 

And this is how IL-2 renders to the HMD:

Spoiler

image.thumb.png.074868630f18f5b1a5ceb1397e20c857.png

 

So roughly this is the area it could skip marked in red and the player wouldn't miss anything while gain a good chunk of performance:

Spoiler

image.thumb.png.e49a0f2fa9466ba45caffd44186f2d29.png

 

Seeing how this is a considerable optimization (depending on the HMD's distortion profile of course, but it's upwards of a 10% reduction in fill rate for sure) and it's not really that new I am wondering if perhaps it's something that could be enabled in IL-2's VR implementation especially considering the continuous increase of render resolution with newer headsets.

 

Note: as far as I can tell this does not affect the desktop mirror display of a game that implements it (or perhaps the cropping of the image sent to the mirror is such that it didn't show up in the games I tried) - it is solely what is transferred to the HMD.

 

Edited by firdimigdi
clarification
  • Like 3
  • Upvote 10
102nd-YU-cmirko
Posted

what an excellent find ^^

 

should be seen by development team if they are NOT aware of it at the moment...

 

  • Upvote 1
  • 3 months later...
Posted

Ayyee noticed this 2 or 3 years back and hoped it would be implemented by now (I'm just getting back into IL2 and looking at the forums) It's such a shameful waste of gpu resources not to have this and a easy win.

 

So the HAM and not being so cpu thread bound were my hopes, there have been nice improvements in other areas. VR + sims are soulmates bring the love dear devs.

 

  • Upvote 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...