x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Question about Screen percentage and Resolution quality

Hi there,

Is there a way to set ResolutionQuality (sg.ResolutionQuality) at runtime without the ScreenPercentage automatically being set to 100?

I'm using scalability auto which will set both ResolutionQuality and ScreenPercentage based on the GPU benchmark value. For Oculus I'm using the adaptive pixel density feature, but for SteamVR I want to be able to modify ResolutionQuality at runtime based on framerate (since ScreenPercentage can't be changed without a hiccup).

My current workaround is that if I run my "scalability auto" and that sets the ScreenPercentage to 120, I can then use the "Get ScreenPercentage" in my level blueprint and then run "r.ScreenPercentage" with the value I got from "Get ScreenPercentage" and after that I can change the ResolutionQuality without the ScreenPercentage being changed.

Product Version: UE 4.18
Tags:
more ▼

asked Dec 12 '17 at 03:40 PM in VR

avatar image

Hejden
141 6 12 22

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

I did some research on this but forgot to answer my own question, sorry.

But here goes: I thought sg.ResolutionQuality was an engine setting that would somehow change the quality of the rendering, but it turns out that the "sg" part stands for scalability group and it's a value that you have to define in your DefaultScalability.ini.

From what I gather, you can define up to four scalability groups for sg.ResolutionQuality in the ini file. If you add more they will be ignored.

As an example, adding this row in DefaultScalability.ini would define four groups: PerfIndexThresholds_ResolutionQuality="GPU 150 200 250 300"

The groups are based on the GPU value that you acquire by running the console command "scalability auto".

Adding this row will set a value for each of the groups above: PerfIndexValues_ResolutionQuality="50 65 75 85 100"

There are five values instead of four, because the first value is for when the GPU value is lower than the first defined group (<150 in the case above).

If you add the two lines above to your DefaultScalability.ini and run the command "scalability auto" the engine will set a sg.ResolutionQuality value based on your GPU performance. Let's say you have a GPU that scores between 150 and 200, the engine will then set sg.ResolutionQuality 65. The resolutionquality value directly corresponds to r.ScreenPercentage, so "sg.ResolutionQuality 65" will automatically set "r.ScreenPercentage" to 65.

The problem I ran into was that I tried to set resolutionquality values that were higher than 100. In VR you tend to want to use r.ScreenPercentage values between 100 and 150, and you definitely want to avoid values below 100. But it turns out that setting a resolutionquality value above 100 will set the r.ScreenPercentage value to 100.

The workaround for me was to define the groups as follows: PerfIndexThresholds_ResolutionQuality="GPU 150 200 250 300" PerfIndexValues_ResolutionQuality="100 115 130 140 150"

Then I would pause the game on a thread that was set to "tickable while paused" and run the "scalability auto" command (pausing before running scalability auto seems to give more predictable values).

Then I would get the "Current Scale Value" from GetGameUserSettings ---> GetResolutionScaleInformation and convert that from float to string and append it to r.ScreenPercentage and feed it into Execute Console Command. This results in the ScreenPercentage value being set to the ResolutionQuality value defined in yout DefaultScalability.ini file.

There's still a hiccup each time you change the ScreenPercentage value, so you will not be able to set it dynamically based on performance.

I should mention that since sg.ResolutionQuality only affects r.ScreenPercentage (as far as I know), it's much simpler to just add "r.ScreenPercentage" with a value to one of your existing scalability groups that are set based on GPU in the DefaultScalability.ini.

I should also mention that you will need to restart the editor each time you change the DefaultScalability.ini file in order for your changes to come into effect.

more ▼

answered Dec 16 '17 at 10:06 AM

avatar image

Hejden
141 6 12 22

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

You can use the Execute Console Command blueprint node to issue any console command, including sg.ResolutionQuality, at runtime:

https://docs.unrealengine.com/latest/INT/BlueprintAPI/Development/ExecuteConsoleCommand/

more ▼

answered Dec 16 '17 at 08:19 AM

avatar image

vr_marco
2.2k 10 6 12

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question