ValveSoftware / openvr

OpenVR SDK
http://steamvr.com
BSD 3-Clause "New" or "Revised" License
6.07k stars 1.28k forks source link

Function to get info about resolution of submitted frame? #970

Open Zaetc opened 5 years ago

Zaetc commented 5 years ago

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)

sergioberg commented 5 years ago

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 commented 5 years ago

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

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

sergioberg commented 5 years ago

Is there any chance that this will be implemented?

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

JoeLudwig commented 5 years ago

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

sergioberg commented 5 years ago

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:

sergioberg commented 5 years ago

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

sergioberg commented 4 years ago

@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

BOLL7708 commented 4 years ago

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:

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.

sergioberg commented 4 years ago

@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 commented 4 years ago

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 commented 3 years ago

@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 CompositorFrameTiming or add additional logging to already existed vrclient*.txt logging.

sergioberg commented 10 months ago

@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.