openvr icon indicating copy to clipboard operation
openvr copied to clipboard

Function to get info about resolution of submitted frame?

Open Zaetc opened this issue 7 years ago • 12 comments

Dear Valve, please, add function that allow for Overlay or Background applications get resolution info about submitted frame (submitted by 3d scene app). Info like this in vrclient log (per eye or for both eye....):

Fri Nov 16 2018 15:29:53.183 - Setting max texture dimensions to 3227x3586 before requiring downsampling Fri Nov 16 2018 15:29:53.184 - Created shared texture 'Scene create D3D11, 0' 2048x2240 (1 mips) Fri Nov 16 2018 15:29:53.185 - Created shared texture 'Scene create D3D11, 1' 2048x2240 (1 mips) Fri Nov 16 2018 15:30:22.403 - Created shared texture 'Scene resize D3D11, 0' 2944x3168 (1 mips) Fri Nov 16 2018 15:30:22.403 - Created shared texture 'Scene resize D3D11, 1' 2944x3168 (1 mips)

Zaetc avatar Dec 17 '18 06:12 Zaetc

This will be very useful for my project (already published on Steam). i'm interested what part of the provided texture will be used (resolution of this part). So to get info about real render resolution of the 3D scene application.

sergioberg avatar Jan 17 '19 02:01 sergioberg

May be someone find this interesting: I found two ways to ge current render resolution of 3d scene app:

  • CompositorDumpImages() - easy way, but it leads to huge lags.... because SteamVR need to create 2 big image files.
  • TakeStereoScreenshot() - no lag, but result is different on different HMDs, and require some calculation to get resolution of 3d scene app, cause result is cropped version of full texture.

For me both ways is not good for use it in production version of my app.

sergioberg avatar Feb 02 '19 07:02 sergioberg

Is there any chance that this will be implemented?

https://github.com/ValveSoftware/openvr/issues/1089

sergioberg avatar May 13 '19 15:05 sergioberg

Can you help us understand why you're going to use this information for?

JoeLudwig avatar May 13 '19 17:05 JoeLudwig

Can you help us understand why you're going to use this information for?

@JoeLudwig i'm developer of fpsVR (https://store.steampowered.com/app/908520/fpsVR/) - overlay app I need current render resolution for:

  • performance measure
  • for more informative display of stats for the app user
  • for logging more info of user sessions for the user history (fpsVR has history viewer)
  • for new functional wich will allow the app user to create benchmark videos (like showing current render resolution with other stats (fps, frametimes, cpu & gpu usage...) on chromakey window)

sergioberg avatar May 13 '19 18:05 sergioberg

@JoeLudwig Users of my application asked me to add real resolution / supersampling information because they want to know:

  • Is the resolution changed (on the fly) or is a restart of the game required?
  • real resolution / supersampling of the running game, because it does not always same as the SteamVR settings (the game has an internal multiplier, the game has a dynamic resolution, etc.)

sergioberg avatar May 14 '19 01:05 sergioberg

@JoeLudwig @aleiby Can I repeat my question? =) Is there any chance that this will be implemented? =)

I can absolutely accurately determine the resolution by requesting a screenshot, but this is guaranteed to lead to one dropped frame. This is OK, if you request a screenshot immediately after changing the supersampling settings, but if the settings inside the application / game are changed or the game dynamically changes the resolution, then this is no longer acceptable. This is why I need some simple function to get resolution of sumbited eye texture and texture's bounds... My application is intended for people who want to know certain performance indicators about the currently running VR game/application.

On the video below I testing detection of the dynamic resolution in SteamVR Home. Overlay header contains current resolution detected (refresh rate is 5 sec and every 5 sec i gets 1 dropped frame) https://www.youtube.com/watch?v=IrMg8LMb9wk

sergioberg avatar Sep 23 '19 06:09 sergioberg

I'm currently working on an app that adjusts application specific supersampling on the fly to take high resolution screenshots, and I've noticed that in general:

  • Unity titles settings changes and updates the render resolution accordingly
  • Source 2 ignores the setting and uses its own performance based dynamic supersampling instead
  • Unreal games ignores it completely and doesn't change anything

In my case I'd like to deactivate the dynamic supersampling function if it has no effect at all, and/or get an event when a game has finished switching resolution if they actually accept it. Right now I can get funky jumbled screenshots if I capture one too soon after a supersampling change.

I could use the screenshot solution @sergioberg mentions, which indeed is what I planned to fall back on, but I imagine less taxing ways to detect this would be helpful for other tool makers.

BOLL7708 avatar Feb 27 '20 11:02 BOLL7708

@JoeLudwig @aleiby If I'm too annoying, please close this issue. At least I will know that the answer is no, and I will no longer raise this question. Currently there is only one really working way to get current resolution : CompositorDumpImages() - but it leads to huge lags. I believe that users should be able to find out if the VR application uses supersampling settings from SteamVR, and if not, what resolution the VR application uses, if not in SteamVR itself then at least through third-party applications such as my fpsVR.

sergioberg avatar Jun 17 '20 10:06 sergioberg

Instead of adding a new function, you can add frame size data to the Compositor_FrameTiming. It will probably be easier for you to implement, and it will be much more useful.

sergioberg avatar Jul 05 '20 00:07 sergioberg

@JoeLudwig @aleiby Please, answer... I am still waiting for an any answer. It's hard for me to plan the future of my application if within two years you do not give an answer, neither "yes" nor "no"(not planned, for example).

I don’t think it’s that hard to add one function, for getting the eye texture size and the used texture bounds, available for overlay or background applications, or add such info to existed Compositor_FrameTiming or add additional logging to already existed vrclient_*.txt logging.

sergioberg avatar Nov 23 '20 02:11 sergioberg

@aleiby Is there a chance that this will ever be implemented? It is enough to add several fields to the Compositor_FrameTiming structure with information about the frames sizes.

More than 4 years have passed, and I still want to use this in my application: fpsVR.

sergioberg avatar Nov 08 '23 13:11 sergioberg